Add new spruce schematics

This commit is contained in:
Wuzzy 2017-09-05 03:51:13 +02:00
parent d419b47198
commit 594aebfa45
6 changed files with 51 additions and 5 deletions

View File

@ -237,9 +237,13 @@ function mcl_core.generate_tree(pos, tree_type, two_by_two)
elseif tree_type == 3 then
if two_by_two then
mcl_core.generate_huge_spruce_tree(pos)
else
if mg_name == "v6" then
mcl_core.generate_v6_spruce_tree(pos)
else
mcl_core.generate_spruce_tree(pos)
end
end
elseif tree_type == 4 then
mcl_core.generate_acacia_tree(pos)
elseif tree_type == 5 then
@ -353,7 +357,7 @@ local function add_spruce_leaves(data, vi, c_air, c_ignore, c_snow, c_spruce_lea
end
end
function mcl_core.generate_spruce_tree(pos)
function mcl_core.generate_v6_spruce_tree(pos)
local x, y, z = pos.x, pos.y, pos.z
local maxy = y + math.random(9, 13) -- Trunk top
@ -449,6 +453,12 @@ function mcl_core.generate_spruce_tree(pos)
vm:write_to_map()
end
mcl_core.generate_spruce_tree = function(pos)
local r = math.random(1, 3)
local path = minetest.get_modpath("mcl_core") .. "/schematics/mcl_core_spruce_"..r..".mts"
minetest.place_schematic({ x = pos.x - 3, y = pos.y - 1, z = pos.z - 3 }, path, "0", nil, false)
end
mcl_core.generate_huge_spruce_tree = function(pos)
local r = math.random(1, 3)
local path = minetest.get_modpath("mcl_core") .. "/schematics/mcl_core_spruce_huge_"..r..".mts"

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1124,8 +1124,8 @@ local function register_decorations()
place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol"},
sidelen = 16,
noise_params = {
offset = 0.02,
scale = 0.0022,
offset = 0.0062,
scale = 0.0006,
spread = {x = 250, y = 250, z = 250},
seed = 2500,
octaves = 3,
@ -1134,7 +1134,43 @@ local function register_decorations()
biomes = {"taiga", "coniferous_forest"},
y_min = 2,
y_max = mcl_vars.mg_overworld_max,
schematic = minetest.get_modpath("mcl_core").."/schematics/pine_tree.mts",
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_spruce_1.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol"},
sidelen = 16,
noise_params = {
offset = 0.0065,
scale = 0.0006,
spread = {x = 250, y = 250, z = 250},
seed = 5000,
octaves = 3,
persist = 0.66
},
biomes = {"taiga", "coniferous_forest"},
y_min = 2,
y_max = mcl_vars.mg_overworld_max,
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_spruce_2.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol"},
sidelen = 16,
noise_params = {
offset = 0.005,
scale = 0.0006,
spread = {x = 250, y = 250, z = 250},
seed = 7500,
octaves = 3,
persist = 0.66
},
biomes = {"taiga", "coniferous_forest"},
y_min = 2,
y_max = mcl_vars.mg_overworld_max,
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_spruce_3.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({