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 | 78b4e087e7866262640a70cb09ad15b28766f229 (patch) | |
tree | a7eb620cc512e2ae94c4dad31a31310dabeb05ac | |
parent | 83c2e1de15a3c1c486299621938c42a801617574 (diff) | |
download | Essentials-78b4e087e7866262640a70cb09ad15b28766f229.tar Essentials-78b4e087e7866262640a70cb09ad15b28766f229.tar.gz Essentials-78b4e087e7866262640a70cb09ad15b28766f229.tar.lz Essentials-78b4e087e7866262640a70cb09ad15b28766f229.tar.xz Essentials-78b4e087e7866262640a70cb09ad15b28766f229.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()); |