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

Limit that accepts heights that are a specified number of blocks above terrain. More...

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

Public Member Functions

virtual void AssignGens (int a_Seed, cBiomeGen &a_BiomeGen, cTerrainHeightGen &a_TerrainHeightGen, int a_SeaLevel) override
 Called when the piece pool is assigned to a generator, so that the limits may bind to the underlying subgenerators. More...
 
virtual bool CanBeAtHeight (int a_BlockX, int a_BlockZ, int a_Height) override
 Called to inquire whether the specified piece can be placed at the specified height. More...
 
virtual bool InitializeFromString (const AString &a_Params, bool a_LogWarnings) override
 Initializes the limit's parameters from the string representation. More...
 
- Public Member Functions inherited from cPiece::cVerticalLimit
virtual ~cVerticalLimit ()
 

Protected Attributes

int m_MaxBlocksAbove
 How many blocks above the terrain level do we accept on maximum. More...
 
int m_MinBlocksAbove
 How many blocks above the terrain level do we accept on minimum. More...
 
cTerrainHeightGenm_TerrainHeightGen
 The underlying height generator. More...
 

Detailed Description

Limit that accepts heights that are a specified number of blocks above terrain.

Definition at line 114 of file VerticalLimit.cpp.

Member Function Documentation

◆ AssignGens()

virtual void cVerticalLimitAboveTerrain::AssignGens ( int  a_Seed,
cBiomeGen a_BiomeGen,
cTerrainHeightGen a_TerrainHeightGen,
int  a_SeaLevel 
)
inlineoverridevirtual

Called when the piece pool is assigned to a generator, so that the limits may bind to the underlying subgenerators.

Reimplemented from cPiece::cVerticalLimit.

Definition at line 139 of file VerticalLimit.cpp.

◆ CanBeAtHeight()

virtual bool cVerticalLimitAboveTerrain::CanBeAtHeight ( int  a_BlockX,
int  a_BlockZ,
int  a_Height 
)
inlineoverridevirtual

Called to inquire whether the specified piece can be placed at the specified height.

a_BlockX, a_BlockZ is the column of the connector that is being queried. a_Height is the requested height of the piece's lowest block.

Implements cPiece::cVerticalLimit.

Definition at line 118 of file VerticalLimit.cpp.

◆ InitializeFromString()

virtual bool cVerticalLimitAboveTerrain::InitializeFromString ( const AString a_Params,
bool  a_LogWarnings 
)
inlineoverridevirtual

Initializes the limit's parameters from the string representation.

a_Params is the string containing only the parameters (substring after the first pipe character in the limit description string). Returns true if successful, false if the string parsing failed. If a_LogWarnings is true, any error while parsing the string is output to the server console. Used when loading the limit from a file.

Implements cPiece::cVerticalLimit.

Definition at line 130 of file VerticalLimit.cpp.

Member Data Documentation

◆ m_MaxBlocksAbove

int cVerticalLimitAboveTerrain::m_MaxBlocksAbove
protected

How many blocks above the terrain level do we accept on maximum.

Definition at line 152 of file VerticalLimit.cpp.

◆ m_MinBlocksAbove

int cVerticalLimitAboveTerrain::m_MinBlocksAbove
protected

How many blocks above the terrain level do we accept on minimum.

Definition at line 149 of file VerticalLimit.cpp.

◆ m_TerrainHeightGen

cTerrainHeightGen* cVerticalLimitAboveTerrain::m_TerrainHeightGen
protected

The underlying height generator.

Definition at line 146 of file VerticalLimit.cpp.


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