diff --git a/data/skill/functions/act/common/restore_item/restore/.mcfunction b/data/skill/functions/act/common/restore_item/restore/.mcfunction index 7c3a65889..b93df7683 100644 --- a/data/skill/functions/act/common/restore_item/restore/.mcfunction +++ b/data/skill/functions/act/common/restore_item/restore/.mcfunction @@ -3,6 +3,13 @@ function #oh_my_dat:please data modify storage tusb_player: RestoreItem set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].RestoreItemData[-1] data remove storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].RestoreItemData[-1] +#復活地点調整 AnywhereTeleport処理を利用 +data modify storage anywhere: at set from storage tusb_player: RestoreItem.RaisePoint +execute at @s run function #anywhere:tp + +# ピクニック時所持してたアイテムを落とす +execute if data storage main: difficult{world:"picnic"} at @s run function skill:act/common/restore_item/restore/picnic/ + # オフハンド data remove storage item: Item data modify storage item: Item set from storage tusb_player: RestoreItem.Items[{Slot:-106b}] @@ -71,9 +78,5 @@ loot replace entity @s inventory.0 27 mine 2 2 2 debug_stick execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].RestoreItemData[-1] run tag @s remove HasRestoreItems -#復活地点調整 AnywhereTeleport処理を利用 -data modify storage anywhere: at set from storage tusb_player: RestoreItem.RaisePoint -execute at @s run function #anywhere:tp - tellraw @s {"translate":"インベントリと位置情報を復元しました。","color":"green"} execute at @s run function makeup:skill/act/common/restore_item/return diff --git a/data/skill/functions/act/common/restore_item/restore/picnic/.mcfunction b/data/skill/functions/act/common/restore_item/restore/picnic/.mcfunction new file mode 100644 index 000000000..65beec020 --- /dev/null +++ b/data/skill/functions/act/common/restore_item/restore/picnic/.mcfunction @@ -0,0 +1,4 @@ +# ピクニックのとき、生前持っていたアイテムはその場に返却 +data modify storage item: Items set from entity @s Inventory +data remove storage item: Items[].Slot +function skill:act/common/restore_item/restore/picnic/loop diff --git a/data/skill/functions/act/common/restore_item/restore/picnic/loop.mcfunction b/data/skill/functions/act/common/restore_item/restore/picnic/loop.mcfunction new file mode 100644 index 000000000..edc8a40cd --- /dev/null +++ b/data/skill/functions/act/common/restore_item/restore/picnic/loop.mcfunction @@ -0,0 +1,7 @@ + +summon item ~ ~ ~ {Tags:[Initializing],PickupDelay:0s,Item:{id:"minecraft:stone",Count:1b}} +data modify entity @e[tag=Initializing,distance=0,limit=1] Item set from storage item: Items[-1] +tag @e[distance=0,tag=Initializing] remove Initializing +data remove storage item: Items[-1] + +execute if data storage item: Items[-1] run function skill:act/common/restore_item/restore/picnic/loop