When player travels through nether portal from nether side, which (after accounting for 8x nether distance) is outside the world border in overworld, the game will fail to create the nether portal in overworld, and logs "Unable to create a portal, likely target out of worldborder" in the console.
This appears to occur when the target location in the overworld is non-solid blocks. e.g: water or air.
Because of this, the bug does not occur at all coordinates, only the ones where the destination is a non-solid block. To replicate the issue, you can use my seed -7758649986327837072 and portal coordinates roughly 12550699, 71, 12550422 (nether side).
Steps to reproduce
Create a world with seed -7758649986327837072.
/execute in minecraft:the_nether run tp 12550699 71 12550422
/setblock 12550699 71 12550422 minecraft:nether_portal
Enter the portal.
Observed results:
In 1.20.6:
The game will freeze and put you in the void without generating chunks.
In 24w20a:
The game will not send you to the overworld.
Expected results:
The game sends you to the overworld and generates a proper portal.
Linked issues
Comments 3
This issue happens since 1.18 Pre-Release 1, and doesn't happen in 21w44a.
Probably relates to the fix of MC-187174.
I saw it right now on 1.21.4.
I wanted to go to The Nether and portal not work and in console is “[Server thread/ERROR]: Unable to create a portal, likely target out of worldborder”. The game simply refuses to create a portal in the Nether, but it does allow portals from the Nether to the Overworld.
Overworld > Nether ❌
Nether > Overworld ✅
Must note i using a lot of mods, but the only what changing generation are Terralith and Amplified Nether.
My seed: 2549117
How did I solve the problem?
I teleported to The Nether with /execute in the_nether run tp @s ~ ~ ~
and build portal myself. Then I just walked through it and it worked. (Just for this portal, not other.)
NOTE: I am not experienced with MC code at all, so I don't know if this is a problem with the dimension itself or purely with the portals. That's why I wanted to point it out. If my comment is completely off base, please let me know and feel free to delete it. Thanks.
Copy pasting from MC-262021
I have found the cause of the issue.
When overworld side has no landmass or solid blocks to place the nether portal on, ie, the corner of the world is water/ocean OR player manually clears it out, the game fails to place a portal and this issue comes to be.
Only reason it occured on some seeds not on others was because seeds it failed at had ocean or river in the corner. While the rest of them, they had landmass.
This is easily reproducible on every seed, every world if player does a /fill in overworld side and manually removes the land/solid blocks.
In my case I ran these command,
/gamerule commandModificationBlockLimit 1000000
/fill 29999983 68 29999983 29999943 -64 29999947 air
Game tries to generate regular portal but fails. It is unable to place portal with platform as well. And now player is unable to go into overworld.
Game NEEDS 4 solid blocks in a straight line exposed to air in the corner chunk for it to be successful in generating a portal.
Works:
[media]Fails:
[media]As for the stacktrace seen in MC-262021
Game runs DistanceManager#removePlayer a second time after client sends position update packet. Since the player on server is out of nether but hanging in the middle of nowhere, the playersPerChunk field is empty and there being no null check for the returned object, it throws.
Expected Result:
Game should be able to generate floating portal with platform if its unable to generate portal without platform.