Changed IslandLevelCalculator minHeight to world minHeight for negative blocks height support since 1.18. (#246)

This commit is contained in:
Pierre Dedrie 2021-12-19 02:22:28 +01:00 committed by GitHub
parent 50074ac1df
commit 4a21e4b30c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -433,7 +433,7 @@ public class IslandLevelCalculator {
continue;
}
// Only count to the highest block in the world for some optimization
for (int y = 0; y < chunk.getWorld().getMaxHeight(); y++) {
for (int y = chunk.getWorld().getMinHeight(); y < chunk.getWorld().getMaxHeight(); y++) {
BlockData blockData = chunkSnapshot.getBlockData(x, y, z);
boolean belowSeaLevel = seaHeight > 0 && y <= seaHeight;
// Slabs can be doubled, so check them twice