diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index ba342313e0..2b114ad2d0 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -1,4 +1,4 @@ -From bb8dd93f486683d2a80fe0d23337f11faca44e9a Mon Sep 17 00:00:00 2001 +From 2bce99d815e516c5ea740c9f161933d7f7f5bcdd Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:55:47 -0400 Subject: [PATCH] MC Utils @@ -7,7 +7,7 @@ Collection of utils to help reduce NMS diff diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java new file mode 100644 -index 0000000..3004822 +index 0000000..abe7e9f --- /dev/null +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -0,0 +1,115 @@ @@ -121,9 +121,9 @@ index 0000000..3004822 + } + + 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); + } +} --