mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-24 20:03:45 +01:00
Fix spawn ABM check that prevented squid spawn
This commit is contained in:
parent
64457b151c
commit
b7a2fba1ce
@ -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 New Issue
Block a user