mirror of
https://github.com/Brettflan/WorldBorder.git
synced 2024-11-26 03:55:57 +01:00
Alter fully generated prediction to match 1.13.x worldgen behavior
This commit is contained in:
parent
20b4f5ed67
commit
5c648dfe2d
@ -134,14 +134,15 @@ public class WorldFileData
|
||||
// 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
|
||||
return
|
||||
! (
|
||||
! doesChunkExist(x, z)
|
||||
|| ! doesChunkExist(x+1, z)
|
||||
|| ! doesChunkExist(x-1, z)
|
||||
|| ! doesChunkExist(x, z+1)
|
||||
|| ! doesChunkExist(x, z-1)
|
||||
);
|
||||
// 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.
|
||||
|
Loading…
Reference in New Issue
Block a user