forked from Mineclonia/Mineclonia
Add large oak trees
This commit is contained in:
parent
1d862ae019
commit
d8f3a5ee7f
|
@ -330,13 +330,31 @@ end
|
||||||
function mcl_core.generate_oak_tree(pos)
|
function mcl_core.generate_oak_tree(pos)
|
||||||
local r = math.random(1, 12)
|
local r = math.random(1, 12)
|
||||||
local path
|
local path
|
||||||
|
local offset
|
||||||
|
-- Balloon oak
|
||||||
if r == 1 then
|
if r == 1 then
|
||||||
path = minetest.get_modpath("mcl_core") .. "/schematics/mcl_core_oak_balloon_small.mts"
|
local s = math.random(1, 12)
|
||||||
|
if s == 1 then
|
||||||
|
-- Small balloon oak
|
||||||
|
path = minetest.get_modpath("mcl_core") .. "/schematics/mcl_core_oak_balloon.mts"
|
||||||
|
offset = { x = -2, y = -1, z = -2 }
|
||||||
|
else
|
||||||
|
-- Large balloon oak
|
||||||
|
local t = math.random(1, 2)
|
||||||
|
path = minetest.get_modpath("mcl_core") .. "/schematics/mcl_core_oak_large_"..t..".mts"
|
||||||
|
if t == 1 then
|
||||||
|
offset = { x = -3, y = -1, z = -3 }
|
||||||
|
elseif t == 2 then
|
||||||
|
offset = { x = -4, y = -1, z = -4 }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- Classic oak
|
||||||
else
|
else
|
||||||
path = minetest.get_modpath("mcl_core") .. "/schematics/mcl_core_oak_classic.mts"
|
path = minetest.get_modpath("mcl_core") .. "/schematics/mcl_core_oak_classic.mts"
|
||||||
|
offset = { x = -2, y = -1, z = -2 }
|
||||||
|
|
||||||
end
|
end
|
||||||
minetest.place_schematic({x = pos.x - 2, y = pos.y - 1 , z = pos.z - 2}, path, "random", nil, false)
|
minetest.place_schematic(vector.add(pos, offset), path, "random", nil, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Birch
|
-- Birch
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1040,6 +1040,44 @@ local function register_decorations()
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Oak
|
-- Oak
|
||||||
|
minetest.register_decoration({
|
||||||
|
deco_type = "schematic",
|
||||||
|
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||||||
|
sidelen = 80,
|
||||||
|
noise_params = {
|
||||||
|
offset = 0.00075,
|
||||||
|
scale = 0.0011,
|
||||||
|
spread = {x = 250, y = 250, z = 250},
|
||||||
|
seed = 3,
|
||||||
|
octaves = 3,
|
||||||
|
persist = 0.66
|
||||||
|
},
|
||||||
|
biomes = {"deciduous_forest"},
|
||||||
|
y_min = 1,
|
||||||
|
y_max = mcl_vars.mg_overworld_max,
|
||||||
|
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_large_1.mts",
|
||||||
|
flags = "place_center_x, place_center_z",
|
||||||
|
rotation = "random",
|
||||||
|
})
|
||||||
|
minetest.register_decoration({
|
||||||
|
deco_type = "schematic",
|
||||||
|
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||||||
|
sidelen = 80,
|
||||||
|
noise_params = {
|
||||||
|
offset = 0.00075,
|
||||||
|
scale = 0.0011,
|
||||||
|
spread = {x = 250, y = 250, z = 250},
|
||||||
|
seed = 3,
|
||||||
|
octaves = 3,
|
||||||
|
persist = 0.66
|
||||||
|
},
|
||||||
|
biomes = {"deciduous_forest"},
|
||||||
|
y_min = 1,
|
||||||
|
y_max = mcl_vars.mg_overworld_max,
|
||||||
|
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_large_2.mts",
|
||||||
|
flags = "place_center_x, place_center_z",
|
||||||
|
rotation = "random",
|
||||||
|
})
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "schematic",
|
deco_type = "schematic",
|
||||||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||||||
|
|
Loading…
Reference in New Issue