1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2024-11-09 12:00:18 +01:00

fix nodebreaker not ejecting replacement items

fixes #137
This commit is contained in:
OgelGames 2024-09-05 12:56:33 +10:00
parent 63bc754889
commit a2ffaa9dc3

View File

@ -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]