From 8a30845b1deac3ad834b12b1110f76a4928c419e Mon Sep 17 00:00:00 2001 From: snowleo Date: Mon, 11 Apr 2011 08:58:16 +0000 Subject: [trunk] getSaveDestination: floor location and center the player on the block Less chance to get stuck in walls git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1176 e251c2fe-e539-e718-e476-b85c1f46cddb --- Essentials/src/com/earth2me/essentials/PlayerExtension.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/PlayerExtension.java b/Essentials/src/com/earth2me/essentials/PlayerExtension.java index 8819f9e08..5b7c8bd63 100644 --- a/Essentials/src/com/earth2me/essentials/PlayerExtension.java +++ b/Essentials/src/com/earth2me/essentials/PlayerExtension.java @@ -48,9 +48,9 @@ public class PlayerExtension extends PlayerWrapper public Location getSafeDestination(Location loc) throws Exception { World world = loc.getWorld(); - double x = Math.round(loc.getX())+0.5; - double y = Math.round(loc.getY()); - double z = Math.round(loc.getZ())+0.5; + double x = Math.floor(loc.getX())+0.5; + double y = Math.floor(loc.getY()); + double z = Math.floor(loc.getZ())+0.5; while (isBlockAboveAir(world, x, y, z)) { -- cgit v1.2.3