mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Cavegen/Mgv5/Mgv7: Add optional giant caverns
Add to MapgenBasic for use by multiple mapgens. Add to mgv5 and mgv7, enabled by default. Similar to mgvalleys caverns but half the scale. Parameters for upper y limit, distance caverns taper to full size, and noise threshold (full cavern size). As with mgvalleys caverns are generated first and classic caves are disabled in any mapchunk containing a cavern, to avoid excessive spreading volumes of liquids. This also avoids floating blobs of liquid where a large classic cave has overgenerated out into a neighbouring previously-generated mapchunk.
This commit is contained in:
@@ -840,6 +840,18 @@ void MapgenBasic::generateCaves(s16 max_stone_y, s16 large_cave_depth)
|
||||
}
|
||||
|
||||
|
||||
bool MapgenBasic::generateCaverns(s16 max_stone_y)
|
||||
{
|
||||
if (node_min.Y > max_stone_y || node_min.Y > cavern_limit)
|
||||
return false;
|
||||
|
||||
CavernsNoise caverns_noise(ndef, csize, &np_cavern,
|
||||
seed, cavern_limit, cavern_taper, cavern_threshold);
|
||||
|
||||
return caverns_noise.generateCaverns(vm, node_min, node_max);
|
||||
}
|
||||
|
||||
|
||||
void MapgenBasic::generateDungeons(s16 max_stone_y, MgStoneType stone_type)
|
||||
{
|
||||
if (max_stone_y < node_min.Y)
|
||||
|
Reference in New Issue
Block a user