fix mob struct spawns
This commit is contained in:
parent
d1cede6cfd
commit
92c08d0987
|
@ -7,7 +7,7 @@ local vector_offset = vector.offset
|
|||
|
||||
-- check if a node is an air node
|
||||
local function is_air(node)
|
||||
return node == "air"
|
||||
return node.name == "air"
|
||||
-- todo: or: not walkable and not liquid?
|
||||
end
|
||||
-- check if a node is a water node
|
||||
|
@ -37,6 +37,9 @@ function vl_structures.spawn_mobs(mob,spawnon,p1,p2,pr,n,water)
|
|||
else
|
||||
sp = minetest.find_nodes_in_area_under_air(p1,p2,spawnon)
|
||||
end
|
||||
if not sp or #sp == 0 then
|
||||
minetest.log("warning", "No spawn nodes for mob "..mob.." found: "..dump(spawnon,""))
|
||||
end
|
||||
table.shuffle(sp)
|
||||
local count = 0
|
||||
local mob_def = minetest.registered_entities[mob]
|
||||
|
|
Loading…
Reference in New Issue