diff options
author | KHobbits <rob@khobbits.co.uk> | 2011-08-11 02:59:40 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2011-08-11 02:59:40 +0100 |
commit | 1e7bf9a46c8ba914675211cb354e5b755e7a628f (patch) | |
tree | 2b6fdcd25eff5a5c7c02fb623d7a9fb245bb1202 | |
parent | 19595c5847ac6d60bfa15bb9bc34c3de3d9e85fd (diff) | |
download | Essentials-1e7bf9a46c8ba914675211cb354e5b755e7a628f.tar Essentials-1e7bf9a46c8ba914675211cb354e5b755e7a628f.tar.gz Essentials-1e7bf9a46c8ba914675211cb354e5b755e7a628f.tar.lz Essentials-1e7bf9a46c8ba914675211cb354e5b755e7a628f.tar.xz Essentials-1e7bf9a46c8ba914675211cb354e5b755e7a628f.zip |
Removing hole in floor, tp cop-out.
This should force the code to find an suitable tp location.
- Not sure how well this will effect performance, but wanted to test it.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Util.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Util.java b/Essentials/src/com/earth2me/essentials/Util.java index 6e772a252..2f06f96d7 100644 --- a/Essentials/src/com/earth2me/essentials/Util.java +++ b/Essentials/src/com/earth2me/essentials/Util.java @@ -227,12 +227,17 @@ public class Util 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; if (y < 0) { - throw new Exception(Util.i18n("holeInFloor")); + break; } } |