ns_vl_caves/mapgen.lua

123 lines
2.8 KiB
Lua
Raw Normal View History

2024-09-12 16:52:27 +00:00
local WORLD_DEPTH = -3000
function ns_cavegen.cave_vastness(pos)
if pos.y > -5 or pos.y < WORLD_DEPTH then
return 0
end
local y = math.abs(pos.y)
-- Sinusoid shape increase
local amplitude = math.sqrt(y / math.abs(WORLD_DEPTH)) / 2
local period = 1000 / (2 * math.pi)
local offset = 250
local sinusoid_shape = amplitude * (math.sin((y - offset) / period) + 1)
-- Slow increase
local slow_increase = y / math.abs(WORLD_DEPTH)
return 0.2 * slow_increase + 0.8 * sinusoid_shape
end
-- SHAPES
ns_cavegen.register_shape({
name = "ns_vl_caves:bubbles_many",
noise_params = {
offset = 0,
scale = 0.8,
spread = { x = 30, y = 30, z = 30 },
seed = 364802,
octaves = 1,
persistence = 0.2,
lacunarity = 1.0,
flags = "eased",
},
connectivity_point = 44,
verticality_point = 37,
})
ns_cavegen.register_shape({
name = "ns_vl_caves:bubbles",
noise_params = {
offset = 0.2,
scale = 0.6,
spread = { x = 100, y = 100, z = 100 },
seed = 248039,
octaves = 2,
persistence = 0.6,
lacunarity = 2.0,
flags = "eased"
},
connectivity_point = 10,
verticality_point = 20,
})
ns_cavegen.register_shape({
name = "ns_vl_caves:cliffs",
noise_params = {
offset = -0.3,
scale = 0.7,
spread = { x = 40, y = 300, z = 10 },
seed = 1012434,
octaves = 3,
persistence = 0.3,
lacunarity = 3.0,
flags = "eased",
},
connectivity_point = 18,
verticality_point = 96,
})
ns_cavegen.register_shape({
name = "ns_vl_caves:horizontal_spaghetti",
noise_params = {
offset = -0.3,
scale = 0.7,
spread = { x = 300, y = 10, z = 40 },
seed = 73405,
octaves = 3,
persistence = 0.3,
lacunarity = 3.0,
flags = "eased",
},
connectivity_point = 83,
verticality_point = 5,
})
ns_cavegen.register_shape({
name = "ns_vl_caves:sideways_spaghetti",
noise_params = {
offset = -0.3,
scale = 0.7,
spread = { x = 10, y = 40, z = 300 },
seed = 73405,
octaves = 3,
persistence = 0.3,
lacunarity = 3.0,
flags = "eased",
},
connectivity_point = 82,
verticality_point = 4,
})
-- BIOMES
-- ns_cavegen.register_biome({
-- name = "ns_vl_caves:light_floor",
-- -- node_floor = "mcl_crimson:shroomlight",
-- node_dust = "mcl_core:light_14",
-- node_wall = "mcl_nether:glowstone",
-- node_roof = "mcl_crimson:shroomlight",
-- heat_point = 42,
-- humidity_point = 33,
-- })
-- ns_cavegen.register_biome({
-- name = "ns_vl_caves:dark_floor",
-- node_floor = "mcl_core:cobble",
-- node_wall = "mcl_core:cobble",
-- heat_point = 73,
-- humidity_point = 23,
-- })