From a1ea41e760c46dddd80010172c5e287e55668b1f Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 8 Apr 2020 03:17:34 +0200 Subject: [PATCH] Lava: Don't ignite 2 blocks above if 1 layer above is blocked --- mods/ITEMS/mcl_fire/init.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_fire/init.lua b/mods/ITEMS/mcl_fire/init.lua index f44c669afd..4812254631 100644 --- a/mods/ITEMS/mcl_fire/init.lua +++ b/mods/ITEMS/mcl_fire/init.lua @@ -359,10 +359,12 @@ else -- Fire enabled return false end local airs1 = minetest.find_nodes_in_area({x=pos.x-1, y=pos.y+1, z=pos.z-1}, {x=pos.x+1, y=pos.y+1, z=pos.z+1}, {"air"}) - local ok = try_ignite(airs1) - if not ok then + local h = math.random(1, 2) + if h == 2 and #airs1 > 0 then local airs2 = minetest.find_nodes_in_area({x=pos.x-2, y=pos.y+2, z=pos.z-2}, {x=pos.x+2, y=pos.y+2, z=pos.z+2}, {"air"}) try_ignite(airs2) + else + try_ignite(airs1) end end, })