When player travels through nether portal which is outside the world border in overworld, the game will fail to create nether portal in overworld and spam the console with stack trace mentioned below. Player is suspended at world spawn falling at couple thousand negative y value with chunk status in F3 being "Waiting for chunk"
Steps to reproduce
/execute in minecraft:the_nether run tp 4000000 130 0
/setblock 4000000 127 0 minecraft:nether_portal
Go through this nether portal
Check console for the error "Unable to create a portal, likely target out of worldborder"
Wait for a bit and then the stack trace will appear
Stacktrace
Failed to handle packet zx$b@3a4e30d2, suppressing error
java.lang.NullPointerException: Cannot invoke "it.unimi.dsi.fastutil.objects.ObjectSet.remove(Object)" because "$$4" is null
at ahw.b(SourceFile:231) ~[minecraft-23w16a-client.jar:?]
at ahq.a(SourceFile:1132) ~[minecraft-23w16a-client.jar:?]
at aib.a(SourceFile:471) ~[minecraft-23w16a-client.jar:?]
at aiw.a(SourceFile:1000) ~[minecraft-23w16a-client.jar:?]
at zx.a(SourceFile:114) ~[minecraft-23w16a-client.jar:?]
at zx$b.a(SourceFile:16) ~[minecraft-23w16a-client.jar:?]
at uq.a(SourceFile:22) ~[minecraft-23w16a-client.jar:?]
at adi.run(SourceFile:18) ~[minecraft-23w16a-client.jar:?]
at bci.d(SourceFile:156) ~[minecraft-23w16a-client.jar:?]
at bcm.d(SourceFile:23) ~[minecraft-23w16a-client.jar:?]
at net.minecraft.server.MinecraftServer.b(SourceFile:784) ~[minecraft-23w16a-client.jar:?]
at net.minecraft.server.MinecraftServer.d(SourceFile:163) ~[minecraft-23w16a-client.jar:?]
at bci.x(SourceFile:130) ~[minecraft-23w16a-client.jar:?]
at net.minecraft.server.MinecraftServer.bg(SourceFile:766) ~[minecraft-23w16a-client.jar:?]
at net.minecraft.server.MinecraftServer.x(SourceFile:760) ~[minecraft-23w16a-client.jar:?]
at bci.bp(SourceFile:115) ~[minecraft-23w16a-client.jar:?]
at net.minecraft.server.MinecraftServer.j_(SourceFile:744) ~[minecraft-23w16a-client.jar:?]
at net.minecraft.server.MinecraftServer.w(SourceFile:677) ~[minecraft-23w16a-client.jar:?]
at net.minecraft.server.MinecraftServer.a(SourceFile:264) ~[minecraft-23w16a-client.jar:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Linked issues
Comments 8
I just tested it in latest snapshot and it seems to be gone. I guess this was fixed somehow. This bug report can be closed. Thanks
Can confirm in 1.20.6, the bug only occurs in specific seeds and at specific coordinates. The seed I used was -7758649986327837072 and portal coords were 12550699, 71, 12550422 (the bottom left block of a typical 4x5 portal).
Note: you don't have to make the portal at exactly the above coords, or even in the same chunk. All portals within a ~50❓ block radius experience this bug
Can confirm. AdyTech99's seed and coordinates do indeed result to same issue and same stacktrace.
This issue needs to be reopened.
Just tested in latest snapshot, instead of the stacktrace, it simply logs error "Unable to create a portal, likely target out of worldborder" and player never teleports into overworld. However unlike previous versions, it doesn't freeze or become unresponsive
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 exposed to air in the corner chunk for it to be successful in generating a portal.
Works:
[media]Fails:
[media]As for the stacktrace,
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.
@unknown opened a new issue (MC-272241), where you can add any extra information you have.
I'm unable to reproduce this. Is this still an issue for you in the latest release and/or snapshot?