fix compatibility with itemframes for seeds / plantable plants

master
tchncs 2016-08-08 17:35:24 +02:00
parent f93811a8ab
commit de0e7dcc32
1 changed files with 7 additions and 0 deletions

View File

@ -654,6 +654,13 @@ function farming.place_seed(itemstack, placer, pointed_thing, plantname)
local under = minetest.get_node(pt.under)
local above = minetest.get_node(pt.above)
-- thanks to w_laenger from minetest irc
-- fixes itemframes compatibility
if minetest.registered_nodes[under.name].on_rightclick then
return minetest.registered_nodes[under.name].on_rightclick(pt.under, under, placer, itemstack, pt)
end
-- check if pointing at the top of the node
if pt.above.y ~= pt.under.y + 1 then
return