mojira.dev
MC-148533

/data cannot copy to other slots of chest than it came from the players inventory

there is no way to copy 

Inventory[{Slot:9b}]

from a player to

Items[{Slot:0b}]

of a chest, if you try to do this, slot: 9b copies to slot 9b only, and even if the data is incorrect if there is an item in that slot, it will give an error for that data already being there.

 

command used:

 

/data modify block -1 4 7 Items[{Slot:0b}] set from entity @p Inventory[{Slot:9b}]

 

Attachments

Comments 2

Please do not mark unreleased versions as affected.
You don't have access to them yet.

Slot is part of the compound that gets copied over, so it ends up in the same slot. This is possible to accomplish, you just need an intermediary NBT storage area where you can set Slot to the desired number.

yellowcamper

(Unassigned)

Unconfirmed

/data, /data-modify

Minecraft 1.13.2, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14, Minecraft 1.14.1 Pre-Release 1, Minecraft 1.14.1 Pre-Release 2, Minecraft 1.14.2, Minecraft 1.14.3 Pre-Release 2

Retrieved