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

#include <FinishGen.h>

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

Classes

struct  BiomeInfo
 
struct  FoliageInfo
 

Public Member Functions

 cFinishGenClumpTopBlock (int a_Seed, std::vector< BiomeInfo > a_BlockList)
 
- Public Member Functions inherited from cFinishGen
virtual ~cFinishGen ()
 

Static Public Member Functions

static void ParseConfigurationString (const AString &a_String, std::vector< BiomeInfo > &a_Output)
 Parses a string and puts a vector with a length of biMaxVariantBiome in a_Output. More...
 
static std::vector< BiomeInfoParseIniFile (cIniFile &a_IniFile, const AString &a_ClumpPrefix)
 Parses an inifile in search for all clumps. More...
 

Protected Member Functions

virtual void GenFinish (cChunkDesc &a_ChunkDesc) override
 
void TryPlaceFoliageClump (cChunkDesc &a_ChunkDesc, int a_RelX, int a_RelZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, bool a_IsDoubleTall)
 

Protected Attributes

std::vector< BiomeInfom_FlowersPerBiome
 
cNoise m_Noise
 
const int MAX_NUM_FOLIAGE = 8
 The maximum number of foliage per clump. More...
 
const int MIN_NUM_FOLIAGE = 4
 The minimum number of foliage per clump. More...
 
const int RANGE_FROM_CENTER = 5
 The maximum range a foliage can be placed from the center of the clump. More...
 

Detailed Description

Definition at line 75 of file FinishGen.h.

Constructor & Destructor Documentation

◆ cFinishGenClumpTopBlock()

cFinishGenClumpTopBlock::cFinishGenClumpTopBlock ( int  a_Seed,
std::vector< BiomeInfo a_BlockList 
)
inline

Definition at line 114 of file FinishGen.h.

Member Function Documentation

◆ GenFinish()

void cFinishGenClumpTopBlock::GenFinish ( cChunkDesc a_ChunkDesc)
overrideprotectedvirtual

Implements cFinishGen.

Definition at line 185 of file FinishGen.cpp.

◆ ParseConfigurationString()

void cFinishGenClumpTopBlock::ParseConfigurationString ( const AString a_String,
std::vector< BiomeInfo > &  a_Output 
)
static

Parses a string and puts a vector with a length of biMaxVariantBiome in a_Output.

The format of the string is "<Biomes separated with a comma>;<Blocks separated with a comma>". This can also be repeated with a |

Definition at line 287 of file FinishGen.cpp.

◆ ParseIniFile()

std::vector< cFinishGenClumpTopBlock::BiomeInfo > cFinishGenClumpTopBlock::ParseIniFile ( cIniFile a_IniFile,
const AString a_ClumpPrefix 
)
static

Parses an inifile in search for all clumps.

Definition at line 372 of file FinishGen.cpp.

◆ TryPlaceFoliageClump()

void cFinishGenClumpTopBlock::TryPlaceFoliageClump ( cChunkDesc a_ChunkDesc,
int  a_RelX,
int  a_RelZ,
BLOCKTYPE  a_BlockType,
NIBBLETYPE  a_BlockMeta,
bool  a_IsDoubleTall 
)
protected

Definition at line 242 of file FinishGen.cpp.

Member Data Documentation

◆ m_FlowersPerBiome

std::vector<BiomeInfo> cFinishGenClumpTopBlock::m_FlowersPerBiome
protected

Definition at line 130 of file FinishGen.h.

◆ m_Noise

cNoise cFinishGenClumpTopBlock::m_Noise
protected

Definition at line 129 of file FinishGen.h.

◆ MAX_NUM_FOLIAGE

const int cFinishGenClumpTopBlock::MAX_NUM_FOLIAGE = 8
protected

The maximum number of foliage per clump.

Definition at line 133 of file FinishGen.h.

◆ MIN_NUM_FOLIAGE

const int cFinishGenClumpTopBlock::MIN_NUM_FOLIAGE = 4
protected

The minimum number of foliage per clump.

Definition at line 136 of file FinishGen.h.

◆ RANGE_FROM_CENTER

const int cFinishGenClumpTopBlock::RANGE_FROM_CENTER = 5
protected

The maximum range a foliage can be placed from the center of the clump.

Definition at line 139 of file FinishGen.h.


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