When the command
/setblock ~ ~ ~ chest[facing=south]{Items:[
{id:"stone_pickaxe",Slot:1,Count:1}]}
is run when block ~ ~ ~ is not a chest, it places a chest with the correct nbt arguments (facing south, stone pickaxe in slot 1). The command
/execute store success score @s foo run setblock ~ ~ ~ chest[facing=south]{Items:[
{id:"stone_pickaxe",Slot:1,Count:1}]}
also sets variable foo to 1. However, when the first command is run again (i.e. there is now a chest at position ~ ~ ~), the chest becomes cleared of its inventory, and when the second command is run, variable foo turns to 0.
Note: in the screenshots, I have used the second command, and replaced "foo" with "test1", which can be seen on the scoreboard on the right.
Related issues
Attachments
Comments
