-
Bug
-
Resolution: Duplicate
-
None
-
21w03a
-
None
-
Unconfirmed
-
(Unassigned)
Replacing items in the player inventory succesfully update the Inventory tag (as can be seen with /data get entity @s Inventory) but most times doesn't do so with the GUI.
If the new item is a block, it can be placed but the icon, name, lore, etc. displayed in the GUI are still those of the prevoius item.
If the item replacing the previous one is a consumable, like a splash potions, ender pearls, etc. it can't be used.
As about how to reproduce the bug, I'm not very sure as its behaviour seems to be very erratic.
For sure it happens if the item is replace when the player is using the GUI of some block, like a crafting table.
I'm pretty sure one time it also happened with no GUI open when I was hust trying to replace an item in the hotbar but I wasn't able to reproduce this.
The command that I was trying to run in the first place when I discovered the bug was the following:
execute if data entity @s Inventory[{Slot:0b, id:"minecraft:command_block_minecart"}] run item entity @s hotbar.0 replace minecraft:splash_potion{display:{Name:'{"text":"Glow Ink Bottle","italic":false}'},CustomPotionColor:4647909} 1
Called from a function that's run every time the player use a custom recipe.
Also, I think this is likely closely related to these other bugs previously fixed:
- duplicates
-
MC-219018 Ghost items can be created using /item (server doesn't update client inventory correctly)
- Resolved