diff options
author | KHobbits <rob@khobbits.co.uk> | 2011-08-11 03:33:09 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2011-08-11 03:33:09 +0100 |
commit | 1fbed62c1d5ce2a36da8b367929143cfad0fe0f0 (patch) | |
tree | 6eac4b9406868d034209437faf0b2ff671203e7d | |
parent | a21d80ecd80cf32b4fe77a8ed67564a3de779e43 (diff) | |
download | Essentials-1fbed62c1d5ce2a36da8b367929143cfad0fe0f0.tar Essentials-1fbed62c1d5ce2a36da8b367929143cfad0fe0f0.tar.gz Essentials-1fbed62c1d5ce2a36da8b367929143cfad0fe0f0.tar.lz Essentials-1fbed62c1d5ce2a36da8b367929143cfad0fe0f0.tar.xz Essentials-1fbed62c1d5ce2a36da8b367929143cfad0fe0f0.zip |
Stop searching for tp location after a chunk.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Util.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Util.java b/Essentials/src/com/earth2me/essentials/Util.java index 2f06f96d7..6ec5f4180 100644 --- a/Essentials/src/com/earth2me/essentials/Util.java +++ b/Essentials/src/com/earth2me/essentials/Util.java @@ -226,12 +226,7 @@ public class Util int x = loc.getBlockX(); int y = loc.getBlockY(); int z = loc.getBlockZ(); - - if (isBlockAboveAir(world, x, y, z) && (y < 125)) - { - y += 2; - } - + while (isBlockAboveAir(world, x, y, z)) { y -= 1; @@ -257,6 +252,10 @@ public class Util { y = 127; x += 1; + if (x - 16 > loc.getBlockX()) + { + throw new Exception(Util.i18n("holeInFloor")); + } } } return new Location(world, x + 0.5D, y, z + 0.5D, loc.getYaw(), loc.getPitch()); |