Skip to content

Commit

Permalink
New wider apple tree schematic
Browse files Browse the repository at this point in the history
Precisely reduce trees and logs per mapchunk division to compensate.
  • Loading branch information
paramat committed Aug 20, 2018
1 parent 3d02145 commit 20b4338
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 97 deletions.
8 changes: 4 additions & 4 deletions mods/default/mapgen.lua
Expand Up @@ -1621,8 +1621,8 @@ function default.register_decorations()
place_on = {"default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = 0.036,
scale = 0.022,
offset = 0.024,
scale = 0.015,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
Expand All @@ -1643,8 +1643,8 @@ function default.register_decorations()
place_offset_y = 1,
sidelen = 16,
noise_params = {
offset = 0.0018,
scale = 0.0011,
offset = 0.0012,
scale = 0.0007,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
Expand Down
4 changes: 2 additions & 2 deletions mods/default/nodes.lua
Expand Up @@ -684,8 +684,8 @@ minetest.register_node("default:sapling", {
"default:sapling",
-- minp, maxp to be checked, relative to sapling pos
-- minp_relative.y = 1 because sapling pos has been checked
{x = -2, y = 1, z = -2},
{x = 2, y = 6, z = 2},
{x = -3, y = 1, z = -3},
{x = 3, y = 6, z = 3},
-- maximum interval of interior volume check
4)
Expand Down
Binary file modified mods/default/schematics/apple_tree.mts
Binary file not shown.
Binary file modified mods/default/schematics/apple_tree_from_sapling.mts
Binary file not shown.
2 changes: 1 addition & 1 deletion mods/default/trees.lua
Expand Up @@ -387,7 +387,7 @@ end
function default.grow_new_apple_tree(pos)
local path = minetest.get_modpath("default") ..
"/schematics/apple_tree_from_sapling.mts"
minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2},
minetest.place_schematic({x = pos.x - 3, y = pos.y - 1, z = pos.z - 3},
path, "random", nil, false)
end
Expand Down
211 changes: 121 additions & 90 deletions schematic_tables.txt
Expand Up @@ -30,123 +30,154 @@ local _ = {name = "air", prob = 0}

-- Mapgen Apple tree

local L = {name = "default:leaves", prob = 191}
local N = {name = "default:leaves", prob = 223}
local M = {name = "default:leaves", prob = 255}
local N = {name = "default:leaves", prob = 223}
local F = {name = "default:apple", prob = 63}
local T = {name = "default:tree", prob = 255}
local Y = {name = "default:tree", prob = 255, force_place = true}
local U = {name = "default:tree", prob = 127}
local I = {name = "default:tree", prob = 127, force_place = true}
local T = {name = "default:tree", prob = 255}

mts_save("apple_tree", {
size = {x = 5, y = 8, z = 5},
size = {x = 7, y = 8, z = 7},
data = {
_, _, _, _, _,
_, _, _, _, _,
_, _, _, _, _,
_, _, _, _, _,
L, N, N, N, L,
L, N, N, N, L,
L, N, N, N, L,
_, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, N, M, N, _, _,
_, _, _, N, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,

_, _, _, _, _,
_, _, _, _, _,
_, _, _, _, _,
_, _, _, _, _,
N, Y, F, I, N,
N, M, M, M, N,
N, M, M, M, N,
_, N, N, N, _,

_, _, Y, _, _,
_, _, Y, _, _,
_, _, Y, _, _,
_, _, Y, _, _,
N, F, M, F, N,
N, M, M, M, N,
N, M, M, M, N,
_, N, M, N, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, M, M, F, M, M, _,
_, N, M, M, M, N, _,
_, _, N, M, N, _, _,
_, _, _, _, _, _, _,

_, _, _, _, _,
_, _, _, _, _,
_, _, _, _, _,
_, _, _, _, _,
N, I, F, Y, N,
N, M, M, M, N,
N, M, M, M, N,
_, N, N, N, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
N, M, Y, _, _, M, N,
_, M, M, _, Y, M, _,
_, N, M, M, M, N, _,
_, _, _, N, _, _, _,

_, _, _, _, _,
_, _, _, _, _,
_, _, _, _, _,
_, _, _, _, _,
L, N, N, N, L,
L, N, N, N, L,
L, N, N, N, L,
_, _, _, _, _,
_, _, _, Y, _, _, _,
_, _, _, Y, _, _, _,
_, _, _, Y, _, _, _,
_, _, _, Y, _, _, _,
M, F, _, Y, _, F, M,
N, M, _, _, _, M, N,
_, M, M, M, M, M, _,
_, _, N, M, N, _, _,

_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
N, M, _, _, Y, M, N,
_, M, Y, _, M, M, _,
_, N, M, M, M, N, _,
_, _, _, N, _, _, _,

_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, M, M, F, M, M, _,
_, N, M, M, M, N, _,
_, _, N, M, N, _, _,
_, _, _, _, _, _, _,

_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, N, M, N, _, _,
_, _, _, N, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
},
yslice_prob = {
{ypos = 2, prob = 127},
{ypos = 6, prob = 127},
},
})


-- Apple tree from sapling

mts_save("apple_tree_from_sapling", {
size = {x = 5, y = 8, z = 5},
size = {x = 7, y = 8, z = 7},
data = {
_, _, _, _, _,
_, _, _, _, _,
_, _, _, _, _,
_, _, _, _, _,
L, N, N, N, L,
L, N, N, N, L,
L, N, N, N, L,
_, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, N, M, N, _, _,
_, _, _, N, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,

_, _, _, _, _,
_, _, _, _, _,
_, _, _, _, _,
_, _, _, _, _,
N, T, F, U, N,
N, M, M, M, N,
N, M, M, M, N,
_, N, N, N, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, M, M, F, M, M, _,
_, N, M, M, M, N, _,
_, _, N, M, N, _, _,
_, _, _, _, _, _, _,

_, _, T, _, _,
_, _, Y, _, _,
_, _, T, _, _,
_, _, T, _, _,
N, F, M, F, N,
N, M, M, M, N,
N, M, M, M, N,
_, N, M, N, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
N, M, T, _, _, M, N,
_, M, M, _, T, M, _,
_, N, M, M, M, N, _,
_, _, _, N, _, _, _,

_, _, _, _, _,
_, _, _, _, _,
_, _, _, _, _,
_, _, _, _, _,
N, U, F, T, N,
N, M, M, M, N,
N, M, M, M, N,
_, N, N, N, _,
_, _, _, T, _, _, _,
_, _, _, Y, _, _, _,
_, _, _, T, _, _, _,
_, _, _, T, _, _, _,
M, F, _, T, _, F, M,
N, M, _, _, _, M, N,
_, M, M, M, M, M, _,
_, _, N, M, N, _, _,

_, _, _, _, _,
_, _, _, _, _,
_, _, _, _, _,
_, _, _, _, _,
L, N, N, N, L,
L, N, N, N, L,
L, N, N, N, L,
_, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
N, M, _, _, T, M, N,
_, M, T, _, M, M, _,
_, N, M, M, M, N, _,
_, _, _, N, _, _, _,

_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, M, M, F, M, M, _,
_, N, M, M, M, N, _,
_, _, N, M, N, _, _,
_, _, _, _, _, _, _,

_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
_, _, N, M, N, _, _,
_, _, _, N, _, _, _,
_, _, _, _, _, _, _,
_, _, _, _, _, _, _,
},
yslice_prob = {
{ypos = 2, prob = 127},
{ypos = 6, prob = 127},
},
})

Expand Down

0 comments on commit 20b4338

Please sign in to comment.