Cuberite
A lightweight, fast and extensible game server for Minecraft
|
#include <ComposableGenerator.h>
Public Member Functions | |
cComposableGenerator () | |
virtual void | Generate (cChunkDesc &a_ChunkDesc) override |
Does the actual chunk generation. More... | |
virtual void | GenerateBiomes (cChunkCoords a_ChunkCoords, cChunkDef::BiomeMap &a_BiomeMap) override |
Generates the biomes for the specified chunk. More... | |
virtual void | Initialize (cIniFile &a_IniFile) override |
Called to initialize the generator on server startup. More... | |
Public Member Functions inherited from cChunkGenerator | |
virtual EMCSBiome | GetBiomeAt (int a_BlockX, int a_BlockZ) |
Returns the biome at the specified coords. More... | |
int | GetSeed (void) const |
Returns the seed that was read from the INI file. More... | |
virtual | ~cChunkGenerator () |
Static Public Member Functions | |
static void | InitializeGeneratorDefaults (cIniFile &a_IniFile, eDimension a_Dimension) |
If there's no particular sub-generator set in the INI file, adds the default one, based on the dimension. More... | |
Static Public Member Functions inherited from cChunkGenerator | |
static std::unique_ptr< cChunkGenerator > | CreateFromIniFile (cIniFile &a_IniFile) |
Creates and initializes the entire generator based on the settings in the INI file. More... | |
Protected Member Functions | |
void | InitBiomeGen (cIniFile &a_IniFile) |
Reads the BiomeGen settings from the ini and initializes m_BiomeGen accordingly. More... | |
void | InitCompositionGen (cIniFile &a_IniFile) |
Reads the CompositionGen settings from the ini and initializes m_CompositionGen accordingly. More... | |
void | InitFinishGens (cIniFile &a_IniFile) |
Reads the finishers from the ini and initializes m_FinishGens accordingly. More... | |
void | InitShapeGen (cIniFile &a_IniFile) |
Reads the ShapeGen settings from the ini and initializes m_ShapeGen accordingly. More... | |
Protected Attributes | |
std::unique_ptr< cBiomeGen > | m_BiomeGen |
The biome generator. More... | |
std::unique_ptr< cTerrainHeightGen > | m_CompositedHeightCache |
The cache for the heights of the composited terrain. More... | |
std::unique_ptr< cTerrainCompositionGen > | m_CompositionGen |
The terrain composition generator. More... | |
std::vector< std::unique_ptr< cFinishGen > > | m_FinishGens |
The finisher generators, in the order in which they are applied. More... | |
std::unique_ptr< cTerrainShapeGen > | m_ShapeGen |
The terrain shape generator. More... | |
Protected Attributes inherited from cChunkGenerator | |
eDimension | m_Dimension |
The dimension, read from the INI file. More... | |
int | m_Seed |
The main seed, read from the INI file, used for the entire generator. More... | |
Private Types | |
using | Super = cChunkGenerator |
Definition at line 196 of file ComposableGenerator.h.
|
private |
Definition at line 199 of file ComposableGenerator.h.
cComposableGenerator::cComposableGenerator | ( | ) |
Definition at line 118 of file ComposableGenerator.cpp.
|
overridevirtual |
Does the actual chunk generation.
Descendants need to override this and generate into a_ChunkDesc.
Implements cChunkGenerator.
Definition at line 158 of file ComposableGenerator.cpp.
|
overridevirtual |
Generates the biomes for the specified chunk.
Used by the world loader if biomes failed loading.
Implements cChunkGenerator.
Definition at line 146 of file ComposableGenerator.cpp.
|
protected |
Reads the BiomeGen settings from the ini and initializes m_BiomeGen accordingly.
Definition at line 283 of file ComposableGenerator.cpp.
|
protected |
Reads the CompositionGen settings from the ini and initializes m_CompositionGen accordingly.
Definition at line 352 of file ComposableGenerator.cpp.
|
protected |
Reads the finishers from the ini and initializes m_FinishGens accordingly.
Definition at line 378 of file ComposableGenerator.cpp.
|
overridevirtual |
Called to initialize the generator on server startup.
Descendants should call Super::Initialize() before initializing themselves.
Reimplemented from cChunkGenerator.
Definition at line 129 of file ComposableGenerator.cpp.
|
static |
If there's no particular sub-generator set in the INI file, adds the default one, based on the dimension.
Definition at line 202 of file ComposableGenerator.cpp.
|
protected |
Reads the ShapeGen settings from the ini and initializes m_ShapeGen accordingly.
Definition at line 319 of file ComposableGenerator.cpp.
|
protected |
The biome generator.
Definition at line 219 of file ComposableGenerator.h.
|
protected |
The cache for the heights of the composited terrain.
Definition at line 228 of file ComposableGenerator.h.
|
protected |
The terrain composition generator.
Definition at line 225 of file ComposableGenerator.h.
|
protected |
The finisher generators, in the order in which they are applied.
Definition at line 231 of file ComposableGenerator.h.
|
protected |
The terrain shape generator.
Definition at line 222 of file ComposableGenerator.h.