getHighestBlockYAt() does not detect heads so check full height of world

Fixes https://github.com/BentoBoxWorld/Level/issues/193
This commit is contained in:
tastybento 2020-09-27 17:29:13 -07:00
parent bfed6c75eb
commit e2d3150fa2
1 changed files with 1 additions and 1 deletions

View File

@ -377,7 +377,7 @@ public class IslandLevelCalculator {
continue;
}
// Only count to the highest block in the world for some optimization
for (int y = 0; y < chunkSnapshot.getHighestBlockYAt(x, z); y++) {
for (int y = 0; y < chunk.getWorld().getMaxHeight(); y++) {
BlockData blockData = chunkSnapshot.getBlockData(x, y, z);
int seaHeight = addon.getPlugin().getIWM().getSeaHeight(island.getWorld());
boolean belowSeaLevel = seaHeight > 0 && y <= seaHeight;