Quick patch to get cherry saplings growing pending inclusing of a proper tree API

This commit is contained in:
teknomunk 2024-09-20 06:22:44 -05:00
parent da044a31a0
commit 7cb6bfbcf2
1 changed files with 3 additions and 0 deletions

View File

@ -1089,6 +1089,7 @@ end
-- pos: Position -- pos: Position
-- node: Node table of the node at this position, from minetest.get_node -- node: Node table of the node at this position, from minetest.get_node
-- Returns true on success and false on failure -- Returns true on success and false on failure
-- TODO: replace this with a proper tree API
function mcl_core.grow_sapling(pos, node) function mcl_core.grow_sapling(pos, node)
local grow local grow
if node.name == "mcl_core:sapling" then if node.name == "mcl_core:sapling" then
@ -1103,6 +1104,8 @@ function mcl_core.grow_sapling(pos, node)
grow = grow_spruce grow = grow_spruce
elseif node.name == "mcl_core:birchsapling" then elseif node.name == "mcl_core:birchsapling" then
grow = grow_birch grow = grow_birch
elseif node.name == "mcl_cherry_blossom:cherrysapling" then
return mcl_cherry_blossom.generate_cherry_tree(pos)
end end
if grow then if grow then
grow(pos) grow(pos)