From 6fb818d7bf239477e55e555d24013dac2cc661b9 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 30 Jun 2017 21:31:09 +0200 Subject: [PATCH] Don't crash if TNT wants to blow up unknown node --- mods/ITEMS/mcl_tnt/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_tnt/init.lua b/mods/ITEMS/mcl_tnt/init.lua index a081f832..ea7cd7ab 100644 --- a/mods/ITEMS/mcl_tnt/init.lua +++ b/mods/ITEMS/mcl_tnt/init.lua @@ -178,7 +178,7 @@ function TNT:on_step(dtime) local def = minetest.registered_nodes[n.name] -- Simple blast resistance check (for now). This keeps the important blocks like bedrock, command block, etc. intact. -- TODO: Implement the real blast resistance algorithm - if n.name ~= "air" and n.name ~= "ignore" and (def._mcl_blast_resistance == nil or def._mcl_blast_resistance < 1000) then + if def and n.name ~= "air" and n.name ~= "ignore" and (def._mcl_blast_resistance == nil or def._mcl_blast_resistance < 1000) then activate_if_tnt(n.name, np, pos, 3) minetest.remove_node(np) core.check_for_falling(np)