![]() |
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... | |
![]() | |
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 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 | |
cBiomeGenPtr | m_BiomeGen |
The biome generator. More... | |
cTerrainHeightGenPtr | m_CompositedHeightCache |
The cache for the heights of the composited terrain. More... | |
cTerrainCompositionGenPtr | m_CompositionGen |
The terrain composition generator. More... | |
cFinishGenList | m_FinishGens |
The finisher generators, in the order in which they are applied. More... | |
cTerrainShapeGenPtr | m_ShapeGen |
The terrain shape generator. More... | |
![]() | |
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 | |
typedef cChunkGenerator | Super |
Definition at line 203 of file ComposableGenerator.h.
|
private |
Definition at line 206 of file ComposableGenerator.h.
cComposableGenerator::cComposableGenerator | ( | ) |
Definition at line 116 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 156 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 144 of file ComposableGenerator.cpp.
|
protected |
Reads the BiomeGen settings from the ini and initializes m_BiomeGen accordingly.
Definition at line 278 of file ComposableGenerator.cpp.
|
protected |
Reads the CompositionGen settings from the ini and initializes m_CompositionGen accordingly.
Definition at line 347 of file ComposableGenerator.cpp.
|
protected |
Reads the finishers from the ini and initializes m_FinishGens accordingly.
Definition at line 373 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 127 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 200 of file ComposableGenerator.cpp.
|
protected |
Reads the ShapeGen settings from the ini and initializes m_ShapeGen accordingly.
Definition at line 314 of file ComposableGenerator.cpp.
|
protected |
The biome generator.
Definition at line 225 of file ComposableGenerator.h.
|
protected |
The cache for the heights of the composited terrain.
Definition at line 234 of file ComposableGenerator.h.
|
protected |
The terrain composition generator.
Definition at line 231 of file ComposableGenerator.h.
|
protected |
The finisher generators, in the order in which they are applied.
Definition at line 237 of file ComposableGenerator.h.
|
protected |
The terrain shape generator.
Definition at line 228 of file ComposableGenerator.h.