Cuberite
A lightweight, fast and extensible game server for Minecraft
|
A vertical strategy that places the piece within a range on top of the terrain or ocean, whichever's higher. More...
Public Member Functions | |
virtual void | AssignGens (int a_Seed, cBiomeGen &a_BiomeGen, cTerrainHeightGen &a_HeightGen, 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... | |
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 | |
cTerrainHeightGen * | m_HeightGen |
Height generator from which the top of the terrain is read. More... | |
int | m_MinRelHeight |
Minimum relative height at which the prefab is placed. More... | |
int | m_RelHeightRange |
Range of the relative heights at which the prefab can be placed above the minimum. More... | |
int | m_SeaLevel |
The sea level used by the world. More... | |
int | m_Seed |
Seed for the random generator. More... | |
A vertical strategy that places the piece within a range on top of the terrain or ocean, whichever's higher.
Definition at line 223 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 253 of file VerticalStrategy.cpp.
|
inlineoverridevirtual |
Returns the Y coord of the piece.
Implements cPiece::cVerticalStrategy.
Definition at line 228 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 244 of file VerticalStrategy.cpp.
|
protected |
Height generator from which the top of the terrain is read.
Definition at line 265 of file VerticalStrategy.cpp.
|
protected |
Minimum relative height at which the prefab is placed.
Definition at line 271 of file VerticalStrategy.cpp.
|
protected |
Range of the relative heights at which the prefab can be placed above the minimum.
Definition at line 274 of file VerticalStrategy.cpp.
|
protected |
The sea level used by the world.
Definition at line 268 of file VerticalStrategy.cpp.
|
protected |
Seed for the random generator.
Definition at line 262 of file VerticalStrategy.cpp.