mirror of
https://github.com/minetest/minetest.git
synced 2024-12-23 22:52:25 +01:00
Return an ItemStack in minetest.item_place() if nodes' on rightclick doesnt return it
This commit is contained in:
parent
8d4b768297
commit
9ff8012655
@ -244,7 +244,7 @@ function minetest.item_place(itemstack, placer, pointed_thing)
|
||||
local n = minetest.env:get_node(pointed_thing.under)
|
||||
local nn = n.name
|
||||
if minetest.registered_nodes[nn] and minetest.registered_nodes[nn].on_rightclick then
|
||||
return minetest.registered_nodes[nn].on_rightclick(pointed_thing.under, n, placer, itemstack)
|
||||
return minetest.registered_nodes[nn].on_rightclick(pointed_thing.under, n, placer, itemstack) or itemstack
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user