mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-14 15:11:05 +01:00
Add bonemealing callback for fern.
* Adds a _mcl_on_bonemealing callback to fern.
This commit is contained in:
parent
2190080832
commit
f6235e8e92
1 changed files with 12 additions and 0 deletions
|
@ -192,6 +192,18 @@ def_fern.selection_box = {
|
||||||
fixed = { -6/16, -0.5, -6/16, 6/16, 5/16, 6/16 },
|
fixed = { -6/16, -0.5, -6/16, 6/16, 5/16, 6/16 },
|
||||||
}
|
}
|
||||||
def_fern.groups.compostability = 65
|
def_fern.groups.compostability = 65
|
||||||
|
def_fern._mcl_on_bonemealing = function(pointed_thing, placer)
|
||||||
|
local pos = pointed_thing.under
|
||||||
|
local n = minetest.get_node(pos)
|
||||||
|
-- Grow into double fern.
|
||||||
|
local toppos = vector.offset(pos, 0, 1, 0)
|
||||||
|
local topnode = minetest.get_node(toppos)
|
||||||
|
if minetest.registered_nodes[topnode.name].buildable_to then
|
||||||
|
minetest.set_node(pos, { name = "mcl_flowers:double_fern", param2 = n.param2 })
|
||||||
|
minetest.set_node(toppos, { name = "mcl_flowers:double_fern_top", param2 = n.param2 })
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_node("mcl_flowers:fern", def_fern)
|
minetest.register_node("mcl_flowers:fern", def_fern)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue