Cuberite
A lightweight, fast and extensible game server for Minecraft
|
A vertical strategy that places the piece in a random height between two heights. More...
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 strategies may bind to the underlying subgenerators. More... | |
cVerticalStrategyRange (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 | ~cVerticalStrategy () |
Protected Attributes | |
int | m_Min |
Range for the random generator. More... | |
int | m_Range |
int | m_Seed |
Seed for the random generator. More... | |
A vertical strategy that places the piece in a random height between two heights.
Definition at line 107 of file VerticalStrategy.cpp.
|
inline |
Definition at line 111 of file VerticalStrategy.cpp.
|
inlineoverridevirtual |
Called when the piece pool is assigned to a generator, so that the strategies may bind to the underlying subgenerators.
Reimplemented from cPiece::cVerticalStrategy.
Definition at line 150 of file VerticalStrategy.cpp.
|
inlineoverridevirtual |
Returns the Y coord of the piece.
Implements cPiece::cVerticalStrategy.
Definition at line 119 of file VerticalStrategy.cpp.
|
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 126 of file VerticalStrategy.cpp.
|
protected |
Range for the random generator.
Received in InitializeFromString().
Definition at line 160 of file VerticalStrategy.cpp.
|
protected |
Definition at line 160 of file VerticalStrategy.cpp.
|
protected |
Seed for the random generator.
Received in AssignGens().
Definition at line 157 of file VerticalStrategy.cpp.