From ffab977475ef1d78ef003c18ae78793d3bf45c86 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Thu, 25 Apr 2013 12:05:52 +0200 Subject: [PATCH] Fix bugs with isSameChunk --- src/com/massivecraft/mcore/util/MUtil.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/com/massivecraft/mcore/util/MUtil.java b/src/com/massivecraft/mcore/util/MUtil.java index 405104d0..15ba6dd9 100644 --- a/src/com/massivecraft/mcore/util/MUtil.java +++ b/src/com/massivecraft/mcore/util/MUtil.java @@ -169,9 +169,10 @@ public class MUtil public static boolean isSameChunk(Location one, Location two) { - if (one.getBlockX() >> 4 != one.getBlockX() >> 4) return false; - if (one.getBlockZ() >> 4 != one.getBlockZ() >> 4) return false; - return one.getWorld().equals(two.getWorld()); + if (one.getBlockX() >> 4 != two.getBlockX() >> 4) return false; + if (one.getBlockZ() >> 4 != two.getBlockZ() >> 4) return false; + if (one.getWorld() != two.getWorld()) return false; + return true; } // -------------------------------------------- //