]> git.lizzy.rs Git - Crafter.git/blobdiff - mods/nether/biomes.lua
remove server debug
[Crafter.git] / mods / nether / biomes.lua
index 95ab047aaf8b8e8978cdcf5237ebc626e6856a9f..15e32cba987a8c725f963ffca8aeaea1926f4daf 100644 (file)
@@ -38,12 +38,11 @@ minetest.register_decoration({
 --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,
@@ -130,7 +129,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
                return
        end
        -- Start time of mapchunk generation.
-       --local t0 = os.clock()
+       --local t0 = minetest.get_us_time()/1000000
        
        -- Noise stuff.
 
@@ -144,7 +143,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
        -- 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.
 
@@ -229,6 +228,6 @@ minetest.register_on_generated(function(minp, maxp, seed)
        --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)