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

Nether portals can be generated at edge of linking range, making linking appear to break.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.16.4, 1.17.1, 1.19.4, 23w12a, 1.20.4, 24w03b
    • None
    • Confirmed
    • (Unassigned)

      In rare (or forced) cases portals can generate outside the range that they can link.

      Steps to reproduce:

      1. Create a new creative world, and teleport to the origin (0 in x and y).
      2. Set your spawnpoint near here.
      3. Create a nether portal with the x and z coordinates being exactly 0. Have the obsidian go along the x axis so you enter the portal going facing in the + or - z direction.
      4. Go through the portal to the nether.
      5. Destroy the portal and fill all blocks (or at least all types of air) in the range -16 to 15 on x and z, and from 1 to 126 in y with a solid block, and ensure there is a platform for a portal to spawn outside this. This is easiest to do with the following commands:
        /gamerule commandModificationBlockLimit 150000
        /fill -32 ~-1 -32 31 ~-1 31 stone
        /fill -16 1 -16 15 126 15 glass
      6. Ensure there is space immediately adjacent to this area for portals to generate.
      7. Use /kill to return to the overworld.
      8. Travel through the portal again, ensuring you travel through 0,0, from positive z such that you are facing towards negative z.
      9. Notice that a portal has been generated just like a normal portal would.
      10. Observe that the new portal is created with a z coordinate of 16.
      11. Attempt to travel back through the portal and find yourself in a new portal in the overworld, with z ~128.
      12. Destroy the newly generated overworld portal and return to the nether.
      13. Remove some of the blocks added previously and enter the portal from the rear. Notice you now travel correctly to the original portal in the overworld.
      14. Destroy the created portal in the nether and expand the filled region to cover from -17 to 16.
        /fill -17 1 -17 16 126 16 glass
      15. Use /kill to return to the overworld.
      16. Travel through portal again (again from 0,0) and observe that now a portal is forced, and correctly links back up to the portal in the overworld, regardless of which side you enter from. This is similar to portal generation in most cases.

      Issue:

      The portal generates at the very edge of the linking radius (z=16).
      When you enter it from z=15, your z coordinate it less than 16, and thus the overworld coordinate to check distance from is less than z=128. The portal at 0,0 is thus within the range and it correctly sends you to the original portal.
      However, when you enter it from z=17, your position is greater than z=16, and thus your overworld coordinate which it checks against is greater than 128. This places the original portal block outside the 128 block radius and thus it is rejected as a destination. This causes the game to generate a new portal in the overworld.

      You may be able to have similar behaviour by starting at 0,0 in the nether and filling in a very large region of the overworld.

      Expected behaviour:

      A portal will only be generated by the game where stepping into it from any direction would return you to the original portal (assuming no other portals exists).

      Thus if you generate a portal, stepping back through this generated portal should return you to your original portal (again, assuming no other portal exists).

      Suggested fix:

      Lower the generation radius or increase the linking radius so all portal blocks in a generated portal can link back up to the original portal, regardless of how they are entered.
      Alternatively, use the portal block location to determine linking, not the player/entity position.

      Related issues:

      While this is related to some other issues focusing on nether portal range, I believe it is a separate issue and not a duplicate as they are focusing on the linking range being reduced/changed, while this focuses on generation of a portal at the very edge of the linking range and thus the apparent inconsistency/problems caused by the linking vs generation range.

            Unassigned Unassigned
            JackBlack Jeffrey Black
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              CHK: