Don't spawn mummies above liquids
This commit is contained in:
parent
5104b2a117
commit
049e575da1
@ -422,6 +422,9 @@ function tsm_pyramids.attempt_mummy_spawn(pos, player_near_required)
|
|||||||
for y=-1, -5, -1 do
|
for y=-1, -5, -1 do
|
||||||
npos.y = npos.y - 1
|
npos.y = npos.y - 1
|
||||||
local below = minetest.get_node(npos)
|
local below = minetest.get_node(npos)
|
||||||
|
if minetest.registered_items[below.name].liquidtype ~= "none" then
|
||||||
|
break
|
||||||
|
end
|
||||||
if below.name ~= "air" then
|
if below.name ~= "air" then
|
||||||
if y < -1 then
|
if y < -1 then
|
||||||
two_space = true
|
two_space = true
|
||||||
|
Loading…
Reference in New Issue
Block a user