forked from thunderdog1138/star_wars
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:
parent
ac50b3e3ce
commit
160dc21bc1
|
@ -1758,7 +1758,7 @@ function default.register_decorations()
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "schematic",
|
deco_type = "schematic",
|
||||||
place_on = {"default:dirt_with_rainforest_litter", "default:dirt"},
|
place_on = {"default:dirt_with_rainforest_litter", "default:dirt"},
|
||||||
sidelen = 16,
|
sidelen = 80,
|
||||||
fill_ratio = 0.1,
|
fill_ratio = 0.1,
|
||||||
biomes = {"rainforest", "rainforest_swamp"},
|
biomes = {"rainforest", "rainforest_swamp"},
|
||||||
y_max = 31000,
|
y_max = 31000,
|
||||||
|
@ -1771,7 +1771,7 @@ function default.register_decorations()
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "schematic",
|
deco_type = "schematic",
|
||||||
place_on = {"default:dirt_with_rainforest_litter", "default:dirt"},
|
place_on = {"default:dirt_with_rainforest_litter", "default:dirt"},
|
||||||
sidelen = 16,
|
sidelen = 80,
|
||||||
fill_ratio = 0.005,
|
fill_ratio = 0.005,
|
||||||
biomes = {"rainforest", "rainforest_swamp"},
|
biomes = {"rainforest", "rainforest_swamp"},
|
||||||
y_max = 31000,
|
y_max = 31000,
|
||||||
|
@ -1781,15 +1781,15 @@ function default.register_decorations()
|
||||||
rotation = "random",
|
rotation = "random",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Taiga and temperate coniferous forest pine tree and log
|
-- Taiga and temperate coniferous forest pine tree, small pine tree and log
|
||||||
|
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "schematic",
|
deco_type = "schematic",
|
||||||
place_on = {"default:dirt_with_snow", "default:dirt_with_coniferous_litter"},
|
place_on = {"default:dirt_with_snow", "default:dirt_with_coniferous_litter"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0.036,
|
offset = 0.010,
|
||||||
scale = 0.022,
|
scale = 0.048,
|
||||||
spread = {x = 250, y = 250, z = 250},
|
spread = {x = 250, y = 250, z = 250},
|
||||||
seed = 2,
|
seed = 2,
|
||||||
octaves = 3,
|
octaves = 3,
|
||||||
|
@ -1805,10 +1805,10 @@ function default.register_decorations()
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "schematic",
|
deco_type = "schematic",
|
||||||
place_on = {"default:dirt_with_snow", "default:dirt_with_coniferous_litter"},
|
place_on = {"default:dirt_with_snow", "default:dirt_with_coniferous_litter"},
|
||||||
sidelen = 80,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0.0018,
|
offset = 0.010,
|
||||||
scale = 0.0011,
|
scale = -0.048,
|
||||||
spread = {x = 250, y = 250, z = 250},
|
spread = {x = 250, y = 250, z = 250},
|
||||||
seed = 2,
|
seed = 2,
|
||||||
octaves = 3,
|
octaves = 3,
|
||||||
|
@ -1816,6 +1816,18 @@ function default.register_decorations()
|
||||||
},
|
},
|
||||||
biomes = {"taiga", "coniferous_forest", "floatland_coniferous_forest"},
|
biomes = {"taiga", "coniferous_forest", "floatland_coniferous_forest"},
|
||||||
y_max = 31000,
|
y_max = 31000,
|
||||||
|
y_min = 2,
|
||||||
|
schematic = minetest.get_modpath("default") .. "/schematics/small_pine_tree.mts",
|
||||||
|
flags = "place_center_x, place_center_z",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_decoration({
|
||||||
|
deco_type = "schematic",
|
||||||
|
place_on = {"default:dirt_with_snow", "default:dirt_with_coniferous_litter"},
|
||||||
|
sidelen = 80,
|
||||||
|
fill_ratio = 0.0018,
|
||||||
|
biomes = {"taiga", "coniferous_forest", "floatland_coniferous_forest"},
|
||||||
|
y_max = 31000,
|
||||||
y_min = 1,
|
y_min = 1,
|
||||||
schematic = minetest.get_modpath("default") .. "/schematics/pine_log.mts",
|
schematic = minetest.get_modpath("default") .. "/schematics/pine_log.mts",
|
||||||
flags = "place_center_x",
|
flags = "place_center_x",
|
||||||
|
@ -2039,7 +2051,7 @@ function default.register_decorations()
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"default:dirt_with_rainforest_litter"},
|
place_on = {"default:dirt_with_rainforest_litter"},
|
||||||
sidelen = 16,
|
sidelen = 80,
|
||||||
fill_ratio = 0.1,
|
fill_ratio = 0.1,
|
||||||
biomes = {"rainforest"},
|
biomes = {"rainforest"},
|
||||||
y_max = 31000,
|
y_max = 31000,
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -411,8 +411,14 @@ end
|
||||||
-- New pine tree
|
-- New pine tree
|
||||||
|
|
||||||
function default.grow_new_pine_tree(pos)
|
function default.grow_new_pine_tree(pos)
|
||||||
local path = minetest.get_modpath("default") ..
|
local path
|
||||||
"/schematics/pine_tree_from_sapling.mts"
|
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},
|
minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2},
|
||||||
path, "0", nil, false)
|
path, "0", nil, false)
|
||||||
end
|
end
|
||||||
|
@ -421,8 +427,14 @@ end
|
||||||
-- New snowy pine tree
|
-- New snowy pine tree
|
||||||
|
|
||||||
function default.grow_new_snowy_pine_tree(pos)
|
function default.grow_new_snowy_pine_tree(pos)
|
||||||
local path = minetest.get_modpath("default") ..
|
local path
|
||||||
"/schematics/snowy_pine_tree_from_sapling.mts"
|
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},
|
minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2},
|
||||||
path, "random", nil, false)
|
path, "random", nil, false)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue