Add in big trees
This commit is contained in:
parent
90cf318814
commit
70651999a6
@ -139,25 +139,49 @@ minetest.register_biome({
|
||||
humidity_point = 35,
|
||||
})
|
||||
|
||||
--[[
|
||||
minetest.register_decoration({
|
||||
name = "main:tree",
|
||||
deco_type = "schematic",
|
||||
deco_type = "simple",
|
||||
place_on = {"main:grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0.024,
|
||||
scale = 0.015,
|
||||
spread = {x = 250, y = 250, z = 250},
|
||||
seed = 2,
|
||||
octaves = 3,
|
||||
persist = 0.66
|
||||
},
|
||||
fill_ratio = 0.005,
|
||||
biomes = {"grassland"},
|
||||
y_max = 31000,
|
||||
y_min = 0,
|
||||
schematic = treeSchematic,
|
||||
flags = "place_center_x, place_center_z, force_placement",
|
||||
rotation = "random",
|
||||
--schematic = treeSchematic,
|
||||
--flags = "place_center_x, place_center_z, force_placement",
|
||||
--rotation = "random",
|
||||
decoration = "main:tree",
|
||||
height = 4,
|
||||
height_max = 6,
|
||||
})
|
||||
]]--
|
||||
minetest.register_decoration({
|
||||
name = "main:tree_big",
|
||||
deco_type = "schematic",
|
||||
place_on = {"main:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.0025,
|
||||
biomes = {"grassland"},
|
||||
y_max = 31000,
|
||||
y_min = 0,
|
||||
schematic = tree_big,
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
place_offset_y = 1,
|
||||
})
|
||||
minetest.register_decoration({
|
||||
name = "main:tree_small",
|
||||
deco_type = "schematic",
|
||||
place_on = {"main:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.0025,
|
||||
biomes = {"grassland"},
|
||||
y_max = 31000,
|
||||
y_min = 0,
|
||||
schematic = tree_small,
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
place_offset_y = 1,
|
||||
})
|
||||
|
||||
|
||||
|
@ -21,9 +21,18 @@ local function sapling_grow(pos)
|
||||
end
|
||||
if good_to_grow == true then
|
||||
minetest.set_node(pos,{name="main:tree"})
|
||||
minetest.place_schematic(pos, treeSchematic,"0",nil,false,"place_center_x, place_center_z")
|
||||
local schemmy = math.random(1,2)
|
||||
if schemmy == 1 then
|
||||
minetest.place_schematic(pos, tree_big,"0",nil,false,"place_center_x, place_center_z")
|
||||
elseif schemmy == 2 then
|
||||
minetest.place_schematic(pos, tree_small,"0",nil,false,"place_center_x, place_center_z")
|
||||
end
|
||||
--override leaves
|
||||
for i = 1,4 do
|
||||
local max = 3
|
||||
if schemmy == 2 then
|
||||
max = 1
|
||||
end
|
||||
for i = 1,max do
|
||||
minetest.set_node(vector.new(pos.x,pos.y+i,pos.z),{name="main:tree"})
|
||||
end
|
||||
end
|
||||
|
@ -5,29 +5,77 @@ front -> back
|
||||
|
||||
]]--
|
||||
|
||||
treeSchematic = {
|
||||
size = {x = 3, y = 6, z = 3},
|
||||
tree_big = {
|
||||
size = {x = 5, y = 6, z = 5},
|
||||
data = {
|
||||
-- The side of the bush, with the ignore on top
|
||||
{name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"},
|
||||
{name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"},
|
||||
{name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, -- lower layer
|
||||
{name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, -- lower layer
|
||||
{name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"}, -- middle layer
|
||||
{name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"},-- top layer
|
||||
|
||||
|
||||
-- The side of the bush, with the ignore on top
|
||||
{name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"},
|
||||
{name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"},
|
||||
{name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, -- lower layer
|
||||
{name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, -- lower layer
|
||||
{name = "ignore"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "ignore"}, -- middle layer
|
||||
{name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"},-- top layer
|
||||
|
||||
|
||||
|
||||
-- The side of the bush, with the ignore on top
|
||||
{name = "ignore"}, {name = "ignore"}, {name = "main:tree"}, {name = "ignore"}, {name = "ignore"},
|
||||
{name = "ignore"}, {name = "ignore"}, {name = "main:tree"}, {name = "ignore"}, {name = "ignore"},
|
||||
{name = "main:leaves"}, {name = "main:leaves"}, {name = "main:tree"}, {name = "main:leaves"}, {name = "main:leaves"}, -- lower layer
|
||||
{name = "main:leaves"}, {name = "main:leaves"}, {name = "main:tree"}, {name = "main:leaves"}, {name = "main:leaves"}, -- lower layer
|
||||
{name = "ignore"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "ignore"}, -- middle layer
|
||||
{name = "ignore"}, {name = "ignore"}, {name = "main:leaves"}, {name = "ignore"}, {name = "ignore"},-- top layer
|
||||
|
||||
|
||||
|
||||
-- The other side of the bush, same as first side
|
||||
{name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"},
|
||||
{name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"},
|
||||
{name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, -- lower layer
|
||||
{name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, -- lower layer
|
||||
{name = "ignore"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "ignore"}, -- middle layer
|
||||
{name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"},-- top layer
|
||||
|
||||
|
||||
|
||||
{name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"},
|
||||
{name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"},
|
||||
{name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, -- lower layer
|
||||
{name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, -- lower layer
|
||||
{name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"}, -- middle layer
|
||||
{name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"}, {name = "ignore"},-- top layer
|
||||
}
|
||||
}
|
||||
|
||||
tree_small = {
|
||||
size = {x = 3, y = 5, z = 3},
|
||||
data = {
|
||||
-- The side of the bush, with the air on top
|
||||
{name = "air"}, {name = "air"}, {name = "air"},
|
||||
{name = "air"}, {name = "air"}, {name = "air"},
|
||||
{name = "air"}, {name = "air"}, {name = "air"},
|
||||
{name = "air"}, {name = "air"}, {name = "air"},
|
||||
{name = "air"}, {name = "air"}, {name = "air"},
|
||||
{name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, -- lower layer
|
||||
{name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, -- middle layer
|
||||
{name = "air"}, {name = "air"}, {name = "air"}, -- top layer
|
||||
{name = "air"}, {name = "air"}, {name = "air"}, -- top layer
|
||||
-- The center of the bush, with stem at the base and a pointy leave 2 nodes above
|
||||
{name = "air"}, {name = "main:tree"}, {name = "air"},
|
||||
{name = "air"}, {name = "main:tree"}, {name = "air"},
|
||||
{name = "air"}, {name = "main:tree"}, {name = "air"},
|
||||
{name = "main:leaves"}, {name = "main:tree"}, {name = "main:leaves"}, -- lower layer
|
||||
{name = "main:leaves"}, {name = "main:tree"}, {name = "main:leaves"}, -- middle layer
|
||||
{name = "air"}, {name = "main:leaves"}, {name = "air"}, -- top layer
|
||||
{name = "air"}, {name = "main:tree"}, {name = "air"},
|
||||
{name = "air"}, {name = "main:tree"}, {name = "air"},
|
||||
{name = "main:leaves"}, {name = "main:tree"}, {name = "main:leaves"}, -- lower layer
|
||||
{name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, -- middle layer
|
||||
{name = "air"}, {name = "main:leaves"}, {name = "air"}, -- top layer
|
||||
-- The other side of the bush, same as first side
|
||||
{name = "air"}, {name = "air"}, {name = "air"},
|
||||
{name = "air"}, {name = "air"}, {name = "air"},
|
||||
{name = "air"}, {name = "air"}, {name = "air"},
|
||||
{name = "air"}, {name = "air"}, {name = "air"},
|
||||
{name = "air"}, {name = "air"}, {name = "air"},
|
||||
{name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, -- lower layer
|
||||
{name = "main:leaves"}, {name = "main:leaves"}, {name = "main:leaves"}, -- middle layer
|
||||
{name = "air"}, {name = "air"}, {name = "air"}, -- top layer
|
||||
{name = "air"}, {name = "air"}, {name = "air"}, -- top layer
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user