From 8ce30a7cb5777507d382cb6e4b91a26d17c6036f Mon Sep 17 00:00:00 2001 From: BONNe Date: Wed, 17 Mar 2021 04:07:05 +0200 Subject: [PATCH] Fixes spawn platform position in the end. (#1713) 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. --- .../bentobox/listeners/PortalTeleportationListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/bentobox/listeners/PortalTeleportationListener.java b/src/main/java/world/bentobox/bentobox/listeners/PortalTeleportationListener.java index b98901999..5ec2701e0 100644 --- a/src/main/java/world/bentobox/bentobox/listeners/PortalTeleportationListener.java +++ b/src/main/java/world/bentobox/bentobox/listeners/PortalTeleportationListener.java @@ -385,7 +385,7 @@ public class PortalTeleportationListener implements Listener { 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);