Fix spawn ABM check that prevented squid spawn

This commit is contained in:
Wuzzy 2019-02-05 17:43:18 +01:00
parent 64457b151c
commit b7a2fba1ce

View File

@ -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