My suggestion is very simple, it is to turn
Inventory:[{Slot:1b,id:"minecraft:stone",Count:1b},{Slot:4b,id:"minecraft:dirt",Count:2b}}
to
Inventory:[Slot1:{id:"minecraft:stone",Count:1b},Slot4:{id:"minecraft:dirt",Count:2b}}
There are many benefits to having the Slot on the outside of the rest of the data, for example, you can use execute store on items in specific slots like this:
execute as @a store result score @s score1 run data get entity @s Inventory.Slot1.Count
This was possible before, however it took ~40 commands for ONE slot
Please sign in to leave a comment.
3 Comments