Cuberite
A lightweight, fast and extensible game server for Minecraft
|
Base class (interface) for strategies for placing the starting pieces vertically. More...
#include <PiecePool.h>
Public Member Functions | |
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 int | GetVerticalPlacement (int a_BlockX, int a_BlockZ)=0 |
Returns the Y coord of the piece. More... | |
virtual bool | InitializeFromString (const AString &a_Params, bool a_LogWarnings)=0 |
Initializes the strategy's parameters from the string representation. More... | |
virtual | ~cVerticalStrategy () |
Base class (interface) for strategies for placing the starting pieces vertically.
Descendants can override the GetVerticalPlacement() method to provide custom placement decisions.
Definition at line 100 of file PiecePool.h.
|
inlinevirtual |
Definition at line 104 of file PiecePool.h.
|
inlinevirtual |
Called when the piece pool is assigned to a generator, so that the strategies may bind to the underlying subgenerators.
Reimplemented in cVerticalStrategyRange, cVerticalStrategyTerrainOrOceanTop, and cVerticalStrategyTerrainTop.
Definition at line 118 of file PiecePool.h.
|
pure virtual |
Returns the Y coord of the piece.
Implemented in cVerticalStrategyTerrainOrOceanTop, cVerticalStrategyTerrainTop, cVerticalStrategyRange, and cVerticalStrategyFixed.
|
pure virtual |
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.
Implemented in cVerticalStrategyTerrainOrOceanTop, cVerticalStrategyTerrainTop, cVerticalStrategyRange, and cVerticalStrategyFixed.