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.
Linked Issues
is duplicated by10
- Fixed
Steven W.d.V.
[Mojang] Bartosz Bok
- 25
- 17
- Confirmed
Normal
- Inventory Networking
- /clear /replaceitem inventory
15w34d - 1.16.3
15w34d 15w36c 15w37a 15w38b 15w39b 15w39c 15w40b 15w41b 15w42a 15w43b 15w43c 15w44a 15w44b 15w45a 15w46a 15w47a 15w47c 15w51b 1.9-pre1 1.9-pre2 1.10.2 16w35a 16w42a 16w43a 16w44a 1.11-pre1 1.11 16w50a 1.11.1 1.11.2 17w06a 17w13b 17w15a 17w16b 17w17b 17w18b 1.12-pre2 1.12.2 1.13-pre5 1.14.2 1.15.2 1.16-rc1 1.16 1.16.1 1.16.2-pre1 1.16.2-pre2 1.16.2-rc1 1.16.2 1.16.3- 21w10a
Created Issue:
/replaceitem doesn't work for offhand when creative inventory is opened
/replaceitem (eg. /replaceitem entity @p slot.weapon.offhand minecraft:dirt 1 0) doesn't work for the offhand (only) when the creative inventory is open (it doesn't change the item). It does change it if you're at the survival inventory tab, though.
Environment
JRE8u60x64, Win10
relates to
JRE8u6
0x64, Win10JRE8u66x64, Win10
/replaceitem (eg. /replaceitem entity @p slot.weapon.offhand minecraft:dirt 1 0) doesn't work for the offhand (only) when the creative inventory is open (it doesn't change the item). It does change it if you're at the survival inventory tab, though.
/replaceitem (eg. /replaceitem entity @p slot.weapon.offhand minecraft:dirt 1 0) doesn't work for the offhand (only) when the creative inventory is open (it doesn't change the item). It does change it if you're at the survival inventory tab, though.
However, after reopening the world the item is actually changed (if you don't take it out of the slot before reopening).
JRE8u
66x64, Win10JRE8u74x64, Win10, launcher 1.6.51
/replaceitem (eg. /replaceitem entity @p slot.weapon.offhand minecraft:dirt 1 0) doesn't work for the offhand (only) when the creative inventory is open (it doesn't change the item). It does change it if you're at the survival inventory tab, though.
However, after reopening the world the item isactually changed (if you don't take it out of the slot before reopening).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 updatedWhen 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.
JRE8u74x64, Win10, launcher 1.6.51
/replaceitem doesn't work for offhand when creative inventory is openedOnly visible slots are updated clientside when you are inside an inventory
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 updatedWhen 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.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.
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.
Example: how to reproduce:
- Setup 2 command blocks with significant delay running in a loop, with commands like the following:
/replaceitem entity @p container.10 minecraft:brickthe 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.
is duplicated by
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.
Example: how to reproduce:
- Setup 2 command blocks with significant delay running in a loop, with commands like the following:
/replaceitem entity @p container.10 minecraft:brickthe 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.
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:
/replaceitem entity @p container.10 minecraft:brickthe 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.
is duplicated by
is duplicated by
is duplicated by
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:
/replaceitem entity @p container.10 minecraft:brickthe 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.
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:brickthe 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.
Does MC-87019 describe your issue?
Thank you for your report!
However, we are already tracking this issue, and this report is a Duplicate of MC-87019, which is a report that has not been resolved yet.
If you want, you can upvote the parent ticket, and enable watching to receive any updates about it - if you believe you have any information that may be important for this issue, please leave a comment on the parent. Please also use the search function in the future to prevent duplicate reports.
Quick Links:
📓 Issue Guidelines – 🛠 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki
💬 Mojira Subreddit – 💬 Mojira Discord
Sounds like this might be the same issue as MC-87019?
Duplicate of MC-87019
Duplicate of MC-87019
Thank you for your report!
We're tracking this issue in MC-87019, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki
Thank you for your report!
We're actually already tracking this issue in MC-87019, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any additional information to the main ticket it would be appreciated.
Please be sure to use the search feature before creating a ticket to see if the issue has already been reported.
Quick Links:
📓 Issue Guidelines – 🛠 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 💬 Mojira Discord
This falls under the same issue as MC-87019, but while it was resolved for commands like /clear and /replaceitem, the mending enchantment still doesn't repair gear that is in a non-visible slot.
For clarification, I'm using non-visible slot to refer to a slot in the player's inventory that isn't currently visible due to having another inventory open. For example, offhand and armor slots aren't visible while looking in a chest (this is what made me notice the bug).
Confirmed for
Relates to:
MC-2912: The items seem to appear after reopening the worldThanks
Why is the state of this issue still Unconfirmed?
This still affects 1.12.2. Very annoying for my game.
Still affects 1.13, 1.14, 1.15, 1.16.
The NBT of Inventory is actually updated correctly. For example, if you replace a gold block in your offhand with diamond block and trigger this bug, what is displayed in your inventory is gold block. but if you place it, it turns out to be diamond block. So it seems to be a client-side display bug.
But what is weird is that the item that has triggered this bug can be regained if you place it to another slot or just throw it away and pick it up, which means it is more than just a display bug.
Confirmed in 1.15.2 and 1.16 Release Candidate 1.
Confirmed in 1.16.1.
Also applies when the player is looking at a non-inventory GUI such as a book on a lectern–the player's hotbar and offhand will not update when those GUIs are open, causing ghost items.
Note that the lectern is actually internally/over the network an inventory (while held books are not).
Can confirm on 1.16.4
1.16.4 is not out yet tho
Updated command usage for /item: