From a2ffaa9dc363e5b8f5cb21089358d50351013f98 Mon Sep 17 00:00:00 2001 From: OgelGames Date: Thu, 5 Sep 2024 12:56:33 +1000 Subject: [PATCH] fix nodebreaker not ejecting replacement items fixes #137 --- wielder.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wielder.lua b/wielder.lua index 00dc6b7..0850e5a 100644 --- a/wielder.lua +++ b/wielder.lua @@ -251,7 +251,8 @@ if pipeworks.enable_node_breaker then local old_stack = ItemStack(stack) local item_def = minetest.registered_items[stack:get_name()] if item_def.on_use then - fakeplayer:set_wielded_item(item_def.on_use(stack, fakeplayer, pointed) or stack) + stack = item_def.on_use(stack, fakeplayer, pointed) or stack + fakeplayer:set_wielded_item(stack) else local node = minetest.get_node(pointed.under) local node_def = minetest.registered_nodes[node.name]