Update dark sapling tree growth
This commit is contained in:
parent
b62349bc9f
commit
5ef6cb1f83
|
@ -288,11 +288,11 @@ function mcl_core.generate_tree(pos, trunk, leaves, typearbre)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif typearbre == 2 then
|
elseif typearbre == 2 then
|
||||||
-- EMPTY
|
mcl_core.generate_dark_oak_tree(pos)
|
||||||
elseif typearbre == 3 then
|
elseif typearbre == 3 then
|
||||||
mcl_core.generate_spruce_tree(pos)
|
mcl_core.generate_spruce_tree(pos)
|
||||||
elseif typearbre == 4 then
|
elseif typearbre == 4 then
|
||||||
mcl_core.grow_new_acacia_tree(pos)
|
mcl_core.generate_acacia_tree(pos)
|
||||||
elseif typearbre == 5 then
|
elseif typearbre == 5 then
|
||||||
mcl_core.generate_jungle_tree(pos)
|
mcl_core.generate_jungle_tree(pos)
|
||||||
end
|
end
|
||||||
|
@ -409,12 +409,18 @@ end
|
||||||
-- END of spruce tree functions --
|
-- END of spruce tree functions --
|
||||||
|
|
||||||
-- Acacia tree grow function from Minetest Game 0.4.15
|
-- Acacia tree grow function from Minetest Game 0.4.15
|
||||||
function mcl_core.grow_new_acacia_tree(pos)
|
function mcl_core.generate_acacia_tree(pos)
|
||||||
local path = minetest.get_modpath("mcl_core") ..
|
local path = minetest.get_modpath("mcl_core") ..
|
||||||
"/schematics/acacia_tree_from_sapling.mts"
|
"/schematics/acacia_tree_from_sapling.mts"
|
||||||
minetest.place_schematic({x = pos.x - 4, y = pos.y - 1, z = pos.z - 4}, path, "random", nil, false)
|
minetest.place_schematic({x = pos.x - 4, y = pos.y - 1, z = pos.z - 4}, path, "random", nil, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function mcl_core.generate_dark_oak_tree(pos)
|
||||||
|
local path = minetest.get_modpath("mcl_core") ..
|
||||||
|
"/schematics/mcl_core_dark_oak.mts"
|
||||||
|
minetest.place_schematic({x = pos.x - 4, y = pos.y - 1, z = pos.z - 4}, path, "random", nil, false)
|
||||||
|
end
|
||||||
|
|
||||||
-- Helper function for jungle tree, form Minetest Game 0.4.15
|
-- Helper function for jungle tree, form Minetest Game 0.4.15
|
||||||
local function add_trunk_and_leaves(data, a, pos, tree_cid, leaves_cid,
|
local function add_trunk_and_leaves(data, a, pos, tree_cid, leaves_cid,
|
||||||
height, size, iters)
|
height, size, iters)
|
||||||
|
@ -649,7 +655,7 @@ mcl_core.grow_sapling = function(pos, node)
|
||||||
if node.name == "mcl_core:sapling" then
|
if node.name == "mcl_core:sapling" then
|
||||||
grow = sapling_grow_action("mcl_core:tree", "mcl_core:leaves", 1, 1)
|
grow = sapling_grow_action("mcl_core:tree", "mcl_core:leaves", 1, 1)
|
||||||
elseif node.name == "mcl_core:darksapling" then
|
elseif node.name == "mcl_core:darksapling" then
|
||||||
grow = sapling_grow_action("mcl_core:darktree", "mcl_core:darkleaves", 1, 2)
|
grow = sapling_grow_action("mcl_core:darktree", "mcl_core:darkleaves", 2, 2)
|
||||||
elseif node.name == "mcl_core:junglesapling" then
|
elseif node.name == "mcl_core:junglesapling" then
|
||||||
grow = sapling_grow_action("mcl_core:jungletree", "mcl_core:jungleleaves", 5, 1)
|
grow = sapling_grow_action("mcl_core:jungletree", "mcl_core:jungleleaves", 5, 1)
|
||||||
elseif node.name == "mcl_core:acaciasapling" then
|
elseif node.name == "mcl_core:acaciasapling" then
|
||||||
|
@ -687,7 +693,7 @@ minetest.register_abm({
|
||||||
neighbors = {"group:soil_sapling"},
|
neighbors = {"group:soil_sapling"},
|
||||||
interval = 25,
|
interval = 25,
|
||||||
chance = 2,
|
chance = 2,
|
||||||
action = sapling_grow_action("mcl_core:darktree", "mcl_core:darkleaves", 1, 2),
|
action = sapling_grow_action("mcl_core:darktree", "mcl_core:darkleaves", 2, 2),
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Jungle Tree
|
-- Jungle Tree
|
||||||
|
|
Loading…
Reference in New Issue
Block a user