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

Client misses inventory updates while player is manipulating items - causes invisible items

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened
    • Resolution: Unresolved
    • 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
    • Confirmation Status:
      Confirmed
    • Category:
      Networking

      Description

      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:

      1. open the furnace gui
      2. place charcoal/coal and keep some item in your inventory
      3. place something to be cooked into the furnace
      4. 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.

      1. Put a command block on a clock, with a command such as:
      • /replaceitem entity @p slot.inventory.0 golden_apple
      • This will put a golden apple in the first slot of your inventory.
      1. Open your inventory, and move the golden apple to another slot
      2. 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
        "[@: Replaced slot 9 with 1 x [Golden Apple]]"
      1. Turn off the clock
      2. Exit the world
      3. 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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                smjert Stefano Bonicatti
              • Votes:
                28 Vote for this issue
                Watchers:
                19 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: