diff --git a/src/main/java/com/wimbli/WorldBorder/WorldFileData.java b/src/main/java/com/wimbli/WorldBorder/WorldFileData.java index e61082c..aace1ca 100644 --- a/src/main/java/com/wimbli/WorldBorder/WorldFileData.java +++ b/src/main/java/com/wimbli/WorldBorder/WorldFileData.java @@ -127,22 +127,23 @@ public class WorldFileData CoordXZ region = new CoordXZ(CoordXZ.chunkToRegion(x), CoordXZ.chunkToRegion(z)); List regionChunks = this.getRegionData(region); // Bukkit.getLogger().info("x: "+x+" z: "+z+" offset: "+coordToRegionOffset(x, z)); - return regionChunks.get(coordToRegionOffset(x, z)).booleanValue(); + return regionChunks.get(coordToRegionOffset(x, z)); } // Find out if the chunk at the given coordinates has been fully generated. // Minecraft only fully generates a chunk when adjacent chunks are also loaded. public boolean isChunkFullyGenerated(int x, int z) { // if all adjacent chunks exist, it should be a safe enough bet that this one is fully generated - // For 1.13+, due to world gen changes, this is now effectively a 3 chunk radius requirement vs a 1 chunk radius - for (int xx = x-3; xx <= x+3; xx++) { - for (int zz = z-3; zz <= z+3; zz++) { - if (!doesChunkExist(xx, zz)) { - return false; - } - } - } - return true; + // For 1.13+, due to world gen changes, this is now effectively a 3 chunk radius requirement vs a 1 chunk radius + for (int xx = x-3; xx <= x+3; xx++) + { + for (int zz = z-3; zz <= z+3; zz++) + { + if (!doesChunkExist(xx, zz)) + return false; + } + } + return true; } // Method to let us know a chunk has been generated, to update our region map. @@ -202,14 +203,13 @@ public class WorldFileData counter++; } // Read timestamps - for (int j = 0; j < 1024; j++) - { - // if timestamp is zero, it is protochunk (ignore it) - if ((regionData.readInt() == 0) && data.get(j)) { - data.set(j, false); - } - counter++; - } + for (int j = 0; j < 1024; j++) + { + // if timestamp is zero, it is protochunk (ignore it) + if ((regionData.readInt() == 0) && data.get(j)) + data.set(j, false); + counter++; + } regionData.close(); } catch (FileNotFoundException ex)