Background info: In Creative Mode, Pick block (default keybind: MOUSE3 or middle click) is a game control that puts the item version of the block you are looking at in your main hand. Holding down CTRL (or CMD on MacOS) will save the target's block NBT data into this item as well.
Bug: Using CTRL + Pick block on a chest with at least one item in it will produce an item that also has the "block_entity_data" item component on it along with the saved items. This component has position data pointing to (0, 0, 0).
What this affects: Saved chest items using this method may be subject to having their inventories replaced with the inventory of any chest at (0, 0, 0) if present
Steps to reproduce (Method 1):
- Place a chest "A" at (0, 0, 0) with any contents.
- Place another chest "B" elsewhere containing at least one item
- Perform CTRL + Pick Block on chest "B"
The resulting item will either contain the contents of chest "A" or "B", seemingly non-deterministically. You can check this by placing it down or using the built-in /data command to view its NBT data.
Steps to reproduce (Method 2):
- In a Spigot server, perform CTRL + Pick Block on a chest "C" with at least one item in it
- Save this item to the Saved Hotbars section of the Creative Inventory
- Quit this server and log onto any secondary server (e.g. Spigot, dedicated Vanilla, integrated Singleplayer)
- Place a chest "D" at (0, 0, 0), and grab the previously saved chest item from the Creative Menu
The resulting item will either contain the contents of chest "C" or "D", seemingly non-deterministically. You can check this by placing it down or using the built-in /data command to view its NBT data. Please note that this does not occur if the chest "C" was picked and saved in a non-Spigot (e.g. dedicated Vanilla) server.
In this description I've only mentioned chests specifically, but I've also observed this same behavior with barrels and furnaces; it likely affects every container block type.
I have confirmed (by using /data to view the resulting item in my inventory) that the saving of "block_entity_data" on CTRL+Pick Block does not happen in the integrated vanilla singleplayer server and does not happen in the dedicated vanilla Mojang server.