1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00: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:
paramat 2017-03-12 13:26:09 +00:00
parent 86b1542181
commit 859141a0ce
10 changed files with 303 additions and 54 deletions

View file

@ -243,6 +243,7 @@ public:
virtual ~MapgenBasic();
virtual void generateCaves(s16 max_stone_y, s16 large_cave_depth);
virtual bool generateCaverns(s16 max_stone_y);
virtual void generateDungeons(s16 max_stone_y, MgStoneType stone_type);
virtual MgStoneType generateBiomes();
virtual void dustTopNodes();
@ -282,7 +283,11 @@ protected:
NoiseParams np_cave1;
NoiseParams np_cave2;
NoiseParams np_cavern;
float cave_width;
float cavern_limit;
float cavern_taper;
float cavern_threshold;
};
#endif