From e9b96283adee2a751578ae3048e91a8a674d6117 Mon Sep 17 00:00:00 2001 From: anitmyan <61045441+anitmyan@users.noreply.github.com> Date: Sun, 18 Oct 2026 23:04:24 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9C=A8=20=E6=89=8B=E3=81=AB=E6=8C=81?= =?UTF-8?q?=E3=81=A3=E3=81=A6=E3=81=84=E3=82=8B=E7=A5=9E=E5=99=A8=E3=81=AE?= =?UTF-8?q?ID=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8Bdebug=E3=82=B3?= =?UTF-8?q?=E3=83=9E=E3=83=B3=E3=83=89=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../functions/artifact/tell_id.mcfunction | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 TheSkyBlessing/data/debug/functions/artifact/tell_id.mcfunction diff --git a/TheSkyBlessing/data/debug/functions/artifact/tell_id.mcfunction b/TheSkyBlessing/data/debug/functions/artifact/tell_id.mcfunction new file mode 100644 index 0000000000..b3e965820f --- /dev/null +++ b/TheSkyBlessing/data/debug/functions/artifact/tell_id.mcfunction @@ -0,0 +1,24 @@ +#> debug:artifact/tell_id +# +# 手に持っている神器のIDを表示します。 +# 「コレ何番?」 +# +# @private +# @user + + +# 実行者が居ない場合エラー + execute unless entity @s[type=player] run return run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text": "実行者を指定してください。"}] + +# 取得 + function api:data_get/selected_item + function api:data_get/inventory + +# 表示 +# 手持ちアイテムがメインハンドの神器だけな場合は末尾の「(メインハンド)」を省略 + execute if data storage api: SelectedItem.tag.TSB.ID unless data storage api: Inventory[{Slot:-106b}] run tellraw @s [{"storage":"global","nbt":"Prefix.DEBUG"},{"text":"神器ID: "},{"storage":"api:","nbt":"SelectedItem.tag.TSB.ID"}] + execute if data storage api: SelectedItem.tag.TSB.ID if data storage api: Inventory[{Slot:-106b}] run tellraw @s [{"storage":"global","nbt":"Prefix.DEBUG"},{"text":"神器ID: "},{"storage":"api:","nbt":"SelectedItem.tag.TSB.ID"},{"text":" (メインハンド)"}] + execute if data storage api: Inventory[{Slot:-106b}].tag.TSB.ID run tellraw @s [{"storage":"global","nbt":"Prefix.DEBUG"},{"text":"神器ID: "},{"storage":"api:","nbt":"Inventory[{Slot:-106b}].tag.TSB.ID"},{"text":" (オフハンド)"}] + +# 神器を持っていない場合 + execute unless data storage api: SelectedItem.tag.TSB.ID unless data storage api: Inventory[{Slot:-106b}].tag.TSB.ID run tellraw @s [{"storage":"global","nbt":"Prefix.FAILED"},{"text": "神器を手に持っていません。"}] From 48e510aef0096ec4cc47ad5af9098e44318846a7 Mon Sep 17 00:00:00 2001 From: anitmyan <61045441+anitmyan@users.noreply.github.com> Date: Mon, 19 Oct 2026 11:50:28 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E2=9C=A8=20=E5=88=A9=E3=81=8D=E6=89=8B?= =?UTF-8?q?=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=A8=E5=85=A8=E8=A3=85=E5=82=99?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=AE=E4=BA=8C=E7=A8=AE=E9=A1=9E=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../functions/artifact/tell_id.mcfunction | 24 ------------- .../functions/artifact/tell_id/.mcfunction | 20 +++++++++++ .../functions/artifact/tell_id/all.mcfunction | 35 +++++++++++++++++++ 3 files changed, 55 insertions(+), 24 deletions(-) delete mode 100644 TheSkyBlessing/data/debug/functions/artifact/tell_id.mcfunction create mode 100644 TheSkyBlessing/data/debug/functions/artifact/tell_id/.mcfunction create mode 100644 TheSkyBlessing/data/debug/functions/artifact/tell_id/all.mcfunction diff --git a/TheSkyBlessing/data/debug/functions/artifact/tell_id.mcfunction b/TheSkyBlessing/data/debug/functions/artifact/tell_id.mcfunction deleted file mode 100644 index b3e965820f..0000000000 --- a/TheSkyBlessing/data/debug/functions/artifact/tell_id.mcfunction +++ /dev/null @@ -1,24 +0,0 @@ -#> debug:artifact/tell_id -# -# 手に持っている神器のIDを表示します。 -# 「コレ何番?」 -# -# @private -# @user - - -# 実行者が居ない場合エラー - execute unless entity @s[type=player] run return run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text": "実行者を指定してください。"}] - -# 取得 - function api:data_get/selected_item - function api:data_get/inventory - -# 表示 -# 手持ちアイテムがメインハンドの神器だけな場合は末尾の「(メインハンド)」を省略 - execute if data storage api: SelectedItem.tag.TSB.ID unless data storage api: Inventory[{Slot:-106b}] run tellraw @s [{"storage":"global","nbt":"Prefix.DEBUG"},{"text":"神器ID: "},{"storage":"api:","nbt":"SelectedItem.tag.TSB.ID"}] - execute if data storage api: SelectedItem.tag.TSB.ID if data storage api: Inventory[{Slot:-106b}] run tellraw @s [{"storage":"global","nbt":"Prefix.DEBUG"},{"text":"神器ID: "},{"storage":"api:","nbt":"SelectedItem.tag.TSB.ID"},{"text":" (メインハンド)"}] - execute if data storage api: Inventory[{Slot:-106b}].tag.TSB.ID run tellraw @s [{"storage":"global","nbt":"Prefix.DEBUG"},{"text":"神器ID: "},{"storage":"api:","nbt":"Inventory[{Slot:-106b}].tag.TSB.ID"},{"text":" (オフハンド)"}] - -# 神器を持っていない場合 - execute unless data storage api: SelectedItem.tag.TSB.ID unless data storage api: Inventory[{Slot:-106b}].tag.TSB.ID run tellraw @s [{"storage":"global","nbt":"Prefix.FAILED"},{"text": "神器を手に持っていません。"}] diff --git a/TheSkyBlessing/data/debug/functions/artifact/tell_id/.mcfunction b/TheSkyBlessing/data/debug/functions/artifact/tell_id/.mcfunction new file mode 100644 index 0000000000..e1271dbfc2 --- /dev/null +++ b/TheSkyBlessing/data/debug/functions/artifact/tell_id/.mcfunction @@ -0,0 +1,20 @@ +#> debug:artifact/tell_id/ +# +# 利き手に持っている神器のIDを表示します。 +# 「コレ何番?」 +# +# @private +# @user + + +# 実行者が居ない場合エラー + execute unless entity @s[type=player] run return run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text": "実行者を指定してください。"}] + +# 取得 + function api:data_get/selected_item + +# 表示 + execute if data storage api: SelectedItem.tag.TSB.ID run tellraw @s [{"storage":"global","nbt":"Prefix.DEBUG"},{"text":"神器ID: "},{"storage":"api:","nbt":"SelectedItem.tag.TSB.ID"}] + +# 神器を持っていない場合 + execute unless data storage api: SelectedItem.tag.TSB.ID run tellraw @s [{"storage":"global","nbt":"Prefix.FAILED"},{"text": "神器を手に持っていません。"}] diff --git a/TheSkyBlessing/data/debug/functions/artifact/tell_id/all.mcfunction b/TheSkyBlessing/data/debug/functions/artifact/tell_id/all.mcfunction new file mode 100644 index 0000000000..9c5a296b7a --- /dev/null +++ b/TheSkyBlessing/data/debug/functions/artifact/tell_id/all.mcfunction @@ -0,0 +1,35 @@ +#> debug:artifact/tell_id/all +# +# 装備している全ての神器のIDを表示します。 +# +# @private +# @user + + +# 実行者が居ない場合エラー + execute unless entity @s[type=player] run return run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text": "実行者を指定してください。"}] + +# 取得 + function api:data_get/selected_item + function api:data_get/inventory + +# 手持ち + execute if data storage api: SelectedItem.tag.TSB.ID run tellraw @s [{"storage":"global","nbt":"Prefix.DEBUG"},{"text":"メインハンド: "},{"storage":"api:","nbt":"SelectedItem.tag.TSB.ID"}] + execute if data storage api: Inventory[{Slot:-106b}].tag.TSB.ID run tellraw @s [{"storage":"global","nbt":"Prefix.DEBUG"},{"text":"オフハンド: "},{"storage":"api:","nbt":"Inventory[{Slot:-106b}].tag.TSB.ID"}] +# 装備 + execute unless data storage api: Inventory[{Slot:103b}].tag.TSB.ID run data modify storage api: Inventory[{Slot:103b}].tag.TSB.ID set value "-" + execute unless data storage api: Inventory[{Slot:102b}].tag.TSB.ID run data modify storage api: Inventory[{Slot:102b}].tag.TSB.ID set value "-" + execute unless data storage api: Inventory[{Slot:101b}].tag.TSB.ID run data modify storage api: Inventory[{Slot:101b}].tag.TSB.ID set value "-" + execute unless data storage api: Inventory[{Slot:100b}].tag.TSB.ID run data modify storage api: Inventory[{Slot:100b}].tag.TSB.ID set value "-" + tellraw @s [{"storage":"global","nbt":"Prefix.DEBUG"},{"text":"頭胴脚足: "},{"storage":"api:","nbt":"Inventory[{Slot:103b}].tag.TSB.ID"},{"text":", "},{"storage":"api:","nbt":"Inventory[{Slot:102b}].tag.TSB.ID"},{"text":", "},{"storage":"api:","nbt":"Inventory[{Slot:101b}].tag.TSB.ID"},{"text":", "},{"storage":"api:","nbt":"Inventory[{Slot:100b}].tag.TSB.ID"}] +# ホットバー + execute unless data storage api: Inventory[{Slot:0b}].tag.TSB.ID run data modify storage api: Inventory[{Slot:0b}].tag.TSB.ID set value "-" + execute unless data storage api: Inventory[{Slot:1b}].tag.TSB.ID run data modify storage api: Inventory[{Slot:1b}].tag.TSB.ID set value "-" + execute unless data storage api: Inventory[{Slot:2b}].tag.TSB.ID run data modify storage api: Inventory[{Slot:2b}].tag.TSB.ID set value "-" + execute unless data storage api: Inventory[{Slot:3b}].tag.TSB.ID run data modify storage api: Inventory[{Slot:3b}].tag.TSB.ID set value "-" + execute unless data storage api: Inventory[{Slot:4b}].tag.TSB.ID run data modify storage api: Inventory[{Slot:4b}].tag.TSB.ID set value "-" + execute unless data storage api: Inventory[{Slot:5b}].tag.TSB.ID run data modify storage api: Inventory[{Slot:5b}].tag.TSB.ID set value "-" + execute unless data storage api: Inventory[{Slot:6b}].tag.TSB.ID run data modify storage api: Inventory[{Slot:6b}].tag.TSB.ID set value "-" + execute unless data storage api: Inventory[{Slot:7b}].tag.TSB.ID run data modify storage api: Inventory[{Slot:7b}].tag.TSB.ID set value "-" + execute unless data storage api: Inventory[{Slot:8b}].tag.TSB.ID run data modify storage api: Inventory[{Slot:8b}].tag.TSB.ID set value "-" + tellraw @s [{"storage":"global","nbt":"Prefix.DEBUG"},{"text":"ホットバー: "},{"storage":"api:","nbt":"Inventory[{Slot:0b}].tag.TSB.ID"},{"text": ", "},{"storage":"api:","nbt":"Inventory[{Slot:1b}].tag.TSB.ID"},{"text": ", "},{"storage":"api:","nbt":"Inventory[{Slot:2b}].tag.TSB.ID"},{"text": ", "},{"storage":"api:","nbt":"Inventory[{Slot:3b}].tag.TSB.ID"},{"text": ", "},{"storage":"api:","nbt":"Inventory[{Slot:4b}].tag.TSB.ID"},{"text": ", "},{"storage":"api:","nbt":"Inventory[{Slot:5b}].tag.TSB.ID"},{"text": ", "},{"storage":"api:","nbt":"Inventory[{Slot:6b}].tag.TSB.ID"},{"text": ", "},{"storage":"api:","nbt":"Inventory[{Slot:7b}].tag.TSB.ID"},{"text": ", "},{"storage":"api:","nbt":"Inventory[{Slot:8b}].tag.TSB.ID"}]