forked from HeroOfTheWinds/minetest-caverealms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
46 lines (40 loc) · 1.13 KB
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
-- caverealms v.0.8 by HeroOfTheWinds
-- original cave code modified from paramat's subterrain
-- For Minetest 0.4.8 stable
-- Depends default
-- License: code WTFPL
--grab a shorthand for the filepath of the mod
local modpath = minetest.get_modpath(minetest.get_current_modname())
caverealms = {}
--load companion lua files
dofile(modpath.."/config.lua") --configuration file; holds various constants
dofile(modpath.."/crafting.lua")
dofile(modpath.."/falling_ice.lua")
dofile(modpath.."/nodes.lua")
dofile(modpath.."/caverealms_biomes.lua")
local caverealms_def = {
minimum_depth = caverealms.config.ymax,
maximum_depth = caverealms.config.ymin,
cave_threshold = caverealms.config.tcave,
boundary_blend_range = 128,
perlin_cave = {
offset = 0,
scale = 1,
spread = {x=256, y=256, z=256},
seed = -400000000089,
octaves = 3,
persist = 0.67
},
perlin_wave = {
offset = 0,
scale = 1,
spread = {x=512, y=256, z=512}, -- squashed 2:1
seed = 59033,
octaves = 6,
persist = 0.63
},
}
subterrane:register_cave_layer(caverealms_def)
if caverealms.config.cavespawn then
subterrane:register_cave_spawn(caverealms_def, -960)
end