feat: Prevent placing entities on water and improve land generation

This commit is contained in:
Kacper Kostka (aider)
2025-04-02 12:14:34 +02:00
parent cde5301c2b
commit 3fa8a695b3
6 changed files with 113 additions and 13 deletions

View File

@@ -90,6 +90,14 @@ function knockback(ent, tx, ty, dist) {
}
}
/**********************************************************************
* PLACEMENT VALIDATION
**********************************************************************/
// Check if a position is valid for placement (not in water)
function isValidPlacement(x, y) {
return !isWater(x, y);
}
/**********************************************************************
* FINDERS
**********************************************************************/