Fix inhabited time check

This commit is contained in:
Lukas Rieger (Blue) 2022-12-17 15:10:22 +01:00
parent cf93cb56c4
commit c7fc230dcf
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2
1 changed files with 5 additions and 2 deletions

View File

@ -160,7 +160,7 @@ public class WorldRegionRenderTask implements RenderTask {
for (int z = minChunk.getY(); z <= maxChunk.getY(); z++) {
Chunk chunk = map.getWorld().getChunk(x, z);
if (!chunk.isGenerated()) return false;
if (chunk.getInhabitedTime() < minInhab) isInhabited = true;
if (chunk.getInhabitedTime() >= minInhab) isInhabited = true;
}
}
@ -168,7 +168,10 @@ public class WorldRegionRenderTask implements RenderTask {
for (int x = minChunk.getX() - minInhabRadius; x <= maxChunk.getX() + minInhabRadius; x++) {
for (int z = minChunk.getY() - minInhabRadius; z <= maxChunk.getY() + minInhabRadius; z++) {
Chunk chunk = map.getWorld().getChunk(x, z);
if (chunk.getInhabitedTime() < minInhab) isInhabited = true;
if (chunk.getInhabitedTime() >= minInhab) {
isInhabited = true;
break;
}
}
}
}