Import upstream version 2+git20170104.1.bc2ccfb
Debian Janitor
2 years ago
2 | 2 | local NETHER_DEPTH = -5000 |
3 | 3 | local TCAVE = 0.6 |
4 | 4 | local BLEND = 128 |
5 | local DEBUG = false | |
5 | 6 | |
6 | 7 | |
7 | 8 | -- 3D noise |
12 | 13 | spread = {x = 384, y = 128, z = 384}, -- squashed 3:1 |
13 | 14 | seed = 59033, |
14 | 15 | octaves = 5, |
15 | persist = 0.7 | |
16 | persist = 0.7, | |
17 | lacunarity = 2.0, | |
18 | --flags = "" | |
16 | 19 | } |
17 | 20 | |
18 | 21 | |
533 | 536 | |
534 | 537 | -- Mapgen |
535 | 538 | |
536 | -- Initialize noise object and localise noise buffer | |
539 | -- Initialize noise object, localise noise and data buffers | |
537 | 540 | |
538 | 541 | local nobj_cave = nil |
539 | 542 | local nbuf_cave |
543 | local dbuf | |
540 | 544 | |
541 | 545 | |
542 | 546 | -- Content ids |
588 | 592 | |
589 | 593 | local vm, emin, emax = minetest.get_mapgen_object("voxelmanip") |
590 | 594 | local area = VoxelArea:new{MinEdge = emin, MaxEdge = emax} |
591 | local data = vm:get_data() | |
595 | local data = vm:get_data(dbuf) | |
592 | 596 | |
593 | 597 | local x11 = emax.x -- Limits of mapchunk plus mapblock shell |
594 | 598 | local y11 = emax.y |
677 | 681 | vm:update_liquids() |
678 | 682 | vm:write_to_map() |
679 | 683 | |
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 | |
682 | 688 | end) |
Binary diff not shown
Binary diff not shown
Binary diff not shown