From da83f66f8c4c06fb14d5b989bdd401ae33e2e97e Mon Sep 17 00:00:00 2001 From: tastybento Date: Thu, 25 Jul 2019 21:04:36 -0700 Subject: [PATCH] Avoids loading chunks when preparing the island level calc https://github.com/BentoBoxWorld/Level/issues/68 --- .../java/world/bentobox/level/calculators/CalcIslandLevel.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/world/bentobox/level/calculators/CalcIslandLevel.java b/src/main/java/world/bentobox/level/calculators/CalcIslandLevel.java index 93ff498..aa6d8bf 100644 --- a/src/main/java/world/bentobox/level/calculators/CalcIslandLevel.java +++ b/src/main/java/world/bentobox/level/calculators/CalcIslandLevel.java @@ -204,8 +204,7 @@ public class CalcIslandLevel { Set> chunkSnapshot = new HashSet<>(); for (int x = island.getMinProtectedX(); x < (island.getMinProtectedX() + island.getProtectionRange() * 2 + 16); x += 16) { for (int z = island.getMinProtectedZ(); z < (island.getMinProtectedZ() + island.getProtectionRange() * 2 + 16); z += 16) { - Pair pair = new Pair<>(world.getBlockAt(x, 0, z).getChunk().getX(), world.getBlockAt(x, 0, z).getChunk().getZ()); - chunkSnapshot.add(pair); + chunkSnapshot.add(new Pair<>(x >> 4, z >> 4)); } } return chunkSnapshot;