Do not load chunks for light checks
Should only happen for blocks on the edge that uses neighbors light level (certain blocks). In that case, there will be 3-4 other neighbors to get a light level from.
This commit is contained in:
@@ -119,5 +119,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ public static Location toLocation(Entity entity) {
|
||||
+ return new Location(entity.getWorld().getWorld(), entity.locX, entity.locY, entity.locZ);
|
||||
+ }
|
||||
+
|
||||
+ 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);
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
Reference in New Issue
Block a user