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

This class adds a single top block in random positions in the specified biome on top of specified allowed blocks. More...

#include <FinishGen.h>

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

Public Types

typedef std::vector< EMCSBiomeBiomeList
 
typedef std::vector< BLOCKTYPEBlockList
 

Public Member Functions

 cFinishGenSingleTopBlock (int a_Seed, BLOCKTYPE a_BlockType, BiomeList a_Biomes, int a_Amount, BlockList a_AllowedBelow)
 
- Public Member Functions inherited from cFinishGen
virtual ~cFinishGen ()
 

Public Attributes

bool m_IsAllowedBelow [256]
 
bool m_IsBiomeAllowed [256]
 

Protected Member Functions

virtual void GenFinish (cChunkDesc &a_ChunkDesc) override
 
int GetNumToGen (const cChunkDef::BiomeMap &a_BiomeMap)
 
bool IsAllowedBiome (EMCSBiome a_Biome)
 Returns true if the given biome is a biome that is allowed. More...
 
bool IsAllowedBlockBelow (BLOCKTYPE a_BlockBelow)
 Returns true if the given blocktype may be below m_BlockType. More...
 

Protected Attributes

int m_Amount
 Relative amount of blocks to try adding. More...
 
BLOCKTYPE m_BlockType
 
cNoise m_Noise
 

Detailed Description

This class adds a single top block in random positions in the specified biome on top of specified allowed blocks.

Used for:

Definition at line 274 of file FinishGen.h.

Member Typedef Documentation

◆ BiomeList

Definition at line 281 of file FinishGen.h.

◆ BlockList

Definition at line 278 of file FinishGen.h.

Constructor & Destructor Documentation

◆ cFinishGenSingleTopBlock()

cFinishGenSingleTopBlock::cFinishGenSingleTopBlock ( int  a_Seed,
BLOCKTYPE  a_BlockType,
BiomeList  a_Biomes,
int  a_Amount,
BlockList  a_AllowedBelow 
)
inline

Definition at line 285 of file FinishGen.h.

Member Function Documentation

◆ GenFinish()

void cFinishGenSingleTopBlock::GenFinish ( cChunkDesc a_ChunkDesc)
overrideprotectedvirtual

Implements cFinishGen.

Definition at line 1175 of file FinishGen.cpp.

◆ GetNumToGen()

int cFinishGenSingleTopBlock::GetNumToGen ( const cChunkDef::BiomeMap a_BiomeMap)
protected

Definition at line 1158 of file FinishGen.cpp.

◆ IsAllowedBiome()

bool cFinishGenSingleTopBlock::IsAllowedBiome ( EMCSBiome  a_Biome)
inlineprotected

Returns true if the given biome is a biome that is allowed.

Definition at line 329 of file FinishGen.h.

◆ IsAllowedBlockBelow()

bool cFinishGenSingleTopBlock::IsAllowedBlockBelow ( BLOCKTYPE  a_BlockBelow)
inlineprotected

Returns true if the given blocktype may be below m_BlockType.

Definition at line 335 of file FinishGen.h.

Member Data Documentation

◆ m_Amount

int cFinishGenSingleTopBlock::m_Amount
protected

Relative amount of blocks to try adding.

1 = one block per 256 biome columns.

Definition at line 323 of file FinishGen.h.

◆ m_BlockType

BLOCKTYPE cFinishGenSingleTopBlock::m_BlockType
protected

Definition at line 320 of file FinishGen.h.

◆ m_IsAllowedBelow

bool cFinishGenSingleTopBlock::m_IsAllowedBelow[256]

Definition at line 279 of file FinishGen.h.

◆ m_IsBiomeAllowed

bool cFinishGenSingleTopBlock::m_IsBiomeAllowed[256]

Definition at line 282 of file FinishGen.h.

◆ m_Noise

cNoise cFinishGenSingleTopBlock::m_Noise
protected

Definition at line 319 of file FinishGen.h.


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