Cuberite
A lightweight, fast and extensible game server for Minecraft
|
A vertical strategy that places the piece in a specified range relative to the top of the terrain. 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_Seed |
Seed for the random generator. More... | |
A vertical strategy that places the piece in a specified range relative to the top of the terrain.
Definition at line 169 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 197 of file VerticalStrategy.cpp.
|
inlineoverridevirtual |
Returns the Y coord of the piece.
Implements cPiece::cVerticalStrategy.
Definition at line 174 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 188 of file VerticalStrategy.cpp.
|
protected |
Height generator from which the top of the terrain is read.
Definition at line 208 of file VerticalStrategy.cpp.
|
protected |
Minimum relative height at which the prefab is placed.
Definition at line 211 of file VerticalStrategy.cpp.
|
protected |
Range of the relative heights at which the prefab can be placed above the minimum.
Definition at line 214 of file VerticalStrategy.cpp.
|
protected |
Seed for the random generator.
Definition at line 205 of file VerticalStrategy.cpp.