Fix isEdgeOfChunk check for MCUtils

This commit is contained in:
Aikar 2016-03-31 21:43:37 -04:00
parent 775169422d
commit 809051d050

View file

@ -121,9 +121,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+
+ public static boolean isEdgeOfChunk(BlockPosition pos) {
+ final int absX = Math.abs(pos.getX()) % 16;
+ final int absZ = Math.abs(pos.getZ()) % 16;
+ return (absX == 0 || absX == 15 || absZ == 0 || absZ == 15);
+ final int modX = pos.getX() & 15;
+ final int modZ = pos.getZ() & 15;
+ return (modX == 0 || modX == 15 || modZ == 0 || modZ == 15);
+ }
+}
--