mirror of
https://codeberg.org/tenplus1/farming.git
synced 2024-12-26 02:30:20 +01:00
added cocoa beans on_rightclick check for custom nodes
This commit is contained in:
parent
b2f013ba02
commit
4d5bd4fff1
@ -18,6 +18,13 @@ function place_cocoa(itemstack, placer, pointed_thing, plantname)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- am I right-clicking on something that has a custom on_place set?
|
||||||
|
-- thanks to Krock for helping with this issue :)
|
||||||
|
local def = minetest.registered_nodes[under.name]
|
||||||
|
if def and def.on_rightclick then
|
||||||
|
return def.on_rightclick(pt.under, under, placer, itemstack)
|
||||||
|
end
|
||||||
|
|
||||||
-- check if pointing at jungletree
|
-- check if pointing at jungletree
|
||||||
if under.name ~= "default:jungletree"
|
if under.name ~= "default:jungletree"
|
||||||
or minetest.get_node(pt.above).name ~= "air" then
|
or minetest.get_node(pt.above).name ~= "air" then
|
||||||
|
Loading…
Reference in New Issue
Block a user