From 1e7bf9a46c8ba914675211cb354e5b755e7a628f Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 11 Aug 2011 02:59:40 +0100 Subject: [PATCH] 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. --- Essentials/src/com/earth2me/essentials/Util.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } }