diff options
author | KHobbits <rob@khobbits.co.uk> | 2011-10-03 09:58:46 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2011-10-03 09:58:46 +0100 |
commit | 16111b56adeee3b18329a6d198c4a58ac5b84083 (patch) | |
tree | ee24aede07713a45b8ef5454453f7dc176110cf4 | |
parent | 3b9aa445e911ac3791535ddcdb77e69effa199ce (diff) | |
download | Essentials-16111b56adeee3b18329a6d198c4a58ac5b84083.tar Essentials-16111b56adeee3b18329a6d198c4a58ac5b84083.tar.gz Essentials-16111b56adeee3b18329a6d198c4a58ac5b84083.tar.lz Essentials-16111b56adeee3b18329a6d198c4a58ac5b84083.tar.xz Essentials-16111b56adeee3b18329a6d198c4a58ac5b84083.zip |
Safe location fix:
x and z needs floor, while y should be round.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Util.java | 4 |
1 files 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)) { |