From 2be75c962877d3ea82cad03d4672a23ef1abf936 Mon Sep 17 00:00:00 2001 From: MysticTempest Date: Sun, 6 Nov 2022 07:08:49 -0600 Subject: [PATCH] Better fix for creative digging drops, and fix the itemframes LBM. --- mods/HUD/mcl_inventory/init.lua | 3 +-- mods/ITEMS/mcl_itemframes/item_frames_API.lua | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/mods/HUD/mcl_inventory/init.lua b/mods/HUD/mcl_inventory/init.lua index 2c7c64860..7ef791c7a 100644 --- a/mods/HUD/mcl_inventory/init.lua +++ b/mods/HUD/mcl_inventory/init.lua @@ -213,8 +213,7 @@ minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing) if pointed_thing.type ~= "node" then return end local def = minetest.registered_nodes[node.name] if def then - if def.on_destruct then def.on_destruct(pos) end - minetest.dig_node(pos) + minetest.node_dig(pos,def,puncher) return true end end) diff --git a/mods/ITEMS/mcl_itemframes/item_frames_API.lua b/mods/ITEMS/mcl_itemframes/item_frames_API.lua index bd78f33e1..75b2d53d8 100644 --- a/mods/ITEMS/mcl_itemframes/item_frames_API.lua +++ b/mods/ITEMS/mcl_itemframes/item_frames_API.lua @@ -535,12 +535,11 @@ end function mcl_itemframes.custom_register_lbm(name) - -- FIXME: Item entities can get destroyed by /clearobjects - -- glow frame + -- Item entities can get destroyed by /clearobjects; LBM regenerates them. minetest.register_lbm({ label = "Respawn item frame item entities", name = "mcl_itemframes:respawn_entities", - nodenames = { name }, + nodenames = {"mcl_itemframes:item_frame","mcl_itemframes:glow_item_frame"}, run_at_every_load = true, action = function(pos, node) mcl_itemframes.update_item_entity(pos, node)