Affects Version/s: Minecraft 1.6.2, Minecraft 14w30c, Minecraft 1.8.1, Minecraft 1.8.2-pre6, Minecraft 15w44b, Minecraft 1.8.9, Minecraft 16w05b, Minecraft 1.9 Pre-Release 4, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.4, Minecraft 1.10.2, Minecraft 16w35a, Minecraft 16w36a, Minecraft 16w39c, Minecraft 1.12, Minecraft 1.12.2, Minecraft 18w14b, Minecraft 1.13-pre2, Minecraft 1.13-pre5, Minecraft 1.13.1, Minecraft 1.14 Pre-Release 1
Fix Version/s: None
When using whatever container that automatically updates the contents of a slot (like a furnace) and if the player, with the container GUI open, is constantly moving items into the inventory, the player won't see the container slot update (like a raw steak being cooked).
How to reproduce:
- open the furnace gui
- place charcoal/coal and keep some item in your inventory
- place something to be cooked into the furnace
- when the progress bar is almost at the end, start continuosly left clicking an item in the inventory
What should happen is that the item to be cooked doesn't update (if it doesn't happen the first time, just retry), the progress bar has finished, and you won't have any item in the output slot, but if you click in it you will get the item cooked.
This also occurs with the /replaceitem command.
- Put a command block on a clock, with a command such as:
- This will put a golden apple in the first slot of your inventory.
- Open your inventory, and move the golden apple to another slot
- As soon as a new one appears, grab it and move it to another slot as well.
- If you got the timing right, the slot will appear blank, even though the command block output in the chat window continues to say
- Turn off the clock
- Exit the world
- Re-enter the world, and open your inventory
- There will be a golden apple in the first slot.
Why this happens:
This happen because there's a boolean in EntityPlayerMP that's set to true when the server receives a window click packet and then there the function that should send the slot updates is called, though if this boolean is true it will not send the packet to the client to update it (while the serverside thinks from the next update on that the client has received the update).
Basicly if the server code updates the content of some slots in the container (raw food to be removed, output slot set to cooked food) while the player is moving other items in the inventory.. it won't get the update.
So one way to fix this would be to know which slot is getting modified by player and block the updates only for that slot and not all the container slots. Another way would be having a resend list where clients that didn't got a certain slot update, get a resend of the packet from the server.