-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Minor
-
None
-
Affects Version/s: None
-
None
-
Environment:
macOS 10.13.4 Beta (17E182a)
Java(TM) SE Runtime Environment (build 9+181)
CraftBukkit version git-Bukkit-aa25568 (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT)
Going through the exit portal from THE_END -> NORMAL spawns you at the exact spawn point (without any randomness) or exact bed spawn without any adjustment (normally +0.5, +0.1, +0.5).
The simplest fix for this is to add this line to PlayerList.changeDimension():
if ((cause == TeleportCause.END_PORTAL) && (i == 0)) { exit = null; }
Before the existing line:
this.moveToWorld(entityplayer, exitWorld.dimension, true, exit, true); // SPIGOT-3864
That way moveToWorld() will deal with spawning the player in the correct location.
You could also change the existing line to the following if you would prefer that instead:
if ((cause == TeleportCause.END_PORTAL) && (i == 0)) { this.moveToWorld(entityplayer, exitWorld.dimension, true); } else { this.moveToWorld(entityplayer, exitWorld.dimension, true, exit, true); // SPIGOT-3864 }
A more correct method would be to rewrite changeDimension() more to work about the null check that short-circuit returns.