Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cCompoGenBiomal Class Reference
Inheritance diagram for cCompoGenBiomal:
Inheritance graph
[legend]
Collaboration diagram for cCompoGenBiomal:
Collaboration graph
[legend]

Public Member Functions

 cCompoGenBiomal (int a_Seed)
 
- Public Member Functions inherited from cTerrainCompositionGen
virtual ~cTerrainCompositionGen ()
 

Protected Member Functions

const cPattern::BlockInfoChooseOceanFloorPattern (int a_ChunkX, int a_ChunkZ, int a_RelX, int a_RelZ)
 Returns the pattern to use for an ocean floor in the specified column. More...
 
void ComposeColumn (cChunkDesc &a_ChunkDesc, int a_RelX, int a_RelZ, const Byte *a_ShapeColumn)
 Composes a single column in a_ChunkDesc. More...
 
virtual void ComposeTerrain (cChunkDesc &a_ChunkDesc, const cChunkDesc::Shape &a_Shape) override
 Generates the chunk's composition into a_ChunkDesc, using the terrain shape provided in a_Shape. More...
 
void FillColumnMesa (cChunkDesc &a_ChunkDesc, int a_RelX, int a_RelZ, const Byte *a_ShapeColumn)
 Fills the specified column with mesa pattern, based on the column height. More...
 
void FillColumnPattern (cChunkDesc &a_ChunkDesc, int a_RelX, int a_RelZ, const cPattern::BlockInfo *a_Pattern, const Byte *a_ShapeColumn)
 Fills the specified column with the specified pattern; restarts the pattern when air is reached, switches to ocean floor pattern if ocean is reached. More...
 
virtual void InitializeCompoGen (cIniFile &a_IniFile) override
 Reads parameters from the ini file, prepares generator for use. More...
 
void initMesaPattern (int a_Seed)
 Initializes the m_MesaPattern with a pattern based on the generator's seed. More...
 

Protected Attributes

cNoise m_MesaFloor
 Noise used for the floor of the clay blocks in mesa biomes. More...
 
cPattern::BlockInfo m_MesaPattern [2 *cChunkDef::Height]
 The pattern used for mesa biomes. More...
 
cNoise m_OceanFloorSelect
 Noise used for selecting between dirt and sand on the ocean floor. More...
 
HEIGHTTYPE m_SeaLevel
 The block height at which water is generated instead of air. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from cTerrainCompositionGen
static std::unique_ptr< cTerrainCompositionGenCreateCompositionGen (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...
 

Detailed Description

Definition at line 160 of file CompoGenBiomal.cpp.

Constructor & Destructor Documentation

◆ cCompoGenBiomal()

cCompoGenBiomal::cCompoGenBiomal ( int  a_Seed)
inline

Definition at line 164 of file CompoGenBiomal.cpp.

Member Function Documentation

◆ ChooseOceanFloorPattern()

const cPattern::BlockInfo* cCompoGenBiomal::ChooseOceanFloorPattern ( int  a_ChunkX,
int  a_ChunkZ,
int  a_RelX,
int  a_RelZ 
)
inlineprotected

Returns the pattern to use for an ocean floor in the specified column.

The returned pattern is guaranteed to be 256 blocks long.

Definition at line 556 of file CompoGenBiomal.cpp.

◆ ComposeColumn()

void cCompoGenBiomal::ComposeColumn ( cChunkDesc a_ChunkDesc,
int  a_RelX,
int  a_RelZ,
const Byte a_ShapeColumn 
)
inlineprotected

Composes a single column in a_ChunkDesc.

Chooses what to do based on the biome in that column.

Definition at line 283 of file CompoGenBiomal.cpp.

◆ ComposeTerrain()

virtual void cCompoGenBiomal::ComposeTerrain ( cChunkDesc a_ChunkDesc,
const cChunkDesc::Shape a_Shape 
)
inlineoverrideprotectedvirtual

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.

Implements cTerrainCompositionGen.

Definition at line 187 of file CompoGenBiomal.cpp.

◆ FillColumnMesa()

void cCompoGenBiomal::FillColumnMesa ( cChunkDesc a_ChunkDesc,
int  a_RelX,
int  a_RelZ,
const Byte a_ShapeColumn 
)
inlineprotected

Fills the specified column with mesa pattern, based on the column height.

Definition at line 465 of file CompoGenBiomal.cpp.

◆ FillColumnPattern()

void cCompoGenBiomal::FillColumnPattern ( cChunkDesc a_ChunkDesc,
int  a_RelX,
int  a_RelZ,
const cPattern::BlockInfo a_Pattern,
const Byte a_ShapeColumn 
)
inlineprotected

Fills the specified column with the specified pattern; restarts the pattern when air is reached, switches to ocean floor pattern if ocean is reached.

Always adds bedrock at the very bottom.

Definition at line 412 of file CompoGenBiomal.cpp.

◆ InitializeCompoGen()

virtual void cCompoGenBiomal::InitializeCompoGen ( cIniFile a_IniFile)
inlineoverrideprotectedvirtual

Reads parameters from the ini file, prepares generator for use.

Reimplemented from cTerrainCompositionGen.

Definition at line 201 of file CompoGenBiomal.cpp.

◆ initMesaPattern()

void cCompoGenBiomal::initMesaPattern ( int  a_Seed)
inlineprotected

Initializes the m_MesaPattern with a pattern based on the generator's seed.

Definition at line 209 of file CompoGenBiomal.cpp.

Member Data Documentation

◆ m_MesaFloor

cNoise cCompoGenBiomal::m_MesaFloor
protected

Noise used for the floor of the clay blocks in mesa biomes.

Definition at line 183 of file CompoGenBiomal.cpp.

◆ m_MesaPattern

cPattern::BlockInfo cCompoGenBiomal::m_MesaPattern[2 *cChunkDef::Height]
protected

The pattern used for mesa biomes.

Initialized by seed on generator creation.

Definition at line 177 of file CompoGenBiomal.cpp.

◆ m_OceanFloorSelect

cNoise cCompoGenBiomal::m_OceanFloorSelect
protected

Noise used for selecting between dirt and sand on the ocean floor.

Definition at line 180 of file CompoGenBiomal.cpp.

◆ m_SeaLevel

HEIGHTTYPE cCompoGenBiomal::m_SeaLevel
protected

The block height at which water is generated instead of air.

Definition at line 174 of file CompoGenBiomal.cpp.


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