Last help, I swear, so i'm reading the nbt data from the player's tool and then using that data to fill the chest, but I get no broadcast on the loop and the chest is empty
`on rightclick on chest:
if name of player's tool is "Pick it up":
cancel event
set {_key} to "backup"
loop items in (event-block's inventory):
set {_s} to index of loop-slot
set {_i} to full nbt of loop-slot
set int tag "Slot" of {_i} to {_s}
add {_i} to {_i::}
set {_p} to chest with lore "Contains Inventory"
set {_NBT} to (custom nbt compound of {_p})
set (compound list tag "SavedInv;%{_key}%" of {_NBT}) to {_i::}
give player {_p}
on place of chest:
if lore of player's tool contains "Contains Inventory":
broadcast "test"
set {_key} to "backup"
set {_o} to player's tool
set {_p} to event-block
set {_i::} to compound list tag "custom;SavedInv;%{_key}%" of nbt of {_o}
loop {_i::}:
set {_s} to int tag "Slot" of loop-value
set {_i} to nbt item from loop-value
set slot {_s} of {_p} to {_i}
broadcast "%{_p}% %{_s}% %{_i}%"
#delete tag "custom;SavedInv;%{_key}%" of nbt of {_p}`