From 02f46da152fdfb466ba5fdfd8ea7f9b0d6555c0a Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 17 Aug 2017 04:56:14 +0200 Subject: [PATCH] Fix some bugs WRT eternal fire spawning --- mods/ITEMS/mcl_fire/init.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_fire/init.lua b/mods/ITEMS/mcl_fire/init.lua index 0f0313a9d5..45eb449723 100644 --- a/mods/ITEMS/mcl_fire/init.lua +++ b/mods/ITEMS/mcl_fire/init.lua @@ -379,8 +379,11 @@ local eternal_override = { _on_ignite = function(player, pointed_thing) local pos = pointed_thing.under local flame_pos = {x = pos.x, y = pos.y + 1, z = pos.z} - if minetest.get_node(flame_pos).name == "air" then + local fn = minetest.get_node(flame_pos) + if fn.name == "air" and not minetest.is_protected(flame_pos, "fire") and pointed_thing.under.y < pointed_thing.above.y then minetest.set_node(flame_pos, {name = "mcl_fire:eternal_fire"}) + else + mcl_fire.set_fire(pointed_thing) end end, } @@ -393,7 +396,7 @@ end -- Set pointed_thing on (normal) fire mcl_fire.set_fire = function(pointed_thing) local n = minetest.get_node(pointed_thing.above) - if n.name ~= "" and n.name == "air" and not minetest.is_protected(pointed_thing.above, "fire") then + if n.name == "air" and not minetest.is_protected(pointed_thing.above, "fire") then minetest.add_node(pointed_thing.above, {name="mcl_fire:fire"}) end end