Cuberite
A lightweight, fast and extensible game server for Minecraft
|
The interface that a terrain composition generator must implement Terrain composition takes chunk coords on input and outputs the blockdata for that entire chunk, along with the list of entities. More...
#include <ComposableGenerator.h>
Public Member Functions | |
virtual void | ComposeTerrain (cChunkDesc &a_ChunkDesc, const cChunkDesc::Shape &a_Shape)=0 |
Generates the chunk's composition into a_ChunkDesc, using the terrain shape provided in a_Shape. More... | |
virtual void | InitializeCompoGen (cIniFile &a_IniFile) |
Reads parameters from the ini file, prepares generator for use. More... | |
virtual | ~cTerrainCompositionGen () |
Static Public Member Functions | |
static std::unique_ptr< cTerrainCompositionGen > | CreateCompositionGen (cIniFile &a_IniFile, cBiomeGen &a_BiomeGen, cTerrainShapeGen &a_ShapeGen, int a_Seed) |
Creates the correct TerrainCompositionGen descendant based on the ini file settings and the seed provided. More... | |
The interface that a terrain composition generator must implement Terrain composition takes chunk coords on input and outputs the blockdata for that entire chunk, along with the list of entities.
It is supposed to make use of the underlying TerrainHeightGen and BiomeGen for that purpose, but it may request information for other chunks than the one it's currently generating from them.
Definition at line 150 of file ComposableGenerator.h.
|
inlinevirtual |
Definition at line 153 of file ComposableGenerator.h.
|
pure virtual |
Generates the chunk's composition into a_ChunkDesc, using the terrain shape provided in a_Shape.
Is expected to fill a_ChunkDesc's heightmap with the data from a_Shape.
Implemented in cEndGen, cCompoGenBiomal, cCompoGenCache, cCompoGenNether, cCompoGenClassic, cCompoGenDebugBiomes, and cCompoGenSameBlock.
|
static |
Creates the correct TerrainCompositionGen descendant based on the ini file settings and the seed provided.
a_BiomeGen is the underlying biome generator, some composition generators may depend on it providing additional biomes around the chunk a_ShapeGen is the underlying shape generator, some composition generators may depend on it providing additional shape around the chunk.
Definition at line 42 of file ComposableGenerator.cpp.
|
inlinevirtual |
Reads parameters from the ini file, prepares generator for use.
Reimplemented in cCompoGenBiomal, cCompoGenCache, cCompoGenNether, cCompoGenClassic, and cCompoGenSameBlock.
Definition at line 160 of file ComposableGenerator.h.