feat: Prevent placing entities on water and improve land generation
This commit is contained in:
8
utils.js
8
utils.js
@@ -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
|
||||
**********************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user