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

Behavior of entities sent through portal depends on destination chunk being loaded

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.21
    • None
    • Confirmed
    • Chunk loading, Entities
    • Normal
    • Platform

      The behavior of entities sent through a portal depends on whether the destination chunk already was loaded when the entities passed through.

      Reproduction steps

      1. Build this setup in a new world. The dispenser contains minecarts.
      2. Run /tick freeze
      3. Click the button to activate the dispenser.
      4. Run /tick step 16 to dispense a minecart, pausing the game right after the tick that it teleports to the Nether.
      5. Go through the portal and observe the position of the minecart: It is centered in the portal block that it teleported to. Use the /data command to list its properties.
      6. Go back to the Overworld and /tick step 4
      7. Repeat steps (3) and (4); this time the destination chunks in the Nether will already be loaded when the minecart travels through the portal.
      8. Go through the portal again and observe the position of the second minecart: It has moved after it was teleported.
      9. Use the /data command to list the properties of the minecart and observe that several physics properties differ from the minecart of step (5):
        1. Pos, Motion, and FallDistance properties differ.
        2. PortalCooldown of both minecarts is 300, indicating that they haven't been ticked after they went through the portal.

      Repeating steps (6) to (8) will yield the same result. By running /tick sprint 300 in-between steps (6) and (7) and have the destination portal ticket expire, the result of step (5) can be produced again.

      Expected behavior

      I expected the physics of entities going through a portal to be unaffected by whether the destination chunk already is loaded or not.

      Given no collisions, the physics properties of an entity should be given by its physics properties in the previous tick. Entities that are sent through a portal with identical physics properties should also behave identical on the other side.

      Background

      The reported behavior was observed when working with a minecart-based chunk loader. While a roundtrip to the Nether and back usually took 43 game ticks for the minecart, sometimes it would take longer. By testing, I noticed that this correlated with whether the Nether side of the chunk loader was loaded or not.

      When the Nether side is not loaded, generally it takes 1 tick longer for the minecart to reach and collide with a cactus on Nether side, thereby delaying the entire roundtrip.

        1. A.png
          A.png
          752 kB
        2. B.png
          B.png
          736 kB
        3. C.png
          C.png
          1.05 MB
        4. D.png
          D.png
          1008 kB

            Unassigned Unassigned
            Nergalic Philip Børgesen
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              CHK: