diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index 63bb07b602..d1c502fcef 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -524,12 +524,14 @@ core.register_entity(":__builtin:item", { return end - -- Destroy item in lava or special nodes + -- Destroy item in lava, fire or special nodes local nn = node.name local def = minetest.registered_nodes[nn] - if (def and def.groups and (def.groups.lava or def.groups.destroys_items == 1)) then - -- Special effect for lava - if def.groups.lava then + local lg = minetest.get_item_group(nn, "lava") + local fg = minetest.get_item_group(nn, "fire") + local dg = minetest.get_item_group(nn, "destroys_items") + if (def and (lg ~= 0 or fg ~= 0 or dg == 1)) then + if dg ~= 2 then minetest.sound_play("builtin_item_lava", {pos = self.object:get_pos(), gain = 0.5}) end self._removed = true diff --git a/mods/ITEMS/mcl_fire/init.lua b/mods/ITEMS/mcl_fire/init.lua index c8c12ea365..665b13deba 100644 --- a/mods/ITEMS/mcl_fire/init.lua +++ b/mods/ITEMS/mcl_fire/init.lua @@ -35,7 +35,7 @@ minetest.register_node("mcl_fire:fire", { buildable_to = true, sunlight_propagates = true, damage_per_second = 1, - groups = {fire = 1, dig_immediate = 3, not_in_creative_inventory = 1, dig_by_piston=1}, + groups = {fire = 1, dig_immediate = 3, not_in_creative_inventory = 1, dig_by_piston=1, destroys_items=1 }, floodable = true, on_flood = function(pos, oldnode, newnode) if minetest.get_item_group(newnode.name, "water") ~= 0 then @@ -114,7 +114,7 @@ minetest.register_node("mcl_fire:eternal_fire", { buildable_to = true, sunlight_propagates = true, damage_per_second = 1, - groups = {fire = 1, dig_immediate = 3, not_in_creative_inventory = 1, dig_by_piston = 1}, + groups = {fire = 1, dig_immediate = 3, not_in_creative_inventory = 1, dig_by_piston = 1, destroys_items = 1}, floodable = true, on_flood = function(pos, oldnode, newnode) if minetest.get_item_group(newnode.name, "water") ~= 0 then