sussy imposters no longer spawn underwater
This commit is contained in:
parent
5233a3aa6f
commit
49cf5f16f9
@ -543,6 +543,9 @@ minetest.register_abm({
|
|||||||
interval = 30,
|
interval = 30,
|
||||||
chance = 100,
|
chance = 100,
|
||||||
action = function(pos)
|
action = function(pos)
|
||||||
|
-- avoid spawning inside liquids
|
||||||
|
if minetest.registered_nodes[minetest.get_node(pos).name].liquidtype == "none" then
|
||||||
|
|
||||||
local light = minetest.get_node_light(pos)
|
local light = minetest.get_node_light(pos)
|
||||||
local time = minetest.get_timeofday()
|
local time = minetest.get_timeofday()
|
||||||
if light <= 12 and time >= 0.2 and time <= 0.8 then
|
if light <= 12 and time >= 0.2 and time <= 0.8 then
|
||||||
@ -558,6 +561,7 @@ minetest.register_abm({
|
|||||||
end
|
end
|
||||||
minetest.add_entity(pos, "amogus_entities:sussy_imposter")
|
minetest.add_entity(pos, "amogus_entities:sussy_imposter")
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user