fix: deepwater generation near boundary
Signed-off-by: szdytom <szdytom@qq.com>
This commit is contained in:
parent
937a1324eb
commit
d69a13d58a
@ -93,7 +93,8 @@ bool DeepwaterGenerationPass::is_surrounded_by_water(
|
|||||||
if (check_x < 0 || check_y < 0
|
if (check_x < 0 || check_y < 0
|
||||||
|| check_x >= static_cast<std::int32_t>(max_global_coord)
|
|| check_x >= static_cast<std::int32_t>(max_global_coord)
|
||||||
|| check_y >= static_cast<std::int32_t>(max_global_coord)) {
|
|| check_y >= static_cast<std::int32_t>(max_global_coord)) {
|
||||||
return false; // Out of bounds, consider as non-water
|
// Out of bounds, consider as water
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert back to TilePos and check if it's water
|
// Convert back to TilePos and check if it's water
|
||||||
|
Loading…
x
Reference in New Issue
Block a user