Skip to content

Commit

Permalink
Avoids loading chunks when preparing the island level calc
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Jul 26, 2019
1 parent 4fe46bd commit da83f66
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,7 @@ private Set<Pair<Integer, Integer>> getChunksToScan(Island island) {
Set<Pair<Integer, Integer>> 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<Integer, Integer> 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;
Expand Down

0 comments on commit da83f66

Please sign in to comment.