From 16111b56adeee3b18329a6d198c4a58ac5b84083 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 3 Oct 2011 09:58:46 +0100 Subject: Safe location fix: x and z needs floor, while y should be round. --- Essentials/src/com/earth2me/essentials/Util.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Util.java b/Essentials/src/com/earth2me/essentials/Util.java index 52409049d..c1b0ed7bf 100644 --- a/Essentials/src/com/earth2me/essentials/Util.java +++ b/Essentials/src/com/earth2me/essentials/Util.java @@ -266,9 +266,9 @@ public class Util throw new Exception(Util.i18n("destinationNotSet")); } final World world = loc.getWorld(); - int x = (int)Math.round(loc.getX()); + int x = loc.getBlockX(); int y = (int)Math.round(loc.getY()); - int z = (int)Math.round(loc.getZ()); + int z = loc.getBlockZ(); while (isBlockAboveAir(world, x, y, z)) { -- cgit v1.2.3