From 46454bdaa28bdfe0a082b5996b3545616e8ee47a Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 25 Jan 2026 17:21:11 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=E3=83=81=E3=82=A7=E3=82=B9=E3=83=88?= =?UTF-8?q?=E5=8F=8A=E3=81=B3=E3=82=B7=E3=83=A5=E3=83=AB=E3=82=AB=E3=83=BC?= =?UTF-8?q?=E3=83=9C=E3=83=83=E3=82=AF=E3=82=B9=E3=81=8C=E4=B8=AD=E3=81=AB?= =?UTF-8?q?=E3=81=82=E3=82=8B=E9=9A=9B=E3=81=AB=E5=9B=9E=E5=8F=8E=E3=81=A7?= =?UTF-8?q?=E3=81=8D=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trigger/2.check_condition.mcfunction | 14 +++++++-- .../2.check_condition/ban_items.mcfunction | 30 +++++++++++++++++++ .../trigger/3.main.mcfunction | 4 +-- 3 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 Asset/data/asset/functions/artifact/0290.carefully_collector/trigger/2.check_condition/ban_items.mcfunction 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 f9ac1bcfc7..d19621acec 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 @@ -7,13 +7,23 @@ # 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く auto/feet/legs/chest/head/mainhand/offhandを記載してね function asset:artifact/common/check_condition/auto # 他にアイテム等確認する場合はここに書く + tellraw @s[gamemode=!survival,gamemode=!creative] [{"text": "サバイバルエリアでのみ使用可能です"}] tag @s[gamemode=!survival,gamemode=!creative] remove CanUsed execute if block ~ ~ ~ chest run scoreboard players set @s Temporary 1 execute if block ~ ~ ~ trapped_chest run scoreboard players set @s Temporary 1 - execute unless score @s Temporary matches 1 run tellraw @s ["足元が[",{"translate":"block.minecraft.chest"},"/",{"translate":"block.minecraft.trapped_chest"},"]である必要があります"] + execute unless score @s Temporary matches 1 run tellraw @s ["足元が",{"translate":"block.minecraft.chest"},"か",{"translate":"block.minecraft.trapped_chest"},"である必要があります"] execute unless score @s Temporary matches 1 run tag @s remove CanUsed scoreboard players reset @s Temporary + +# チェストの中身を取得し、中にチェスト・シュルカーボックスがあれば回収できない + execute if entity @s[tag=CanUsed] run data modify storage asset:temp block set from block ~ ~ ~ + execute if entity @s[tag=CanUsed] if function asset:artifact/0290.carefully_collector/trigger/2.check_condition/ban_items run tellraw @s [{"translate":"block.minecraft.chest","color":"red"},{"text":"または"},{"translate":"block.minecraft.shulker_box"},{"text":"が中に入っています"}] + execute if entity @s[tag=CanUsed] if function asset:artifact/0290.carefully_collector/trigger/2.check_condition/ban_items run tag @s remove CanUsed + # CanUsedタグをチェックして3.main.mcfunctionを実行する - execute if entity @s[tag=CanUsed] run function asset:artifact/0290.carefully_collector/trigger/3.main \ No newline at end of file + execute if entity @s[tag=CanUsed] run function asset:artifact/0290.carefully_collector/trigger/3.main + +# リセット + data remove storage asset:temp block 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 new file mode 100644 index 0000000000..cee28cd281 --- /dev/null +++ b/Asset/data/asset/functions/artifact/0290.carefully_collector/trigger/2.check_condition/ban_items.mcfunction @@ -0,0 +1,30 @@ +#> 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/3.main.mcfunction b/Asset/data/asset/functions/artifact/0290.carefully_collector/trigger/3.main.mcfunction index d5c90a5132..f7c8cf8efb 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 @@ -18,7 +18,6 @@ summon item ~ ~ ~ {Tags:[CarefullyCollect],Item:{id:"minecraft:barrier",Count:1b}} # データ処理 - data modify storage asset:temp block set from block ~ ~ ~ data modify storage asset:temp chest.Count set value 1b data modify storage asset:temp chest.id set from storage asset:temp block.id @@ -35,6 +34,5 @@ # リセット setblock ~ ~ ~ air scoreboard players reset @s Temporary - data remove storage asset:temp block data remove storage asset:temp chest - tag @e[type=item,tag=CarefullyCollect,distance=..0] remove CarefullyCollect \ No newline at end of file + tag @e[type=item,tag=CarefullyCollect,distance=..0] remove CarefullyCollect From 845fb9ac501dad381d0682683d7c00d9c7f94fff Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 25 Jan 2026 17:23:32 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF?= =?UTF-8?q?=E6=99=82=E3=81=AE=E5=90=84=E5=87=A6=E7=90=86=E3=81=ABCanUsed?= =?UTF-8?q?=E3=81=AE=E6=9D=A1=E4=BB=B6=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trigger/2.check_condition.mcfunction | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 d19621acec..401126e0b4 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 @@ -8,13 +8,13 @@ function asset:artifact/common/check_condition/auto # 他にアイテム等確認する場合はここに書く - tellraw @s[gamemode=!survival,gamemode=!creative] [{"text": "サバイバルエリアでのみ使用可能です"}] - tag @s[gamemode=!survival,gamemode=!creative] remove CanUsed + execute if entity @s[tag=CanUsed] unless predicate api:area/is_breakable run function lib:message/artifact/can_not_use_here + execute if entity @s[tag=CanUsed] unless predicate api:area/is_breakable run tag @s remove CanUsed - execute if block ~ ~ ~ chest run scoreboard players set @s Temporary 1 - execute if block ~ ~ ~ trapped_chest run scoreboard players set @s Temporary 1 - execute unless score @s Temporary matches 1 run tellraw @s ["足元が",{"translate":"block.minecraft.chest"},"か",{"translate":"block.minecraft.trapped_chest"},"である必要があります"] - execute unless score @s Temporary matches 1 run tag @s remove CanUsed + execute if entity @s[tag=CanUsed] if block ~ ~ ~ chest run scoreboard players set @s Temporary 1 + execute if entity @s[tag=CanUsed] if block ~ ~ ~ trapped_chest run scoreboard players set @s Temporary 1 + execute if entity @s[tag=CanUsed] unless score @s Temporary matches 1 run tellraw @s ["足元が",{"translate":"block.minecraft.chest"},"か",{"translate":"block.minecraft.trapped_chest"},"である必要があります"] + execute if entity @s[tag=CanUsed] unless score @s Temporary matches 1 run tag @s remove CanUsed scoreboard players reset @s Temporary # チェストの中身を取得し、中にチェスト・シュルカーボックスがあれば回収できない From 56f8702a06d467d8782d2e03536eff9834f992a0 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 25 Jan 2026 17:31:45 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=92=E5=85=A8?= =?UTF-8?q?=E3=81=A6red=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trigger/2.check_condition.mcfunction | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 401126e0b4..68426290b3 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 @@ -13,7 +13,7 @@ execute if entity @s[tag=CanUsed] if block ~ ~ ~ chest run scoreboard players set @s Temporary 1 execute if entity @s[tag=CanUsed] if block ~ ~ ~ trapped_chest run scoreboard players set @s Temporary 1 - execute if entity @s[tag=CanUsed] unless score @s Temporary matches 1 run tellraw @s ["足元が",{"translate":"block.minecraft.chest"},"か",{"translate":"block.minecraft.trapped_chest"},"である必要があります"] + execute if entity @s[tag=CanUsed] unless score @s Temporary matches 1 run tellraw @s [{"text":"","italic":false,"color":"red"},{"text":"足元が"},{"translate":"block.minecraft.chest"},{"text":"か"},{"translate":"block.minecraft.trapped_chest"},{"text":"である必要があります。"}] execute if entity @s[tag=CanUsed] unless score @s Temporary matches 1 run tag @s remove CanUsed scoreboard players reset @s Temporary From c1fbd05ba36095b82cef858586104fa5c4d97853 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 25 Jan 2026 18:24:40 +0900 Subject: [PATCH 4/4] =?UTF-8?q?check=5Fcondition=E3=81=A7return=E3=82=92?= =?UTF-8?q?=E4=BD=BF=E3=81=86=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trigger/2.check_condition.mcfunction | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) 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 68426290b3..a5fc2923e9 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 @@ -8,22 +8,33 @@ function asset:artifact/common/check_condition/auto # 他にアイテム等確認する場合はここに書く - execute if entity @s[tag=CanUsed] unless predicate api:area/is_breakable run function lib:message/artifact/can_not_use_here - execute if entity @s[tag=CanUsed] unless predicate api:area/is_breakable run tag @s remove CanUsed +# CanUsedでないならreturn + execute if entity @s[tag=!CanUsed] run return fail - execute if entity @s[tag=CanUsed] if block ~ ~ ~ chest run scoreboard players set @s Temporary 1 - execute if entity @s[tag=CanUsed] if block ~ ~ ~ trapped_chest run scoreboard players set @s Temporary 1 - execute if entity @s[tag=CanUsed] unless score @s Temporary matches 1 run tellraw @s [{"text":"","italic":false,"color":"red"},{"text":"足元が"},{"translate":"block.minecraft.chest"},{"text":"か"},{"translate":"block.minecraft.trapped_chest"},{"text":"である必要があります。"}] - execute if entity @s[tag=CanUsed] unless score @s Temporary matches 1 run tag @s remove CanUsed - scoreboard players reset @s Temporary +# サバイバルエリアか? + execute unless predicate api:area/is_breakable run function lib:message/artifact/can_not_use_here + execute unless predicate api:area/is_breakable run tag @s remove CanUsed + execute if entity @s[tag=!CanUsed] run return fail + +# 足元がチェスト・トラップチェストか? + execute unless block ~ ~ ~ chest unless block ~ ~ ~ trapped_chest run data modify storage asset:temp Fail set value true + execute if data storage asset:temp {Fail:true} run tellraw @s [{"text":"","italic":false,"color":"red"},{"text":"足元が"},{"translate":"block.minecraft.chest"},{"text":"か"},{"translate":"block.minecraft.trapped_chest"},{"text":"である必要があります。"}] + execute if data storage asset:temp {Fail:true} run tag @s remove CanUsed + data remove storage asset:temp Fail + execute if entity @s[tag=!CanUsed] run return fail # チェストの中身を取得し、中にチェスト・シュルカーボックスがあれば回収できない - execute if entity @s[tag=CanUsed] run data modify storage asset:temp block set from block ~ ~ ~ - execute if entity @s[tag=CanUsed] if function asset:artifact/0290.carefully_collector/trigger/2.check_condition/ban_items run tellraw @s [{"translate":"block.minecraft.chest","color":"red"},{"text":"または"},{"translate":"block.minecraft.shulker_box"},{"text":"が中に入っています"}] - execute if entity @s[tag=CanUsed] if function asset:artifact/0290.carefully_collector/trigger/2.check_condition/ban_items run tag @s remove CanUsed +# 失敗時、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 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 + execute if entity @s[tag=!CanUsed] run return fail # CanUsedタグをチェックして3.main.mcfunctionを実行する - execute if entity @s[tag=CanUsed] run function asset:artifact/0290.carefully_collector/trigger/3.main + function asset:artifact/0290.carefully_collector/trigger/3.main # リセット data remove storage asset:temp block