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

Teleporting ridden entity in unloaded chunks does not cause chunks to load for riding player

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 23w12a
    • Minecraft 14w02b, Minecraft 14w02c, Minecraft 14w03a, Minecraft 14w05a, Minecraft 14w07a, Minecraft 14w08a, Minecraft 14w10a, Minecraft 14w17a, Minecraft 14w19a, Minecraft 14w25a, Minecraft 14w28a, Minecraft 14w28b, Minecraft 14w30a, Minecraft 14w31a, Minecraft 14w32b, Minecraft 14w33a, Minecraft 14w34d, Minecraft 1.8-pre1, Minecraft 1.8-pre3, Minecraft 1.8, Minecraft 1.8.3, Minecraft 15w49b, Minecraft 16w33a, Minecraft 1.11.2, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 1.13-pre8, Minecraft 1.13, Minecraft 18w30b, Minecraft 18w31a, Minecraft 18w32a, Minecraft 18w33a, Minecraft 1.13.1-pre1, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w43b, Minecraft 18w45a, Minecraft 18w46a, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 19w04b, Minecraft 19w07a, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, Minecraft 1.14.3, 1.14.4, 1.15.2, 20w08a, 20w12a, 20w14a, 20w19a, 20w21a, 20w22a, 1.16 Pre-release 3, 1.16 Pre-release 5, 1.16 Pre-release 7, 1.16 Release Candidate 1, 1.16, 1.16.1, 20w29a, 1.16.2, 1.16.4, 20w51a, 21w03a, 1.16.5, 21w05a, 21w05b, 21w06a, 1.17, 1.18, 1.18.1, 1.19, 1.19.2, 23w04a
    • Confirmed
    • Entities, Networking, Player
    • Important
    • Platform

      The bug

      Teleporting an entity which is ridden by a player into unloaded chunks teleports the player (client-side) but does not load the chunks.

      In current versions, the player becomes stuck visually at their current position and their screen jitters, but the coordinates on the debug screen show that they moved some (but not the complete) distance.

      In 1.18, the boat teleports but the player desyncs and cannot interact with anything that is not near the location where they typed the command.

      As of 23w04a, teleporting the boat into unloaded chunks dismounts the player client-side. If the player tries breaking or placing blocks after running the command, these actions will generally be invalidated by the server, although in some circumstances they seem to work even though the server thinks the player is far away. The F3 coordinates seem to consistently reflect where the player appears to be (on the client). If the player runs /ride @s dismount or relogs, they will be teleported to the boat and will load the chunks around it.

      How to reproduce

      1. Place a boat and enter it
      2. Use the following command
        /tp @e[type=minecraft:boat,sort=nearest] ~ ~ ~5000
        
      3. Enable the debug information
        → You will see that you were teleported (client-side), but using for example commands which print the block coordinates like /execute if block ~ ~ ~ air run say @s show that server-side you have not moved

      The screenshots show a mounted horse before teleporting at 0,1000; the "void" after teleporting the horse; and the mounted horse at 0,5000 right after relogging.

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The reason is the same one as for MC-92916 and MC-108469: The method net.minecraft.world.World.updateEntityWithOptionalForce(Entity, boolean) does not update entities which are not in loaded chunks server-side. The problem here is that the riding player is not instantly moved with the ridden entity but instead when the method Entity.updateRidden() is called, which in this case never happens because the area around the ridden entity is not loaded.

        1. before_teleporting.png
          before_teleporting.png
          154 kB
        2. after_teleporting.png
          after_teleporting.png
          494 kB
        3. after_relogging.png
          after_relogging.png
          554 kB
        4. 2019-06-24 13-58-18.mp4
          4.28 MB

            Unassigned Unassigned
            Asteraoth [Mod] Asteraoth
            Votes:
            37 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: