From 728db50baf6816c4bb2efaef8bbcab03ab64ff92 Mon Sep 17 00:00:00 2001
From: Wuzzy <Wuzzy2@mail.ru>
Date: Sat, 9 May 2020 18:55:50 +0200
Subject: [PATCH] Fire doesn't destroy flammable=-1 nodes

---
 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 eabf3ed00..9ae8ce995 100644
--- a/mods/ITEMS/mcl_fire/init.lua
+++ b/mods/ITEMS/mcl_fire/init.lua
@@ -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