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 | b9e3e5f7e530e39c2bddaea9a81ea58aa7875b1c (patch) | |
tree | e24e90fdf4d9dfa8248d7f8038879a37df14d01a | |
parent | 786dcae29e2ab4b5d529490d77cdad71e5699451 (diff) | |
download | Essentials-b9e3e5f7e530e39c2bddaea9a81ea58aa7875b1c.tar Essentials-b9e3e5f7e530e39c2bddaea9a81ea58aa7875b1c.tar.gz Essentials-b9e3e5f7e530e39c2bddaea9a81ea58aa7875b1c.tar.lz Essentials-b9e3e5f7e530e39c2bddaea9a81ea58aa7875b1c.tar.xz Essentials-b9e3e5f7e530e39c2bddaea9a81ea58aa7875b1c.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)) { |