When trying to edit the contents of a chest and selecting a specific slot iside of Items[], on top of editing that slot, the contents of Items[0] will be removed.
As explained by Franco Caprile in the comments, the issue seems to be caused by the Slot tag being copied, overriding the index used to select what slot to put the info into.
Recreating the issue:
- Place a chest and fill its first three slots with items.
- Run
/data modify block [x] [y] [z] Items[1] set value {anything_works_here:2711}
As you can see, this would delete the contents of slot 2 as expected, but ends up removing slot 1 in the process as well. Any other slots work properly as illustrated by slot 3.
- duplicates
-
MC-141876 /data modify with multiple values nbt remove an item on Slot:0b
- Open