Mojira Archive
MC-87019

Only visible slots are updated clientside when you are inside an inventory

The bug

When you are inside an inventory (chest/horse/crafting table/creative inventory...) only visible slots are updated. This way, when you are inside:

  • Normal player inventory and Survival inventory tab in creative - everything is fine
  • Most inventories - armor and offhand slots are not updated
    Creative item/search tabs - only hotbar is updated
  • When you remove an item (/clear, /replaceitem with air) from a non-updating slot you get a ghost item - you can't use it properly and it disappears in survival when you update your inventory.
  • When you add an item (/replaceitem, pick up from ground) - you get an invisible item. It will reappear when you re-enter the world or (in survival) when you update this slot.

How to reproduce

  • Setup 2 command blocks with significant delay running in a loop, with commands like the following:
    /item entity @p container.10 replace minecraft:brick
    

    the second one with another block parameter;

  • Open the creative menu and switch away from your survival inventory (note that the bug doesn't occur when the menu is closed);
  • Wait for the command to switch the item and go back to your survival inventory: the item should be replaced but it is not: this is the issue;
  • Optional: relog and see the item is replaced after all.