-
Bug
-
Resolution: Duplicate
-
None
-
Minecraft 1.14.1
-
None
-
Unconfirmed
-
(Unassigned)
When using the following command in a command block that has an empty chest on top, it correctly adds a stack of iron ingots.
/data modify block ~ ~1 ~ Items append value {id:"iron_ingot",Count:64b}
ACTUAL
Executing it another time does nothing. The command still outputs "Modified block data of x, y, z".
I assume that's because items gain a default Slot tag when added to a container, and that is always 1, instead of being incremented to the next free slot.
This is not a duplicate of
MC-150999.
It's not intuitive that the command requires a Slot tag for every other time. It also doesn't make sense, when using a command named append, which in all other contexts adds an item to the end of a list, whatever it's current size. (same for prepend with the start of the list)
On top of that, Slot isn't part of the normal Item NBT (e.g. item entities don't have a Slot). It's only a property of containers (or inventories) to give items a temporary and virtual Slot tag When an item is removed from a container, it'll immediately lose the Slot tag.
EXPECTED
It should add another stack of iron ingots to the chest (in the next free slot).
- duplicates
-
MC-150999 data modify doesn't append values to Items list of Inventories
- Resolved