mirror of
https://github.com/minetest/minetest_game.git
synced 2025-06-29 21:30:26 +02:00
Pine trees: Add small pine tree and mix into coniferous forests
Use noises to create a varying mix in coniferous forest biomes: Areas of large pines only, areas of small pines only, mixed areas. While also having areas of high and low tree densities. Saplings grow into large or small pines with equal chance.
This commit is contained in:
@ -411,8 +411,14 @@ end
|
||||
-- New pine tree
|
||||
|
||||
function default.grow_new_pine_tree(pos)
|
||||
local path = minetest.get_modpath("default") ..
|
||||
"/schematics/pine_tree_from_sapling.mts"
|
||||
local path
|
||||
if math.random() > 0.5 then
|
||||
path = minetest.get_modpath("default") ..
|
||||
"/schematics/pine_tree_from_sapling.mts"
|
||||
else
|
||||
path = minetest.get_modpath("default") ..
|
||||
"/schematics/small_pine_tree_from_sapling.mts"
|
||||
end
|
||||
minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
@ -421,8 +427,14 @@ end
|
||||
-- New snowy pine tree
|
||||
|
||||
function default.grow_new_snowy_pine_tree(pos)
|
||||
local path = minetest.get_modpath("default") ..
|
||||
"/schematics/snowy_pine_tree_from_sapling.mts"
|
||||
local path
|
||||
if math.random() > 0.5 then
|
||||
path = minetest.get_modpath("default") ..
|
||||
"/schematics/snowy_pine_tree_from_sapling.mts"
|
||||
else
|
||||
path = minetest.get_modpath("default") ..
|
||||
"/schematics/snowy_small_pine_tree_from_sapling.mts"
|
||||
end
|
||||
minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2},
|
||||
path, "random", nil, false)
|
||||
end
|
||||
|
Reference in New Issue
Block a user