Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | List of all members
cComposableGenerator Class Reference

#include <ComposableGenerator.h>

Inheritance diagram for cComposableGenerator:
Inheritance graph
[legend]
Collaboration diagram for cComposableGenerator:
Collaboration graph
[legend]

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< cChunkGeneratorCreateFromIniFile (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...
 
- 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

typedef cChunkGenerator Super
 

Detailed Description

Definition at line 203 of file ComposableGenerator.h.

Member Typedef Documentation

Definition at line 206 of file ComposableGenerator.h.

Constructor & Destructor Documentation

cComposableGenerator::cComposableGenerator ( )

Definition at line 116 of file ComposableGenerator.cpp.

Member Function Documentation

void cComposableGenerator::Generate ( cChunkDesc a_ChunkDesc)
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.

void cComposableGenerator::GenerateBiomes ( cChunkCoords  a_ChunkCoords,
cChunkDef::BiomeMap a_BiomeMap 
)
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.

void cComposableGenerator::InitBiomeGen ( cIniFile a_IniFile)
protected

Reads the BiomeGen settings from the ini and initializes m_BiomeGen accordingly.

Definition at line 278 of file ComposableGenerator.cpp.

void cComposableGenerator::InitCompositionGen ( cIniFile a_IniFile)
protected

Reads the CompositionGen settings from the ini and initializes m_CompositionGen accordingly.

Definition at line 347 of file ComposableGenerator.cpp.

void cComposableGenerator::InitFinishGens ( cIniFile a_IniFile)
protected

Reads the finishers from the ini and initializes m_FinishGens accordingly.

Definition at line 373 of file ComposableGenerator.cpp.

void cComposableGenerator::Initialize ( cIniFile a_IniFile)
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.

void cComposableGenerator::InitializeGeneratorDefaults ( cIniFile a_IniFile,
eDimension  a_Dimension 
)
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.

void cComposableGenerator::InitShapeGen ( cIniFile a_IniFile)
protected

Reads the ShapeGen settings from the ini and initializes m_ShapeGen accordingly.

Definition at line 314 of file ComposableGenerator.cpp.

Member Data Documentation

cBiomeGenPtr cComposableGenerator::m_BiomeGen
protected

The biome generator.

Definition at line 225 of file ComposableGenerator.h.

cTerrainHeightGenPtr cComposableGenerator::m_CompositedHeightCache
protected

The cache for the heights of the composited terrain.

Definition at line 234 of file ComposableGenerator.h.

cTerrainCompositionGenPtr cComposableGenerator::m_CompositionGen
protected

The terrain composition generator.

Definition at line 231 of file ComposableGenerator.h.

cFinishGenList cComposableGenerator::m_FinishGens
protected

The finisher generators, in the order in which they are applied.

Definition at line 237 of file ComposableGenerator.h.

cTerrainShapeGenPtr cComposableGenerator::m_ShapeGen
protected

The terrain shape generator.

Definition at line 228 of file ComposableGenerator.h.


The documentation for this class was generated from the following files: