Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-213111

The new /item command doesn't update the GUI when replacing items in the player inventory

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: 21w03a
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Unconfirmed
    • Category:
      (Unassigned)

      Description

      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:

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              Medr4wt Daniele Quasimodo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: