mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 20:41:11 +01:00
Fix spawn ABM check that prevented squid spawn
This commit is contained in:
parent
64457b151c
commit
b7a2fba1ce
1 changed files with 5 additions and 4 deletions
|
@ -1,10 +1,11 @@
|
|||
function mobs:spawn_abm_check(pos, node, name)
|
||||
if (node.name == "air") then
|
||||
-- Don't spawn monsters on mycelium
|
||||
if (node.name == "mcl_core:mycelium" or node.name == "mcl_core:mycelium_snow") and minetest.registered_entities[name].type == "monster" then
|
||||
return true
|
||||
elseif (node.name == "mcl_core:mycelium" or node.name == "mcl_core:mycelium_snow") and minetest.registered_entities[name].type == "monster" then
|
||||
return false
|
||||
elseif minetest.get_item_group(node.name, "opaque") ~= 0 then
|
||||
-- Spawn on opaque or liquid nodes
|
||||
elseif minetest.get_item_group(node.name, "opaque") ~= 0 or minetest.registered_nodes[node.name].liquidtype ~= "none" then
|
||||
return false
|
||||
end
|
||||
-- Reject everything else
|
||||
return true
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue