fix compatibility with itemframes for seeds / plantable plants
parent
f93811a8ab
commit
de0e7dcc32
7
init.lua
7
init.lua
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue