Skip to content

Commit

Permalink
Fixes spawn platform position in the end. (#1713)
Browse files Browse the repository at this point in the history
In the vanilla end, the highest block in the End can be above 63. Check for just 0, 63, 0 may be incorrect for most of the end vanilla worlds.
  • Loading branch information
BONNe committed Mar 17, 2021
1 parent 4582b23 commit 8ce30a7
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -385,7 +385,7 @@ private void handleStandardNetherOrEnd(PlayerEntityPortalEvent e, World fromWorl
World toWorld = getNetherEndWorld(overWorld, env);
Location spawnPoint = toWorld.getSpawnLocation();
// If spawn is set as 0,63,0 in the End then move it to 100, 50 ,0.
if (env.equals(Environment.THE_END) && spawnPoint.toVector().equals(new Vector(0,63,0))) {
if (env.equals(Environment.THE_END) && spawnPoint.getBlockX() == 0 && spawnPoint.getBlockZ() == 0) {
// Set to the default end spawn
spawnPoint = new Location(toWorld, 100, 50, 0);
toWorld.setSpawnLocation(100, 50, 0);
Expand Down

0 comments on commit 8ce30a7

Please sign in to comment.