Cuberite
A lightweight, fast and extensible game server for Minecraft
Classes | Public Member Functions | Protected Types | Protected Attributes | Private Types | List of all members
cSinglePieceStructuresGen Class Reference

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>

Inheritance diagram for cSinglePieceStructuresGen:
Inheritance graph
[legend]
Collaboration diagram for cSinglePieceStructuresGen:
Collaboration graph
[legend]

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< cGencGenPtr
 
typedef std::vector< cGenPtrcGenPtrs
 

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
 

Detailed Description

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.

Member Typedef Documentation

◆ cGenPtr

typedef std::shared_ptr<cGen> cSinglePieceStructuresGen::cGenPtr
protected

Definition at line 44 of file SinglePieceStructuresGen.h.

◆ cGenPtrs

typedef std::vector<cGenPtr> cSinglePieceStructuresGen::cGenPtrs
protected

Definition at line 45 of file SinglePieceStructuresGen.h.

◆ Super

Definition at line 24 of file SinglePieceStructuresGen.h.

Constructor & Destructor Documentation

◆ cSinglePieceStructuresGen()

cSinglePieceStructuresGen::cSinglePieceStructuresGen ( int  a_Seed)

Definition at line 154 of file SinglePieceStructuresGen.cpp.

Member Function Documentation

◆ GenFinish()

void cSinglePieceStructuresGen::GenFinish ( cChunkDesc a_ChunkDesc)
overridevirtual

Implements cFinishGen.

Definition at line 200 of file SinglePieceStructuresGen.cpp.

◆ Initialize()

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.

Member Data Documentation

◆ m_Gens

cGenPtrs cSinglePieceStructuresGen::m_Gens
protected

The individual structure generators, one per piecepool.

Definition at line 48 of file SinglePieceStructuresGen.h.

◆ m_Seed

int cSinglePieceStructuresGen::m_Seed
protected

The seed for the random number generator.

Definition at line 51 of file SinglePieceStructuresGen.h.


The documentation for this class was generated from the following files: