18 #include "../Noise/Noise.h" 19 #include "../VoronoiMap.h" 67 m_Coords(0x7fffffff, 0x7fffffff)
135 void InitializeBiomes(
const AString & a_Biomes);
177 EMCSBiome VoronoiBiome(
int a_BlockX,
int a_BlockZ);
212 void Distort(
int a_BlockX,
int a_BlockZ,
int & a_DistortedX,
int & a_DistortedZ);
243 typedef int IntMap[17 * 17];
244 typedef double DblMap[17 * 17];
263 void Distort(
int a_BlockX,
int a_BlockZ,
int & a_DistortedX,
int & a_DistortedZ,
int a_CellSize);
266 void BuildTemperatureHumidityMaps(
cChunkCoords a_ChunkCoords, IntMap & a_TemperatureMap, IntMap & a_HumidityMap);
269 void DecideLandBiomes(
cChunkDef::BiomeMap & a_BiomeMap,
const IntMap & a_TemperatureMap,
const IntMap & a_HumidityMap);
318 EMCSBiome SelectBiome(
int a_BiomeGroup,
size_t a_BiomeIdx,
int a_DistLevel);
cVoronoiMap m_VoronoiSmall
The Voronoi map that decides biomes inside individual biome groups.
std::vector< sCacheData > m_CacheData
int m_CellSize
Size of the Voronoi cells, also used for distortion amplitude.
cVoronoiMap m_Voronoi
The underlying Voronoi map of the biomes.
size_t m_NumSubCaches
Number of sub-caches.
virtual void GenBiomes(cChunkCoords a_ChunkCoords, cChunkDef::BiomeMap &a_BiomeMap) override
Generates biomes for the given chunk.
EMCSBiome
Biome IDs The first batch corresponds to the clientside biomes, used by MineCraft.
std::vector< EMCSBiome > EMCSBiomes
double m_RiverWidthThreshold
sCacheData()
Default constructor: Fill in bogus coords so that the item is not used in the cache until properly ca...
cChunkDef::BiomeMap m_BiomeMap
cNoise m_Noise
Noise used for the distortion.
cBiomeGenPtrs m_Caches
Individual sub-caches.
cBiomeGenPtr m_BioGenToCache
Base class for generators that use a list of available biomes.
A simple cache that stores N most recently generated chunks' biomes; N being settable upon creation...
std::vector< cBiomeGenPtr > cBiomeGenPtrs
cBioGenVoronoi(int a_Seed)
virtual void InitializeBiomeGen(cIniFile &a_IniFile) override
Reads parameters from the ini file, prepares generator for use.
cBioGenDistortedVoronoi(int a_Seed)
cVoronoiMap m_VoronoiLarge
The Voronoi map that decides the groups of biomes.
EMCSBiome BiomeMap[Width *Width]
The type used for any biomemap operations and storage inside Cuberite, using Cuberite biomes (need no...
std::vector< size_t > m_CacheOrder
The interface that a biome generator must implement A biome generator takes chunk coords on input and...
std::shared_ptr< cBiomeGen > cBiomeGenPtr