diff --git a/register_abm.lua b/register_abm.lua index a5eab5d..911f94e 100644 --- a/register_abm.lua +++ b/register_abm.lua @@ -17,7 +17,7 @@ if minetest.get_modpath("areas") then interval = 10/speed, chance = 50, action = function(pos) - if pos.y > -10 and pos.y < 1500 then + if pos.y > -10 and pos.y < 30 then minetest.env:add_node(pos, {name="surface_effect:radioactive_earth"}) end end, @@ -29,8 +29,10 @@ minetest.register_abm({ interval = 30/speed, chance = 2000, action = function(pos) - if pos.y > -10 and pos.y < 1500 then - minetest.env:add_node(pos, {name="fire:basic_flame"}) + local info_biome = minetest.get_biome_data(pos) + + if pos.y > -10 and pos.y < 500 and info_biome.heat > 45 then + minetest.env:add_node(pos, {name="fire:basic_flame"}) end end, }) @@ -51,7 +53,9 @@ minetest.register_abm({ interval = 10/speed, chance = 50, action = function(pos) - if pos.y > -10 and pos.y < 1500 then + local info_biome = minetest.get_biome_data(pos) + + if pos.y > -10 and pos.y < 1500 and info_biome.heat > 45 then minetest.env:remove_node(pos) if minetest.env:get_node({x=pos.x, y=pos.y -1, z=pos.z}).name == "default:water_source" then minetest.env:remove_node({x=pos.x, y=pos.y -1, z=pos.z})