mirror of
https://github.com/BentoBoxWorld/Level.git
synced 2024-11-27 12:38:21 +01:00
Fixed chunk loading bug.
This commit is contained in:
parent
9705fedd04
commit
eb715afcda
@ -309,14 +309,11 @@ public class ChunkScanner {
|
||||
for (int z = island.getMinProtectedZ(); z < (island.getMinProtectedZ() + (island.getProtectionRange() * 2) + 16); z += 16) {
|
||||
if (!world.isChunkLoaded((int)((double)x/16), (int)((double)z/16))) {
|
||||
// If the chunk isn't already generated, load it but don't try and generate it
|
||||
if (world.loadChunk((int)((double)x/16), (int)((double)z/16), false)) {
|
||||
Chunk chunk = world.getChunkAt((int)((double)x/16), (int)((double)z/16));
|
||||
chunkSnapshot.add(chunk.getChunkSnapshot());
|
||||
world.loadChunk((int)((double)x/16), (int)((double)z/16), false);
|
||||
}
|
||||
} else {
|
||||
// chunk is loaded
|
||||
chunkSnapshot.add(world.getBlockAt(x, 0, z).getChunk().getChunkSnapshot());
|
||||
}
|
||||
|
||||
if (DEBUG)
|
||||
plugin.getLogger().info("DEBUG: getting chunk at " + x + ", " + z);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user