From: PilzAdam Date: Tue, 2 Apr 2013 13:18:05 +0000 (+0200) Subject: Return an ItemStack in minetest.item_place() if nodes' on rightclick doesnt return it X-Git-Tag: 0.4.6~2^2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9ff8012655f13269f33d406f024374c67b650a9a;p=oweals%2Fminetest.git Return an ItemStack in minetest.item_place() if nodes' on rightclick doesnt return it --- 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