Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,16 @@ private static boolean defaultIsSafe(@NotNull Block feetBlock) {
BlockVector3 max = region.getMaximumPoint();

int startX = (min.x() + max.x()) / 2;
int startY = (min.y() + max.y()) / 2;
int startY;
int startZ = (min.z() + max.z()) / 2;

// Start searching around ground level for tall plots
if (max.y() - min.y() >= 100 && 80 <= max.y() && 80 >= min.y()) {
startY = 80;
} else {
startY = (min.y() + max.y()) / 2;
}

// Load center chunk and check center first
return world.getChunkAtAsync(Math.floorDiv(startX, 16), Math.floorDiv(startZ, 16))
.thenCompose(chunk -> {
Expand Down