mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-06 13:54:25 -04:00
Return the Item that on_punch gives us.
This commit is contained in:
parent
f17dc13630
commit
f3568b882c
1 changed files with 5 additions and 1 deletions
|
@ -158,11 +158,15 @@ minetest.register_craftitem("bucket:bucket_empty", {
|
|||
if node_def then
|
||||
-- Buckets will run a node's on_punch function if it is not liquid.
|
||||
if node_def.on_punch then
|
||||
node_def.on_punch(
|
||||
giving_back = node_def.on_punch(
|
||||
pointed_thing.under,
|
||||
minetest.get_node(pointed_thing.under),
|
||||
user,
|
||||
pointed_thing)
|
||||
|
||||
if giving_back ~= nil then
|
||||
return ItemStack(giving_back)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue