The bug
Some actions in the game apply the same NBT object instance to multiple items, entities or tile entities. This means if you edit it for one of them you basically edit it for all of them.
This could in theory happen with non-NBT data as well, but at least in the current versions this is not the case because either:
the data is stored in primitive types and therefor no objects are involved
the data is provided in NBT format but then parsed and stored with objects; therefor no reference to the NBT data exists anymore
Some of the cases listed below might happen when the NBT data is read or written by entities or tile entities. The expected fix is however not to have them always create a copy because that would slow down saving and loading worlds. Instead the methods calling these methods should create a copy before respectively after.
The reason why this report contains a list of all cases, even the ones which are not affected, is to have an overview and make it easier to detect new cases in which this happens.
Actions
Affected key
Symbol | Meaning |
---|---|
✔ | Affected |
❌ | Not affected |
⚠️ | Currently not affected, but current behavior is listed as bug and therefor likely affected in the future |
List
Based on 1.11.2 decompiled using MCP 9.35 rc1
Last updated for 1.11.2
Likely incomplete
Action | Affected | Comment | Affected method |
---|---|---|---|
Pick block with NBT | ⚠️ | Currently happens client-side, but should happen server-side |
|
Copying items in Creative | ❌ | - | - |
Crafting: Cloning books | ❌ | - | - |
Crafting: Cloning banners | ❌ | - | - |
Crafting: Cloning maps | ✔ | - |
|
Creating item in Creative with | ✔ | - |
|
Using item with | ✔ | Dispenser, spawn eggs, armor stand... |
|
Item with | ❌ | - | - |
Items from loottables | ❌ | Uses | - |
Items from villagers | ❌ | - | - |
Splitting item stacks | ❌ | - | - |
Hopper (minecart) item actions | ❌ | - | - |
Droppers transferring items | ❌ | - | - |
Cleaning banner in cauldron | ❌ | - | - |
Cleaning leather armor in cauldron | ⚠️ | Even in Creative stack is replaced and water level reduced, not the case with banners, see MC-114105 |
|
Putting item on armor stand | ❌ | - | - |
Using firework | ❌ | - | - |
Putting item in item frame | ⚠️ | Only cloned when not empty, but even if empty set as item |
|
Putting chest on donkey or mule | ⚠️ | Entity does not store item data but only boolean, see MC-91005 | - |
Putting saddle on pig | ⚠️ | Entity does not store item data but only boolean, see MC-91005 | - |
Dispenser / dropper dropping item | ❌ | - | - |
Dispenser placing player skull | ❌ |
| - |
Dispenser shooting tipped arrow | ❌ | Potion effects are read and stored | - |
Dispenser throwing splash or lingering potion | ❌ | - | - |
Dispenser equipping armor (including pumpkin, elytra and skull) | ❌ | - | - |
Dispenser playing shulker box | ❌ | - | - |
| ✔ | See paragraph "How to reproduce" for reproduction |
|
| ❌ | Fixed, see MC-163953 |
|
| ❌ | Runs for each entity seperately and uses | - |
| ❌ | Runs for each entity seperately | - |
Structure blocks loading and saving | ✔ | See MC-114030 | - |
How to reproduce
Some of these cases cannot be reproduced because other actions only override the affected data instead of modifying it, or other actions create a copy before you could try to reproduce them. Therefor here are only reproduction steps for some actions.
/clone
Place a spawner
/setblock ~ ~ ~ spawner{SpawnData:{id:"armor_stand"},SpawnCount:0s,SpawnRange:0s,MinSpawnDelay:0s,MaxSpawnDelay:0s,MaxNearbyEntities:1s,RequiredPlayerRange:16s,SpawnPotentials:[{Weight:1,Entity:{id:"bat"}}]}
Stand on top of the spawner and run the following command
/clone ~ ~-1 ~ ~ ~-1 ~ ~2 ~-1 ~
For the cloned spawner
Make it switch to the
SpawnPotentials
(stand on top of it while running the command)/data modify block ~ ~-1 ~ SpawnCount set value 1b
Right click the spawner with a creeper spawn egg
For the original spawner
Inspect the NBT data
/data get block ~ ~-1 ~ SpawnPotentials
❌ It shows
"minecraft:creeper"
as entry for theSpawnPotentials
instead of"minecraft:bat"
/fill
Fixed by MC-163953 ❓
Linked issues
Comments 4

@unknown, you are thinking about MC-92191 (already fixed)
Unable to reproduce for /fill and /clone as of 20w07a.
edit: /clone still reproducible

Can confirm in 1.20.1.
once upon a time, I recall that doing entitydata on a ThrownPotion to change the potion details would cause the potion item in my inventory to also change, which sounds like a similar thing (have not tried to repro now)