--hi paramat :D
-- Set the 3D noise parameters for the terrain.
-local perlin= minetest.get_mapgen_params()
local np_terrain = {
offset = 0,
scale = 1,
spread = {x = 384, y = 192, z = 384},
- seed = 5900033, --perlin.seed
+ seed = tonumber(minetest.get_mapgen_setting("seed")) or math.random(0,999999999),
octaves = 5,
persist = 0.63,
lacunarity = 2.0,
return
end
-- Start time of mapchunk generation.
- --local t0 = os.clock()
+ --local t0 = minetest.get_us_time()/1000000
-- Noise stuff.
-- Create a flat array of noise values from the perlin map, with the
-- minimum point being 'minp'.
-- Set the buffer parameter to use and reuse 'nvals_terrain' for this.
- nobj_terrain:get3dMap_flat(minp, nvals_terrain)
+ nobj_terrain:get_3d_map_flat(minp, nvals_terrain)
-- Voxelmanip stuff.
--vm:update_liquids()
-- Print generation time of this mapchunk.
- --local chugent = math.ceil((os.clock() - t0) * 1000)
+ --local chugent = math.ceil((minetest.get_us_time()/1000000 - t0) * 1000)
--print ("[lvm_example] Mapchunk generation time " .. chugent .. " ms")
end)