Commit de0e7dcc authored by Milan's avatar Milan
Browse files

fix compatibility with itemframes for seeds / plantable plants

parent f93811a8
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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