#define MGV5_LARGE_CAVE_DEPTH -256
+///////// Mapgen V5 flags
+#define MGV5_CAVERNS 0x01
+
class BiomeManager;
extern FlagDesc flagdesc_mapgen_v5[];
-
-struct MapgenV5Params : public MapgenSpecificParams {
+struct MapgenV5Params : public MapgenParams
+{
u32 spflags;
float cave_width;
+ s16 cavern_limit;
+ s16 cavern_taper;
+ float cavern_threshold;
+
NoiseParams np_filler_depth;
NoiseParams np_factor;
NoiseParams np_height;
+ NoiseParams np_ground;
NoiseParams np_cave1;
NoiseParams np_cave2;
- NoiseParams np_ground;
+ NoiseParams np_cavern;
MapgenV5Params();
~MapgenV5Params() {}
void writeParams(Settings *settings) const;
};
-
-class MapgenV5 : public MapgenBasic {
+class MapgenV5 : public MapgenBasic
+{
public:
- u32 spflags;
- Noise *noise_factor;
- Noise *noise_height;
- Noise *noise_ground;
-
- content_t c_lava_source;
- content_t c_ice;
-
- content_t c_cobble;
- content_t c_stair_cobble;
- content_t c_mossycobble;
- content_t c_sandstonebrick;
- content_t c_stair_sandstonebrick;
-
- MapgenV5(int mapgenid, MapgenParams *params, EmergeManager *emerge);
+ MapgenV5(int mapgenid, MapgenV5Params *params, EmergeManager *emerge);
~MapgenV5();
+ virtual MapgenType getType() const { return MAPGEN_V5; }
+
virtual void makeChunk(BlockMakeData *data);
int getSpawnLevelAtPoint(v2s16 p);
- void calculateNoise();
int generateBaseTerrain();
-};
-
-struct MapgenFactoryV5 : public MapgenFactory {
- Mapgen *createMapgen(int mgid, MapgenParams *params, EmergeManager *emerge)
- {
- return new MapgenV5(mgid, params, emerge);
- };
-
- MapgenSpecificParams *createMapgenParams()
- {
- return new MapgenV5Params();
- };
+private:
+ Noise *noise_factor;
+ Noise *noise_height;
+ Noise *noise_ground;
};
#endif