mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 10:31:06 +01:00
Lava: Don't ignite 2 blocks above if 1 layer above is blocked
This commit is contained in:
parent
21d5b93baa
commit
a1ea41e760
1 changed files with 4 additions and 2 deletions
|
@ -359,10 +359,12 @@ else -- Fire enabled
|
||||||
return false
|
return false
|
||||||
end
|
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 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)
|
local h = math.random(1, 2)
|
||||||
if not ok then
|
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"})
|
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)
|
try_ignite(airs2)
|
||||||
|
else
|
||||||
|
try_ignite(airs1)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue