aboutsummaryrefslogtreecommitdiff
path: root/builtin/item.lua
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-01-06 21:15:44 -0500
committerShadowNinja <shadowninja@minetest.net>2014-01-06 21:25:10 -0500
commitc46574f30f31fc186087f05d9100845d44319795 (patch)
treeedeb859c43152c982a44773296d9b4f9afa3e1b3 /builtin/item.lua
parent9551f651cb93b9b3f3cfcee61031c14f472253ce (diff)
downloadminetest-c46574f30f31fc186087f05d9100845d44319795.tar.gz
minetest-c46574f30f31fc186087f05d9100845d44319795.tar.bz2
minetest-c46574f30f31fc186087f05d9100845d44319795.zip
Pass pointed_thing to after_place_node
Diffstat (limited to 'builtin/item.lua')
-rw-r--r--builtin/item.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/builtin/item.lua b/builtin/item.lua
index 0df0335d9..35ad9e6e4 100644
--- a/builtin/item.lua
+++ b/builtin/item.lua
@@ -272,7 +272,13 @@ function minetest.item_place_node(itemstack, placer, pointed_thing, param2)
if def.after_place_node then
-- Copy place_to because callback can modify it
local place_to_copy = {x=place_to.x, y=place_to.y, z=place_to.z}
- if def.after_place_node(place_to_copy, placer, itemstack) then
+ local pointed_thing_copy = {
+ type = pointed_thing.type,
+ under = pointed_thing.under,
+ above = pointed_thing.above
+ }
+ if def.after_place_node(place_to_copy, placer, itemstack,
+ pointed_thing_copy) then
take_item = false
end
end