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

A vertical strategy that places the piece at a predefined height. More...

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

Public Member Functions

 cVerticalStrategyFixed (void)
 
virtual int GetVerticalPlacement (int a_BlockX, int a_BlockZ) override
 Returns the Y coord of the piece. More...
 
virtual bool InitializeFromString (const AString &a_Params, bool a_LogWarnings) override
 Initializes the strategy's parameters from the string representation. More...
 
- Public Member Functions inherited from cPiece::cVerticalStrategy
virtual void AssignGens (int a_Seed, cBiomeGen &a_BiomeGen, cTerrainHeightGen &a_TerrainHeightGen, int a_SeaLevel)
 Called when the piece pool is assigned to a generator, so that the strategies may bind to the underlying subgenerators. More...
 
virtual ~cVerticalStrategy ()
 

Protected Attributes

int m_Height
 Height at which the pieces are placed. More...
 

Detailed Description

A vertical strategy that places the piece at a predefined height.

Definition at line 68 of file VerticalStrategy.cpp.

Constructor & Destructor Documentation

◆ cVerticalStrategyFixed()

cVerticalStrategyFixed::cVerticalStrategyFixed ( void  )
inline

Definition at line 72 of file VerticalStrategy.cpp.

Member Function Documentation

◆ GetVerticalPlacement()

virtual int cVerticalStrategyFixed::GetVerticalPlacement ( int  a_BlockX,
int  a_BlockZ 
)
inlineoverridevirtual

Returns the Y coord of the piece.

Implements cPiece::cVerticalStrategy.

Definition at line 78 of file VerticalStrategy.cpp.

◆ InitializeFromString()

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

Initializes the strategy's parameters from the string representation.

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

Implements cPiece::cVerticalStrategy.

Definition at line 84 of file VerticalStrategy.cpp.

Member Data Documentation

◆ m_Height

int cVerticalStrategyFixed::m_Height
protected

Height at which the pieces are placed.

Note that this height may be outside the world, so that only a part of the piece is generated.

Definition at line 98 of file VerticalStrategy.cpp.


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