mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Fix isEdgeOfChunk check for MCUtils
This commit is contained in:
parent
775169422d
commit
809051d050
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
+ }
|
||||
+}
|
||||
--
|
Loading…
Reference in a new issue