aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPilzAdam <pilzadam@minetest.net>2013-04-02 15:18:05 +0200
committerPilzAdam <pilzadam@minetest.net>2013-04-02 15:19:02 +0200
commit9ff8012655f13269f33d406f024374c67b650a9a (patch)
treef96c9c3e87b8753b90ca5fccc0c81f77ece2f4fc
parent8d4b76829753b3db9020ff1f68fb4b0a57025ed3 (diff)
downloadminetest-9ff8012655f13269f33d406f024374c67b650a9a.tar.gz
minetest-9ff8012655f13269f33d406f024374c67b650a9a.tar.bz2
minetest-9ff8012655f13269f33d406f024374c67b650a9a.zip
Return an ItemStack in minetest.item_place() if nodes' on rightclick doesnt return it
-rw-r--r--builtin/item.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/item.lua b/builtin/item.lua
index 8e2f75a1a..51a17106a 100644
--- a/builtin/item.lua
+++ b/builtin/item.lua
@@ -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