X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=mods%2Fnether%2Fbiomes.lua;h=15e32cba987a8c725f963ffca8aeaea1926f4daf;hb=48aa89197636250b3e494e9124c7c5c6e2d63dea;hp=95ab047aaf8b8e8978cdcf5237ebc626e6856a9f;hpb=164fc9543e0014cf1a715315a132debe9a7968e7;p=Crafter.git diff --git a/mods/nether/biomes.lua b/mods/nether/biomes.lua index 95ab047..15e32cb 100644 --- a/mods/nether/biomes.lua +++ b/mods/nether/biomes.lua @@ -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)