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

Inventory can rubberband due to server sending late packet responses

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.19.2
    • None
    • Java 17
    • Plausible
    • Networking
    • Normal
    • Platform

      Its very common thing that happens in server, but its actually from async packet responses from server.

       

      How to reproduce:

      In server with bad ping, just put items in hotbar, and shift click hotbars.

      Expected behavior : Items should not rubberband again to hotbar slots.

      Result : you might see items rubberbanding into hotbar again, but finally they will be sent to inventory.

       

      Or just use Keyboard keys.

       

      Explanation : Client also process ClickSlot actions, and expect where item should be at.

      Client but does not count revisions for it, even if exists, just accepts whatever server sends.

      Server process it too, and increments revisions, then send it sequentially.

       

      Lets say client have done 5 actions. Server might send response for 3 actions, then client rollbacks to when 3 actions have done even if client had correct state. (Server will continue sending response for leftovers too)

      If client do something expecting when 3 actions were done - but server does not consider where client synced to, it expects all 5 actions are sent to client and synced.

       

      Simple solution for this is, incrementing revision in client side, and matching it with server side. 

       

            Unassigned Unassigned
            definitelynotuser Chlorophyta Capsosiphonaceae
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: