Codebase list minetest-mod-nether / ea7a36a
Import upstream version 2+git20170104.1.bc2ccfb Debian Janitor 2 years ago
4 changed file(s) with 11 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
22 local NETHER_DEPTH = -5000
33 local TCAVE = 0.6
44 local BLEND = 128
5 local DEBUG = false
56
67
78 -- 3D noise
1213 spread = {x = 384, y = 128, z = 384}, -- squashed 3:1
1314 seed = 59033,
1415 octaves = 5,
15 persist = 0.7
16 persist = 0.7,
17 lacunarity = 2.0,
18 --flags = ""
1619 }
1720
1821
533536
534537 -- Mapgen
535538
536 -- Initialize noise object and localise noise buffer
539 -- Initialize noise object, localise noise and data buffers
537540
538541 local nobj_cave = nil
539542 local nbuf_cave
543 local dbuf
540544
541545
542546 -- Content ids
588592
589593 local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
590594 local area = VoxelArea:new{MinEdge = emin, MaxEdge = emax}
591 local data = vm:get_data()
595 local data = vm:get_data(dbuf)
592596
593597 local x11 = emax.x -- Limits of mapchunk plus mapblock shell
594598 local y11 = emax.y
677681 vm:update_liquids()
678682 vm:write_to_map()
679683
680 local chugent = math.ceil((os.clock() - t1) * 1000)
681 print ("[nether] generate chunk " .. chugent .. " ms")
684 if DEBUG then
685 local chugent = math.ceil((os.clock() - t1) * 1000)
686 print ("[nether] generate chunk " .. chugent .. " ms")
687 end
682688 end)
Binary diff not shown
Binary diff not shown
Binary diff not shown