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

#include <MineShafts.h>

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

Classes

class  cMineShaftSystem
 

Public Member Functions

 cStructGenMineShafts (int a_Seed, int a_GridSize, int a_MaxOffset, int a_MaxSystemSize, int a_ChanceCorridor, int a_ChanceCrossing, int a_ChanceStaircase)
 
- Public Member Functions inherited from cGridStructGen
 cGridStructGen (int a_Seed)
 Creates a new instance that has the generation parameters set to defaults. More...
 
 cGridStructGen (int a_Seed, int a_GridSizeX, int a_GridSizeZ, int a_MaxOffsetX, int a_MaxOffsetZ, int a_MaxStructureSizeX, int a_MaxStructureSizeZ, size_t a_MaxCacheSize)
 
virtual void GenFinish (cChunkDesc &a_ChunkDesc) override
 
void SetGeneratorParams (const AStringMap &a_GeneratorParams)
 Sets the generator params based on the dictionary passed in. More...
 
- Public Member Functions inherited from cFinishGen
virtual ~cFinishGen ()
 

Protected Member Functions

virtual cStructurePtr CreateStructure (int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) override
 Create a new structure at the specified gridpoint. More...
 
- Protected Member Functions inherited from cGridStructGen
void ClearCache (void)
 Clears everything from the cache. More...
 
void GetStructuresForChunk (int a_ChunkX, int a_ChunkZ, cStructurePtrs &a_Structures)
 Returns all structures that may intersect the given chunk. More...
 

Protected Attributes

int m_GridSize
 Average spacing of the systems. More...
 
int m_MaxSystemSize
 Maximum blcok size of a mineshaft system. More...
 
int m_ProbLevelCorridor
 Probability level of a branch object being the corridor. More...
 
int m_ProbLevelCrossing
 Probability level of a branch object being the crossing, minus Corridor. More...
 
int m_ProbLevelStaircase
 Probability level of a branch object being the staircase, minus Crossing. More...
 
- Protected Attributes inherited from cGridStructGen
int m_BaseSeed
 Base seed of the world for which the generator generates chunk. More...
 
cStructurePtrs m_Cache
 Cache for the most recently generated structures, ordered by the recentness. More...
 
int m_GridSizeX
 The size of each grid's cell in the X axis. More...
 
int m_GridSizeZ
 The size of each grid's cell in the Z axis. More...
 
size_t m_MaxCacheSize
 Maximum allowed sum of costs for items in the cache. More...
 
int m_MaxOffsetX
 The maximum offset of the structure's origin from the grid midpoint, in X coord. More...
 
int m_MaxOffsetZ
 The maximum offset of the structure's origin from the grid midpoint, in Z coord. More...
 
int m_MaxStructureSizeX
 Maximum theoretical size of the structure in the X axis. More...
 
int m_MaxStructureSizeZ
 Maximum theoretical size of the structure in the Z axis. More...
 
cNoise m_Noise
 The noise used for generating grid offsets. More...
 
int m_Seed
 Seed for generating grid offsets and also available for descendants. More...
 

Private Types

typedef cGridStructGen Super
 

Friends

class cMineShaft
 
class cMineShaftCorridor
 
class cMineShaftCrossing
 
class cMineShaftDirtRoom
 
class cMineShaftStaircase
 

Additional Inherited Members

- Public Types inherited from cGridStructGen
typedef std::shared_ptr< cStructurecStructurePtr
 
typedef std::list< cStructurePtrcStructurePtrs
 

Detailed Description

Definition at line 18 of file MineShafts.h.

Member Typedef Documentation

◆ Super

Definition at line 21 of file MineShafts.h.

Constructor & Destructor Documentation

◆ cStructGenMineShafts()

cStructGenMineShafts::cStructGenMineShafts ( int  a_Seed,
int  a_GridSize,
int  a_MaxOffset,
int  a_MaxSystemSize,
int  a_ChanceCorridor,
int  a_ChanceCrossing,
int  a_ChanceStaircase 
)

Definition at line 1291 of file MineShafts.cpp.

Member Function Documentation

◆ CreateStructure()

cGridStructGen::cStructurePtr cStructGenMineShafts::CreateStructure ( int  a_GridX,
int  a_GridZ,
int  a_OriginX,
int  a_OriginZ 
)
overrideprotectedvirtual

Create a new structure at the specified gridpoint.

Implements cGridStructGen.

Definition at line 1308 of file MineShafts.cpp.

Friends And Related Function Documentation

◆ cMineShaft

friend class cMineShaft
friend

Definition at line 30 of file MineShafts.h.

◆ cMineShaftCorridor

friend class cMineShaftCorridor
friend

Definition at line 32 of file MineShafts.h.

◆ cMineShaftCrossing

friend class cMineShaftCrossing
friend

Definition at line 33 of file MineShafts.h.

◆ cMineShaftDirtRoom

friend class cMineShaftDirtRoom
friend

Definition at line 31 of file MineShafts.h.

◆ cMineShaftStaircase

friend class cMineShaftStaircase
friend

Definition at line 34 of file MineShafts.h.

Member Data Documentation

◆ m_GridSize

int cStructGenMineShafts::m_GridSize
protected

Average spacing of the systems.

Definition at line 37 of file MineShafts.h.

◆ m_MaxSystemSize

int cStructGenMineShafts::m_MaxSystemSize
protected

Maximum blcok size of a mineshaft system.

Definition at line 38 of file MineShafts.h.

◆ m_ProbLevelCorridor

int cStructGenMineShafts::m_ProbLevelCorridor
protected

Probability level of a branch object being the corridor.

Definition at line 39 of file MineShafts.h.

◆ m_ProbLevelCrossing

int cStructGenMineShafts::m_ProbLevelCrossing
protected

Probability level of a branch object being the crossing, minus Corridor.

Definition at line 40 of file MineShafts.h.

◆ m_ProbLevelStaircase

int cStructGenMineShafts::m_ProbLevelStaircase
protected

Probability level of a branch object being the staircase, minus Crossing.

Definition at line 41 of file MineShafts.h.


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