mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 10:31:06 +01:00
Fire doesn't destroy flammable=-1 nodes
This commit is contained in:
parent
621946546b
commit
728db50baf
1 changed files with 4 additions and 2 deletions
|
@ -136,10 +136,12 @@ minetest.register_node("mcl_fire:fire", {
|
|||
local nodes = minetest.find_nodes_in_area({x=pos.x-1, y=pos.y-1, z=pos.z-1}, {x=pos.x+1, y=pos.y+4, z=pos.z+1}, {"group:flammable"})
|
||||
if #nodes > 0 then
|
||||
local r = math.random(1, #nodes)
|
||||
local ndef = minetest.registered_nodes[minetest.get_node(nodes[r]).name]
|
||||
local nn = minetest.get_node(nodes[r]).name
|
||||
local ndef = minetest.registered_nodes[nn]
|
||||
local fgroup = minetest.get_item_group(nn, "flammable")
|
||||
if ndef and ndef._on_burn then
|
||||
ndef._on_burn(nodes[r])
|
||||
else
|
||||
elseif fgroup ~= -1 then
|
||||
spawn_fire(nodes[r], age_next)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue