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

Players' positions are desynced after stopping movement while moving the camera

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.20.2 Pre-release 1
    • 1.19.2, 1.19.4, 1.20 Pre-release 6
    • None
    • Community Consensus
    • Networking
    • Normal
    • Platform

      The Bug:

      Players' positions are desynced after stopping movement while moving the camera.

      This bug regularly causes position desyncs on the client for every single entity. Gameplay will often not be impacted, but it can be visually jarring/confusing for players. This desync occurs due to the incorrect handling of ClientboundMoveEntityPacket which overrides previous lerp values.

      https://youtu.be/da_hIu-LHPk

      Steps to Reproduce:

      1. Get two players and label them "Player A" and "Player B".
      2. Get "Player A" to jump and move their camera as they're about to land, and have "Player B" watch them.
      3. After "Player A" has landed, have "Player B" watch and see if the position of "Player A" eventually updates and moves downwards slightly.
      4. Take note as to whether or not players' positions are desynced after stopping movement while moving the camera.

      Observed Behavior:

      Players' positions are desynced.

      Expected Behavior:

      Players' positions would not be desynced.

      Potential Fix:

      In the `hasRotation` branch of handleMoveEntity(ClientboundMoveEntityPacket), use the position tracked by the VecDeltaCodec instead of the entity's getX, getY and getZ methods.

        1. bugged.mp4
          1.42 MB
          Neliz_
        2. fixed.mp4
          1.97 MB
          Neliz_
        3. MC-255263.mp4
          3.22 MB
          [Mod] Avoma
        4. MC-255263.png
          1.19 MB
          [Mod] Avoma

            Unassigned Unassigned
            Moulberry James Jenour
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: