From 809051d050b9eb21322286caf74ed62aa293b948 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 31 Mar 2016 21:43:37 -0400 Subject: [PATCH] Fix isEdgeOfChunk check for MCUtils --- Spigot-Server-Patches/MC-Utils.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Spigot-Server-Patches/MC-Utils.patch b/Spigot-Server-Patches/MC-Utils.patch index 45636171d5..3efc013358 100644 --- a/Spigot-Server-Patches/MC-Utils.patch +++ b/Spigot-Server-Patches/MC-Utils.patch @@ -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); + } +} -- \ No newline at end of file