diff --git a/init.lua b/init.lua index 0da8aa3..cd3afbf 100644 --- a/init.lua +++ b/init.lua @@ -191,8 +191,9 @@ minetest.register_on_generated(function(minp, maxp, seed) local elev, biome, water, road = realterrain.get_pixel(x, z) -- elevation in meters from DEM and water true/false --print("elev: "..elev..", biome: "..biome..", water: "..water..", road: "..road) - local ground, shrub, sprob, tprob + local ground, shrub, sprob, tprob, tree sprob, tprob = 10, 5 + tree = "tree" if biome < tonumber(realterrain.get_setting("b01cut")) then ground = cids[1].ground shrub = cids[1].shrub @@ -271,6 +272,10 @@ minetest.register_on_generated(function(minp, maxp, seed) if math.random(0,100) <= sprob then data[vi] = shrub end + if math.random(0,100) <= tprob then + --import appropriate tree .mts + minetest.place_schematic({x=x,y=y,z=z}, MODPATH.."/schems/"..tree..".mts") + end elseif y <= tonumber(realterrain.settings.waterlevel) then data[vi] = c_water end diff --git a/schems/tree.mts b/schems/tree.mts new file mode 100644 index 0000000..d8df3da Binary files /dev/null and b/schems/tree.mts differ