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

Continuously teleporting a player relative to command block causes a desync

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.14.4
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      OpenJDK 1.8.0_222
    • Confirmation Status:
      Unconfirmed
    • Category:
      (Unassigned)

      Description

      To reproduce the bug, simply create a repeating command block containing /tp @p ~ ~ ~ and activate it.

      The server-side client will freeze in place as expected, but the client is free to move around. Breaking blocks is impossible past the intended 6m radius, but placing blocks and interacting with them is impossible entirely.

      The reason is that the server still uses the relative teleport flags for the ~ syntax, and the client confirms it too late; here's a pastebin of the relevant packets: https://pastebin.com/pgFsQcz8. From this I can deduce that the server thinks that there's no need to update the client's position, since from its point of view it's already been teleported to the correct location (even though the position of the player changed since the packet was sent, making its new position invalid).

      The fix would be to use absolute coordinate flags instead of relative. Maybe there's a check that hasn't been updated for the 1.13+ syntax of teleport?

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            hyperpony Selicre
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: