Cuberite
A lightweight, fast and extensible game server for Minecraft
|
The Single Prefab Structure Generator: This uses the cGridStructGen to generate the structures on the map This is similar to the Piece Structure Generator but only placing one possible structure The Exported cubeset MUST have all possible structures as start structures or the server crashes on generation else it isn't accessible from the m_Piecepool. More...
#include <SinglePieceStructuresGen.h>
Classes | |
class | cGen |
Public Member Functions | |
cSinglePieceStructuresGen (int a_Seed) | |
virtual void | GenFinish (cChunkDesc &a_ChunkDesc) override |
bool | Initialize (const AString &a_Prefabs, int a_SeaLevel, cBiomeGen &a_BiomeGen, cTerrainHeightGen &a_HeightGen) |
Initializes the generator based on the specified prefab sets. More... | |
Public Member Functions inherited from cFinishGen | |
virtual | ~cFinishGen () |
Protected Types | |
typedef std::shared_ptr< cGen > | cGenPtr |
typedef std::vector< cGenPtr > | cGenPtrs |
Protected Attributes | |
cGenPtrs | m_Gens |
The individual structure generators, one per piecepool. More... | |
int | m_Seed |
The seed for the random number generator. More... | |
Private Types | |
using | Super = cFinishGen |
The Single Prefab Structure Generator: This uses the cGridStructGen to generate the structures on the map This is similar to the Piece Structure Generator but only placing one possible structure The Exported cubeset MUST have all possible structures as start structures or the server crashes on generation else it isn't accessible from the m_Piecepool.
Definition at line 21 of file SinglePieceStructuresGen.h.
|
protected |
Definition at line 44 of file SinglePieceStructuresGen.h.
|
protected |
Definition at line 45 of file SinglePieceStructuresGen.h.
|
private |
Definition at line 24 of file SinglePieceStructuresGen.h.
cSinglePieceStructuresGen::cSinglePieceStructuresGen | ( | int | a_Seed | ) |
Definition at line 154 of file SinglePieceStructuresGen.cpp.
|
overridevirtual |
Implements cFinishGen.
Definition at line 200 of file SinglePieceStructuresGen.cpp.
bool cSinglePieceStructuresGen::Initialize | ( | const AString & | a_Prefabs, |
int | a_SeaLevel, | ||
cBiomeGen & | a_BiomeGen, | ||
cTerrainHeightGen & | a_HeightGen | ||
) |
Initializes the generator based on the specified prefab sets.
a_Prefabs contains the list of prefab sets that should be activated, "|"-separated. All problems are logged to the console and the generator skips over them. Returns true if at least one prefab set is valid (the generator should be kept).
Definition at line 163 of file SinglePieceStructuresGen.cpp.
|
protected |
The individual structure generators, one per piecepool.
Definition at line 48 of file SinglePieceStructuresGen.h.
|
protected |
The seed for the random number generator.
Definition at line 51 of file SinglePieceStructuresGen.h.