diff --git a/Asset/data/asset/functions/artifact/0290.carefully_collector/give/2.give.mcfunction b/Asset/data/asset/functions/artifact/0290.carefully_collector/give/2.give.mcfunction index 9a3bbc22ca..3b96e96ddc 100644 --- a/Asset/data/asset/functions/artifact/0290.carefully_collector/give/2.give.mcfunction +++ b/Asset/data/asset/functions/artifact/0290.carefully_collector/give/2.give.mcfunction @@ -15,7 +15,7 @@ # 神器の名前 (TextComponentString) data modify storage asset:artifact Name set value '[{"text":"チェストそのまま回収君","color":"green"}]' # 神器の説明文 (TextComponentString[]) - data modify storage asset:artifact Lore set value ['[{"text":"丁寧丁寧丁寧に"}]'] + data modify storage asset:artifact Lore set value ['[{"text":"真下にある","color":"white"},{"translate":"block.minecraft.chest"},{"text":"を回収する","color":"white"}]','[{"text":"中にアイテムの入った","color":"white"},{"translate":"block.minecraft.chest"}]','[{"text":"または、","color":"white"},{"translate":"block.minecraft.shulker_box"},{"text":"などがある場合は回収できない","color":"white"}]','{"text":"丁寧丁寧丁寧に","color":"gray"}'] # 消費アイテム ({Item: TextComponent, Count: int, Extra?: TextComponent}) (オプション) # data modify storage asset:artifact ConsumeItem.Item set value # data modify storage asset:artifact ConsumeItem.Count set value diff --git a/Asset/data/asset/functions/artifact/0290.carefully_collector/trigger/2.check_condition.mcfunction b/Asset/data/asset/functions/artifact/0290.carefully_collector/trigger/2.check_condition.mcfunction index a5fc2923e9..990f3d776f 100644 --- a/Asset/data/asset/functions/artifact/0290.carefully_collector/trigger/2.check_condition.mcfunction +++ b/Asset/data/asset/functions/artifact/0290.carefully_collector/trigger/2.check_condition.mcfunction @@ -23,11 +23,11 @@ data remove storage asset:temp Fail execute if entity @s[tag=!CanUsed] run return fail -# チェストの中身を取得し、中にチェスト・シュルカーボックスがあれば回収できない +# チェストの中身を取得し、中にアイテム入りアイテムがあれば回収できない # 失敗時、asset:temp blockを削除 data modify storage asset:temp block set from block ~ ~ ~ - execute if function asset:artifact/0290.carefully_collector/trigger/2.check_condition/ban_items run data modify storage asset:temp Fail set value true - execute if data storage asset:temp {Fail:true} run tellraw @s [{"translate":"block.minecraft.chest","color":"red"},{"text":"または"},{"translate":"block.minecraft.shulker_box"},{"text":"が中に入っています"}] + execute if function asset:artifact/0290.carefully_collector/trigger/2.check_condition/is_nested run data modify storage asset:temp Fail set value true + execute if data storage asset:temp {Fail:true} run tellraw @s [{"text":"アイテムの入った","color":"red"},{"translate":"block.minecraft.chest"},{"text":"などが含まれています。"}] execute if data storage asset:temp {Fail:true} run data remove storage asset:temp block execute if data storage asset:temp {Fail:true} run tag @s remove CanUsed data remove storage asset:temp Fail diff --git a/Asset/data/asset/functions/artifact/0290.carefully_collector/trigger/2.check_condition/ban_items.mcfunction b/Asset/data/asset/functions/artifact/0290.carefully_collector/trigger/2.check_condition/ban_items.mcfunction deleted file mode 100644 index cee28cd281..0000000000 --- a/Asset/data/asset/functions/artifact/0290.carefully_collector/trigger/2.check_condition/ban_items.mcfunction +++ /dev/null @@ -1,30 +0,0 @@ -#> asset:artifact/0290.carefully_collector/trigger/2.check_condition/ban_items -# -# -# -# @within function asset:artifact/0290.carefully_collector/trigger/2.check_condition - -# チェスト、トラップチェスト、各色シュルカーボックスが入っていたら成功 - execute if data storage asset:temp block.Items[{id:"minecraft:chest"}] run return 1 - execute if data storage asset:temp block.Items[{id:"minecraft:trapped_chest"}] run return 1 - - execute if data storage asset:temp block.Items[{id:"minecraft:shulker_box"}] run return 1 - execute if data storage asset:temp block.Items[{id:"minecraft:white_shulker_box"}] run return 1 - execute if data storage asset:temp block.Items[{id:"minecraft:black_shulker_box"}] run return 1 - execute if data storage asset:temp block.Items[{id:"minecraft:light_gray_shulker_box"}] run return 1 - execute if data storage asset:temp block.Items[{id:"minecraft:gray_shulker_box"}] run return 1 - execute if data storage asset:temp block.Items[{id:"minecraft:brown_shulker_box"}] run return 1 - execute if data storage asset:temp block.Items[{id:"minecraft:red_shulker_box"}] run return 1 - execute if data storage asset:temp block.Items[{id:"minecraft:orange_shulker_box"}] run return 1 - execute if data storage asset:temp block.Items[{id:"minecraft:yellow_shulker_box"}] run return 1 - execute if data storage asset:temp block.Items[{id:"minecraft:lime_shulker_box"}] run return 1 - execute if data storage asset:temp block.Items[{id:"minecraft:green_shulker_box"}] run return 1 - execute if data storage asset:temp block.Items[{id:"minecraft:cyan_shulker_box"}] run return 1 - execute if data storage asset:temp block.Items[{id:"minecraft:light_blue_shulker_box"}] run return 1 - execute if data storage asset:temp block.Items[{id:"minecraft:blue_shulker_box"}] run return 1 - execute if data storage asset:temp block.Items[{id:"minecraft:purple_shulker_box"}] run return 1 - execute if data storage asset:temp block.Items[{id:"minecraft:magenta_shulker_box"}] run return 1 - execute if data storage asset:temp block.Items[{id:"minecraft:pink_shulker_box"}] run return 1 - -# 失敗 - return 0 diff --git a/Asset/data/asset/functions/artifact/0290.carefully_collector/trigger/2.check_condition/is_nested.mcfunction b/Asset/data/asset/functions/artifact/0290.carefully_collector/trigger/2.check_condition/is_nested.mcfunction new file mode 100644 index 0000000000..01d258ff68 --- /dev/null +++ b/Asset/data/asset/functions/artifact/0290.carefully_collector/trigger/2.check_condition/is_nested.mcfunction @@ -0,0 +1,11 @@ +#> asset:artifact/0290.carefully_collector/trigger/2.check_condition/is_nested +# +# +# +# @within function asset:artifact/0290.carefully_collector/trigger/2.check_condition + +# 中にアイテム入りアイテムはあるか? + execute if data storage asset:temp block.Items[].tag.BlockEntityTag.Items[0] run return 1 + +# 失敗 + return 0 diff --git a/Asset/data/asset/functions/artifact/0290.carefully_collector/trigger/3.main.mcfunction b/Asset/data/asset/functions/artifact/0290.carefully_collector/trigger/3.main.mcfunction index f7c8cf8efb..d18b96cb24 100644 --- a/Asset/data/asset/functions/artifact/0290.carefully_collector/trigger/3.main.mcfunction +++ b/Asset/data/asset/functions/artifact/0290.carefully_collector/trigger/3.main.mcfunction @@ -11,28 +11,24 @@ function asset:artifact/common/use/auto # ここから先は神器側の効果の処理を書く - # 判定 - execute if block ~ ~ ~ chest run scoreboard players set @s Temporary 1 - execute if block ~ ~ ~ trapped_chest run scoreboard players set @s Temporary 2 - # summon - summon item ~ ~ ~ {Tags:[CarefullyCollect],Item:{id:"minecraft:barrier",Count:1b}} - # データ処理 +# summon + summon item ~ ~ ~ {Tags:[CarefullyCollect],Item:{id:"minecraft:barrier",Count:1b}} - data modify storage asset:temp chest.Count set value 1b - data modify storage asset:temp chest.id set from storage asset:temp block.id - data modify storage asset:temp chest.tag.BlockEntityTag.Items set from storage asset:temp block.Items - data modify storage asset:temp chest.tag.BlockEntityTag.Lock set from storage asset:temp block.Lock - data modify storage asset:temp chest.tag.display.Name set from storage asset:temp block.CustomName - # //反映 - data modify entity @e[type=item,tag=CarefullyCollect,distance=..0,limit=1] Item set from storage asset:temp chest +# データ処理 + data modify storage asset:temp chest.Count set value 1b + data modify storage asset:temp chest.id set from storage asset:temp block.id + data modify storage asset:temp chest.tag.BlockEntityTag.Items set from storage asset:temp block.Items + data modify storage asset:temp chest.tag.BlockEntityTag.Lock set from storage asset:temp block.Lock + data modify storage asset:temp chest.tag.display.Name set from storage asset:temp block.CustomName +# //反映 + data modify entity @e[type=item,tag=CarefullyCollect,distance=..0,limit=1] Item set from storage asset:temp chest - # 演出 - execute align xyz positioned ~0.5 ~0.5 ~0.5 run particle dust 0.408 0.894 0.29 0.5 ~ ~ ~ 0.4 0.4 0.4 0 250 normal @a - playsound entity.arrow.hit_player player @a ~ ~ ~ 1 1.5 1 +# 演出 + execute align xyz positioned ~0.5 ~0.5 ~0.5 run particle dust 0.408 0.894 0.29 0.5 ~ ~ ~ 0.4 0.4 0.4 0 250 normal @a + playsound entity.arrow.hit_player player @a ~ ~ ~ 1 1.5 1 - # リセット - setblock ~ ~ ~ air - scoreboard players reset @s Temporary - data remove storage asset:temp chest - tag @e[type=item,tag=CarefullyCollect,distance=..0] remove CarefullyCollect +# リセット + setblock ~ ~ ~ air + data remove storage asset:temp chest + tag @e[type=item,tag=CarefullyCollect,distance=..0] remove CarefullyCollect