Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
fdfba0c
✨ [Artifact 1492] 古き想いの額縁の作成
k22992068-crypto Jun 8, 2026
e06e256
🩹 [Artifact 1492] 古き想いの額縁の説明を微修正
k22992068-crypto Jun 10, 2026
d5ffa98
🩹 [Artifact 1492] 古き想いの額縁のCD,発動率、回復MP量をよりモチーフにあうように調整
k22992068-crypto Jun 13, 2026
a512fe6
🐛 [Artifact 1492] 古き想いの額縁がニャプトフで使えていた問題の修正
k22992068-crypto Jun 13, 2026
ccd0b28
✨ [Artifact 1492] 古き想いの額縁の召喚するオブジェクトの見た目を設定
k22992068-crypto Jun 14, 2026
960a244
✨ [Artifact 1492] 古き想いの額縁が加工機から出ないように変更
k22992068-crypto Jun 14, 2026
aea5031
✨ [Artifact 1492] 古き想いの額縁の演出を追加
k22992068-crypto Jun 14, 2026
d79639a
[Artifact 1492] 古き想いの額縁の対象絞り込み時距離制限を追加
k22992068-crypto Jun 14, 2026
7bd3349
🐛 [Artifact 1492] 古き想いの額縁がスペクテイターのプレイヤーを追尾していた問題の修正
k22992068-crypto Jun 14, 2026
2d9fc35
Merge branch 'master' into dev/mizame_artifact1492
k22992068-crypto Jun 14, 2026
89dd5a3
🩹 [Artifact 1492] 古き想いの額縁のセレクターのselectorSortKeysを修正
k22992068-crypto Jun 14, 2026
9261e2a
✨ [Artifact 1492] 「繋創を想う額縁」に名前を変更
k22992068-crypto Jun 15, 2026
cc805c3
✨ [Artifact 1492] 『繋創を想う額縁』に名前を変更
k22992068-crypto Jun 15, 2026
a9bdadf
✨ [Artifact 1492] 『故想の額縁』のバフをMP回復量に変更
k22992068-crypto Jun 23, 2026
761058b
Merge branch 'master' into dev/mizame_artifact1492
k22992068-crypto Jun 23, 2026
2e28f81
Merge branch 'dev/mizame_artifact1492' of https://github.com/ProjectT…
k22992068-crypto Jun 23, 2026
743d4a5
✨ [Artifact 1492] 『故想の額縁』のトリガーでバニラ攻撃をはじくように変更
k22992068-crypto Jul 1, 2026
8bb6747
Merge branch 'master' into dev/mizame_artifact1492
k22992068-crypto Jul 1, 2026
e0efc27
🩹 [Artifact 1492] 『故想の額縁』の発動条件の説明文をわかりやすいように微修正
k22992068-crypto Jul 1, 2026
bdb8112
Merge branch 'dev/mizame_artifact1492' of https://github.com/ProjectT…
k22992068-crypto Jul 1, 2026
c44de18
🩹 [Artifact 1492] 『故想の額縁』の少しおかしなフィールド名を修正
k22992068-crypto Jul 18, 2026
874c0dd
🎨 [Artifact 1492] 『故想の額縁』のバフ効果を変更
k22992068-crypto Sep 21, 2026
9852949
Merge branch 'master' into dev/mizame_artifact1492
k22992068-crypto Sep 21, 2026
444eb7b
エフェクトのremoveの実装忘れを修正
k22992068-crypto Oct 8, 2026
439c627
Merge branch 'master' into dev/mizame_artifact1492
k22992068-crypto Oct 8, 2026
4942aaa
必要ないregiveを削除
k22992068-crypto Oct 8, 2026
03557f3
Merge branch 'dev/mizame_artifact1492' of https://github.com/ProjectT…
k22992068-crypto Oct 8, 2026
6f03a9d
Merge branch 'master' into dev/mizame_artifact1492
k22992068-crypto Oct 18, 2026
6097d39
範囲を64ブロックに制限し、それ以上遠くに離れた手金未攻撃したときには発動しないように変更
k22992068-crypto Nov 15, 2026
12115a2
欠片との接触が、距離の一番近いプレイヤーに対して行われるように修正
k22992068-crypto Nov 15, 2026
8ef5b59
Merge branch 'dev/mizame_artifact1492' of https://github.com/ProjectT…
k22992068-crypto Nov 15, 2026
20997aa
正しく一番近い敵を選ぶように変更
k22992068-crypto Nov 15, 2026
3a6fdc4
一番近くのプレイヤーに正しく当たらない問題を修正
k22992068-crypto Nov 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:artifact/1492.your_thoughts_frames/give/1.trigger
#
# 神器の取得処理の呼び出し時に実行されるfunction
#
# @within tag/function asset:artifact/give

execute if data storage asset:context {id:1492} run function asset:artifact/1492.your_thoughts_frames/give/2.give
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#> asset:artifact/1492.your_thoughts_frames/give/2.give
#
# 神器の作成部 ここでID等を定義する
#
# @user
# @within function asset:artifact/1492.your_thoughts_frames/give/1.trigger

# 神器の説明や消費MPなどをここで設定する。
# 最後にasset:artifact/common/giveを実行することで入手可能。

# 神器のID (int) スプレッドシートの値を入れる
data modify storage asset:artifact ID set value 1492

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この神器にはregister.mcfunctionがなく、tags/functions/artifact/register.jsonにも登録されていないので、asset:artifact RarityRegistryとRarityRegistryWithColorに1492が入りません。シャードの処理やコンテナの神器の抽選は、この2つからfrom_rarityで神器を選ぶので、1492はこれらの経路では出てきません。

検証用サーバー(Minecraft 1.20.4、このPRのhead 8ef5b59)でload後のstorageを読むと、どちらにも1492はなく、1534(雀の涙)は入っていました。1534などほかの神器と同じように、レアリティに合わせたregister.mcfunctionを置き、register.jsonに追加する必要があります。


Generated by Claude Code

# 神器のベースアイテム
data modify storage asset:artifact Item set value "minecraft:stick"
# 神器の名前 (TextComponentString)
data modify storage asset:artifact Name set value '[{"text":"『故","color":"#DAA1FF"},{"text":"想","color":"#DAA1FF"},{"text":"の","color":"#C5A5FF"},{"text":"額","color":"#B8A8FF"},{"text":"縁』","color":"#9EAEFF"}]'
# 神器の説明文 (TextComponentString[])
data modify storage asset:artifact Lore set value ['{"text":"発動時、敵が”気持ちの欠片”を近くに落とす"}','{"text":"気持ちの欠片に触れたプレイヤーはHPを5回復し"}','{"text":"10秒間MP回復量が+5%上昇する"}','{"text":"「まだ喉元に噛みつく牙はある?」","color":"gray"}']
# 消費アイテム ({Item: TextComponent, Count: int, Extra?: TextComponent}) (オプション)
# data modify storage asset:artifact ConsumeItem.Item set value '{"translate":"item.minecraft.stick"}'
# data modify storage asset:artifact ConsumeItem.Count set value 1
# data modify storage asset:artifact ConsumeItem.Extra set value
# 使用回数 (int) (オプション)
# data modify storage asset:artifact RemainingCount set value
# 神器を発動できるスロット (string) Wikiを参照
data modify storage asset:artifact Slot set value "offhand"
# 神器のトリガー (string) Wikiを参照
data modify storage asset:artifact Trigger set value "onAttack"
# 神器の発動条件 (TextComponentString) (オプション)
data modify storage asset:artifact Condition set value '{"text":"神器による攻撃時に3.1416%の確率で発動"}'
# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.Damage set value [0,0]
# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.AttackType set value [Physical,Magic]
# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.ElementType set value [Fire,Water,Thunder,None]
# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.BypassResist set value
# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.IsRangeAttack set value
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.AttackRange set value
# MP消費量 (int)
data modify storage asset:artifact MPCost set value 0
# MP必要量 (int) (オプション)
# data modify storage asset:artifact MPRequire set value
# MP回復量 (int)
# data modify storage asset:artifact MPHealWhenHit set value
# 神器のクールダウン
data modify storage asset:artifact LocalCooldown set value 20
# 種別クールダウン ({Type: string, Duration: int}) (オプション)
# data modify storage asset:artifact TypeCooldown.Type set value
# data modify storage asset:artifact TypeCooldown.Duration set value
# グローバルクールダウン (int) (オプション)
# data modify storage asset:artifact SpecialCooldown set value
# クールダウンによる使用不可のメッセージを非表示にするか否か (boolean) (オプション)
data modify storage asset:artifact DisableCooldownMessage set value true
# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション)
# data modify storage asset:artifact DisableMPMessage set value
# 破壊時の音を鳴らさないかどうか (boolean) (オプション)
# data modify storage asset:artifact DisableBreakSound set value
# 扱える神 (string[]) Wikiを参照
data modify storage asset:artifact CanUsedGod set value "ALL"
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション)
# data modify storage asset:artifact CustomNBT set value {}

# 神器の入手用function
function asset:artifact/common/give
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:artifact/1492.your_thoughts_frames/trigger/1.trigger
#
# 指定したイベントタイミングで実行されるfunction
#
# @within tag/function asset:artifact/**

# storage asset:idのoffhandに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する
execute if data storage asset:context id{offhand:1492} run function asset:artifact/1492.your_thoughts_frames/trigger/2.check_condition
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#> asset:artifact/1492.your_thoughts_frames/trigger/2.check_condition
#
# 神器の発動条件をチェックします
#
# @within function asset:artifact/1492.your_thoughts_frames/trigger/1.trigger

# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く
function asset:artifact/common/check_condition/offhand

# IsDoT:trueならCanUsedを削除
execute if entity @s[tag=CanUsed] if data storage asset:context Attack{IsDoT:true} run tag @s remove CanUsed
# バニラ攻撃の場合はCanUsedを削除
execute if data storage asset:context Attack{IsVanilla:1b} run tag @s remove CanUsed

@tatuharu tatuharu Oct 26, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確率の判定に通った攻撃で、プレイヤーから30ブロック以内に Victim がいないと、欠片は召喚されず、common/use/offhand と演出の playsound だけが実行されます。common/use/offhand がアイテムの LatestUseTick を更新するので、そこから20tickのあいだは発動しません。

Victim を付けるのは本体の asset_manager:artifact/triggers/attack/add_tag_each_victim で、対象はプレイヤーから150ブロック以内にいて MobUUID が一致するentityです。一方、3.main.mcfunction の13行目の召喚は distance=..30 の対象だけを選び、10行目の common/use/offhand と16〜19行目の playsound は対象の有無にかかわらず実行されます。そのため、30ブロックより遠く150ブロック以内の敵への攻撃で発動すると、上のとおりになります。

検証用サーバー(Minecraft 1.20.4、このPRの head 6f03a9d)で確かめました。攻撃対象のハスクをプレイヤーから40ブロックと100ブロック離して置き、1tickに10回ずつ240tick攻撃すると、それぞれ11回と12回発動し、そのたびにアイテムの LatestUseTick が更新されましたが、欠片は一度も召喚されませんでした。20ブロック離して置いた対照では11回発動し、そのたびに攻撃対象の近くに欠片が1つ召喚されました。どの条件でも、発動してから次に発動するまでの間隔は20tick以上でした。神器による攻撃の代わりに、RCON から api:damage/modifier と api:damage/ を呼んで攻撃しました。効果音が届いたかは確かめていません。

1363 Hydra Fang の 2.check_condition と同じように、Victim の有無を発動条件で確かめると、欠片を出せない攻撃では発動しなくなります。

Suggested change
execute if data storage asset:context Attack{IsVanilla:1b} run tag @s remove CanUsed
execute if data storage asset:context Attack{IsVanilla:1b} run tag @s remove CanUsed
# 30ブロック以内に攻撃対象がいなければCanUsedを削除
execute unless entity @e[type=#lib:living,type=!player,tag=Victim,distance=..30,limit=1] run tag @s remove CanUsed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正を確認しました。

2.check_conditionで、64ブロック以内にVictimがいなければCanUsedを外すようになりました。3.mainの召喚も同じdistance=..64なので、発動したのに欠片が出ない攻撃はなくなりました。

検証用サーバー(Minecraft 1.20.4、このPRのhead 8ef5b59)で、攻撃対象のハスクをプレイヤーから50ブロック・80ブロック・20ブロック離して置き、1tickに10回ずつ160tick攻撃しました。50ブロックでは7回、20ブロックでは8回発動し、そのたびに攻撃対象の近くに欠片が1つ召喚されました。80ブロックでは一度も発動せず、アイテムにLatestUseTickは付きませんでした。神器による攻撃の代わりに、前回と同じくRCONからapi:damage/modifierとapi:damage/を呼んでいます。


Generated by Claude Code

# 64ブロック以内に攻撃対象がいなければCanUsedを削除
execute unless entity @e[type=#lib:living,type=!player,tag=Victim,distance=..64,limit=1] run tag @s remove CanUsed

# 3.1416%の確率でCanUsedを残す(7%*51%*88%=3.1416%)
execute unless predicate lib:random_pass_per/7 run tag @s remove CanUsed
execute unless predicate lib:random_pass_per/51 run tag @s remove CanUsed
execute unless predicate lib:random_pass_per/88 run tag @s remove CanUsed

# CanUsedタグをチェックして3.main.mcfunctionを実行する
execute if entity @s[tag=CanUsed] run function asset:artifact/1492.your_thoughts_frames/trigger/3.main
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#> asset:artifact/1492.your_thoughts_frames/trigger/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/1492.your_thoughts_frames/trigger/2.check_condition

# 性能として、水属性のビルドで手数があるビルドか、上振れたときだとかなりMPの回復の足しになるくらいがうれしい

# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う
function asset:artifact/common/use/offhand

# 攻撃対象の近くにオーブを召喚
execute at @e[type=#lib:living,type=!player,tag=Victim,distance=..64,limit=1] run function asset:artifact/1492.your_thoughts_frames/trigger/summon

# 演出
playsound block.amethyst_block.chime player @a ~ ~ ~ 5 0.8
playsound minecraft:block.enchantment_table.use player @a ~ ~ ~ 0.9 1.4 0.0
playsound minecraft:block.amethyst_cluster.hit player @a ~ ~ ~ 5.0 1.35 0.0
playsound minecraft:block.amethyst_block.break player @a ~ ~ ~ 10 2 0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#> asset:artifact/1492.your_thoughts_frames/trigger/summon
#
# オーブの召喚
#
# @within function asset:artifact/1492.your_thoughts_frames/trigger/3.main

# 演出
particle item pink_stained_glass ~ ~1 ~ 0.3 0.5 0.3 0.1 100 normal @a

# 召喚
data modify storage api: Argument.ID set value 1164
data modify storage api: Argument.FieldOverride.Amount set value 0.05d
data modify storage api: Argument.FieldOverride.Duration set value 200
data modify storage api: Argument.FieldOverride.Heal set value 5.0d
execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID
execute positioned ~ ~1 ~ run function api:object/summon
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0373.longevity_your_thoughts/_/end
#
# Effectの効果の終了時に実行されるfunction
#
# @within tag/function asset:effect/end

execute if data storage asset:context {id:373} run function asset:effect/0373.longevity_your_thoughts/end/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0373.longevity_your_thoughts/_/given
#
# Effectが付与された時に実行されるfunction
#
# @within tag/function asset:effect/given

execute if data storage asset:context {id:373} run function asset:effect/0373.longevity_your_thoughts/given/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0373.longevity_your_thoughts/_/register
#
#
#
# @within tag/function asset:effect/register

execute if data storage asset:context {id:373} run function asset:effect/0373.longevity_your_thoughts/register
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0373.longevity_your_thoughts/_/remove
#
# Effectが神器や牛乳によって削除された時に実行されるfunction
#
# @within tag/function asset:effect/remove

execute if data storage asset:context {id:373} run function asset:effect/0373.longevity_your_thoughts/remove/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0373.longevity_your_thoughts/_/tick
#
# Effectが発動している間毎tick実行されるfunction
#
# @within tag/function asset:effect/tick

execute if data storage asset:context {id:373} run function asset:effect/0373.longevity_your_thoughts/tick/
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#> asset:effect/0373.longevity_your_thoughts/effect/reset
#
# エフェクトのリセット処理
#
# @within function
# asset:effect/0373.longevity_your_thoughts/end/
# asset:effect/0373.longevity_your_thoughts/remove/

# 補正をリセット
data modify storage api: Argument.UUID set from storage asset:context this.UUID
function api:modifier/mp_heal/remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#> asset:effect/0373.longevity_your_thoughts/effect/set
#
# 初期化処理
#
# @within function
# asset:effect/0373.longevity_your_thoughts/given/

# MP回復量
data modify storage api: Argument.UUID set from storage asset:context this.UUID
data modify storage api: Argument.Amount set from storage asset:context this.Amount
data modify storage api: Argument.Operation set value "multiply"
function api:modifier/mp_heal/add
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:effect/0373.longevity_your_thoughts/end/
#
# Effectの効果が切れた時の処理
#
# @within function asset:effect/0373.longevity_your_thoughts/_/end

# 補正をリセット
function asset:effect/0373.longevity_your_thoughts/effect/reset
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:effect/0373.longevity_your_thoughts/given/
#
# Effectが付与された時の処理
#
# @within function asset:effect/0373.longevity_your_thoughts/_/given

# 初期化処理
function asset:effect/0373.longevity_your_thoughts/effect/set
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#> asset:effect/0373.longevity_your_thoughts/register
#
# Effectのデータを指定
#
# @within function asset:effect/0373.longevity_your_thoughts/_/register

# ExtendsSafe (boolean) (default = false)
# data modify storage asset:effect ExtendsSafe set value true
# ID (int)
data modify storage asset:effect ID set value 373
# 名前 (TextComponentString)
data modify storage asset:effect Name set value '{"text":"遺るあなたの想い","color":"#DAA1FF"}'
# 説明文 (TextComponentString[])
data modify storage asset:effect Description set value ['{"text":"MP回復量が上昇する"}']
# 効果時間 (int) (default = API || error)
# data modify storage asset:effect Duration set value
# スタック (int) (default = API || 1)
# data modify storage asset:effect Stack set value
# 効果時間の操作方法 (default = API || "replace")
# data modify storage asset:effect DurationOperation set value
# スタックの操作方法 (default = API || "replace")
# data modify storage asset:effect StackOperation set value
# 最大効果時間 (int) (default = 2147483647)
# data modify storage asset:effect MaxDuration set value
# 最大スタック (int) (default = 2147483647)
data modify storage asset:effect MaxStack set value 1
# 悪い効果か否か (boolean)
data modify storage asset:effect IsBadEffect set value false
# 死亡時のエフェクトの処理 (default = "remove")
# data modify storage asset:effect ProcessOnDied set value
# 消すのに必要なレベル (int) (default = 1)
data modify storage asset:effect RequireClearLv set value 3
# エフェクトをUIに表示するか (boolean) (default = true)
# data modify storage asset:effect Visible set value
# エフェクトのスタックををUIに表示するか (boolean) (default = true)
data modify storage asset:effect StackVisible set value false

# フィールド
data modify storage asset:effect Field.UUID set value [I;1,3,373,0]
data modify storage asset:effect Field.Amount set value 0.05d
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:effect/0373.longevity_your_thoughts/remove/
#
# Effectが削除された時の処理
#
# @within function asset:effect/0373.longevity_your_thoughts/_/remove

# 補正をリセット
function asset:effect/0373.longevity_your_thoughts/effect/reset
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:effect/0373.longevity_your_thoughts/tick/
#
# Effectのtick処理
#
# @within function asset:effect/0373.longevity_your_thoughts/_/tick

# 演出
execute if predicate lib:random_pass_per/20 run particle minecraft:dust_color_transition 1 0.4 1 0.8 0.2 0.8 1 ~ ~1 ~ 0.4 0.4 0.4 1 10
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#> asset:object/1164.piece_of_creation/_index.d
# @private

#> tag
# @within function asset:object/1164.piece_of_creation/**
#declare tag 1164.Target
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#> asset:object/1164.piece_of_creation/init/
#
# Objectのinit時の処理
#
# @within asset:object/alias/1164/init

# 召喚場所からランダムに少し拡散する
data modify storage lib: Argument.Bounds set value [[2d,2d],[0d,0d],[2d,2d]]
function lib:spread_entity/

# sound
playsound minecraft:entity.vex.charge player @a ~ ~ ~ 5.0 1.75 0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#> asset:object/1164.piece_of_creation/register
#
# Objectのデータを指定
#
# @within function asset:object/alias/1164/register

# 継承(オプション)
# data modify storage asset:object Extends append value
# function asset:object/extends
# 他のObjectに継承されることを許可するか (boolean) (オプション)
# data modify storage asset:object ExtendsSafe set value
# 継承されることを前提とした、抽象的なObjectであるかどうか(boolean)
data modify storage asset:object IsAbstract set value false
# Tickするかどうか(boolean) (オプション)
# data modify storage asset:object IsTicking set value

# ID (int)
data modify storage asset:object ID set value 1164
# フィールド(オプション)
data modify storage asset:object Field.Amount set value 0.05
data modify storage asset:object Field.Duration set value 200
data modify storage asset:object Field.Heal set value 1
data modify storage asset:object Field.UserID set value -1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#> asset:object/1164.piece_of_creation/summon/
#
# Object召喚処理の呼び出し時に実行されるfunction
#
# @within asset:object/alias/1164/summon

# 元となるEntityを召喚する
execute as 0-0-0-0-0 in minecraft:overworld positioned as @s run tp @s ~ ~ ~ ~ 0
data modify storage asset:temp Args.Rotation set from entity 0-0-0-0-0 Rotation
function asset:object/1164.piece_of_creation/summon/m with storage asset:temp Args
data remove storage asset:temp Args
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:object/1164.piece_of_creation/summon/m
#
#
#
# @within function asset:object/1164.piece_of_creation/summon/

$summon item_display ~ ~ ~ {Rotation:$(Rotation),teleport_duration:1,Tags:["ObjectInit","Uninterferable"],brightness:{sky:15,block:15},item:{id:"stick",Count:1b,tag:{CustomModelData:20620}},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.4f,1.4f,1.4f]}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#> asset:object/1164.piece_of_creation/tick/
#
# Objectのtick時の処理
#
# @within asset:object/alias/1164/tick

# Tick加算
scoreboard players add @s General.Object.Tick 1

# 下にゆっくり落ちる
execute if block ~ ~-0.6 ~ #lib:no_collision/ run tp @s ~ ~-0.03 ~
# ゆっくり回転
execute at @s run tp @s ~ ~ ~ ~3 ~

#一番近くのプレイヤーにタグをつける
tag @p[gamemode=!spectator,tag=!Death,distance=..3] add 1164.Target

# 近くのプレイヤーに自身の向きを変えずに追尾
execute at @s facing entity @p[tag=1164.Target,distance=..3] eyes positioned ^ ^ ^0.25 run tp @s ~ ~ ~

# playerとの接触処理
execute positioned ~-0.5 ~-0.5 ~-0.5 if entity @p[tag=1164.Target,dx=0] run function asset:object/1164.piece_of_creation/tick/hit_player

# リセット
tag @a[tag=1164.Target,distance=..16] remove 1164.Target

# 消滅処理
execute if entity @s[scores={General.Object.Tick=200..}] run function asset:object/1164.piece_of_creation/tick/kill
Loading
Loading