From a922dc6cc66b7c94f02c7a5f26bcbb3382b9970d Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 5 Aug 2017 00:55:38 +0200 Subject: [PATCH] TNT doesn't destroy blocks if exploding in lava --- mods/ITEMS/mcl_tnt/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_tnt/init.lua b/mods/ITEMS/mcl_tnt/init.lua index 75073a4054..583b9968b5 100644 --- a/mods/ITEMS/mcl_tnt/init.lua +++ b/mods/ITEMS/mcl_tnt/init.lua @@ -180,7 +180,8 @@ tnt.boom = function(pos, info) sound = info.sound end minetest.sound_play(sound, {pos = pos,gain = 1.0,max_hear_distance = 16,}) - if minetest.get_node(pos).name == "mcl_core:water_source" or minetest.get_node(pos).name == "mcl_core:water_flowing" or minetest.get_node(pos).name == "mcl_core:bedrock" or minetest.get_node(pos).name == "protector:display" or minetest.is_protected(pos, "tnt") then + local node = minetest.get_node(pos) + if minetest.get_item_group("water") == 1 or minetest.get_item_group("lava") == 1 or minetest.get_node(pos).name == "mcl_core:bedrock" or minetest.get_node(pos).name == "protector:display" or minetest.is_protected(pos, "tnt") then -- Cancel the Explosion return end