fix mobs spawning in water

* Fixed underwater under lava mob spawn issue #17

* made comment changes

* minor fix

* method name change

* method change

* fixed
This commit is contained in:
anmol-patankar
2025-09-12 22:23:08 +05:30
committed by GitHub
parent dabb202c13
commit ba03d92ad0
3 changed files with 13 additions and 3 deletions

View File

@@ -637,6 +637,15 @@ uint8_t isPassableBlock (uint8_t block) {
block == B_torch
);
}
// Checks whether the given block is non-solid and spawnable
uint8_t isPassableSpawnBlock (uint8_t block) {
if ((block >= B_water && block < B_water + 8) ||
(block >= B_lava && block < B_lava + 4))
{
return 0;
}
return isPassableBlock(block);
}
// Checks whether the given block can be replaced by another block
uint8_t isReplaceableBlock (uint8_t block) {