Add mega spruces to sapling growth

This commit is contained in:
Wuzzy 2017-09-09 05:27:48 +02:00
parent e433be1472
commit 01f5cc7515
1 changed files with 15 additions and 3 deletions

View File

@ -483,9 +483,21 @@ mcl_core.generate_spruce_tree = function(pos)
end end
mcl_core.generate_huge_spruce_tree = function(pos) mcl_core.generate_huge_spruce_tree = function(pos)
local r = math.random(1, 3) local r1 = math.random(1, 2)
local path = minetest.get_modpath("mcl_core") .. "/schematics/mcl_core_spruce_huge_"..r..".mts" local r2 = math.random(1, 3)
minetest.place_schematic({ x = pos.x - 4, y = pos.y - 1, z = pos.z - 5 }, path, "0", nil, false) local path
local offset = { x = -4, y = -1, z = -5 }
if r1 <= 2 then
-- Mega Spruce Taiga (full canopy)
path = minetest.get_modpath("mcl_core") .. "/schematics/mcl_core_spruce_huge_"..r2..".mts"
else
-- Mega Taiga (leaves only at top)
if r2 == 1 or r2 == 3 then
offset = { x = -3, y = -1, z = -4}
end
path = minetest.get_modpath("mcl_core") .. "/schematics/mcl_core_spruce_huge_up_"..r2..".mts"
end
minetest.place_schematic(vector.add(pos, offset), path, "0", nil, false)
end end
-- END of spruce tree functions -- -- END of spruce tree functions --