Cuberite
A lightweight, fast and extensible game server for Minecraft
MineShafts.h
Go to the documentation of this file.
1 
2 // MineShafts.h
3 
4 // Declares the cStructGenMineShafts class representing the structure generator for abandoned mineshafts
5 
6 
7 
8 
9 
10 #pragma once
11 
12 #include "GridStructGen.h"
13 
14 
15 
16 
17 
19  public cGridStructGen
20 {
22 
23 public:
25  int a_Seed, int a_GridSize, int a_MaxOffset, int a_MaxSystemSize,
26  int a_ChanceCorridor, int a_ChanceCrossing, int a_ChanceStaircase
27  );
28 
29 protected:
30  friend class cMineShaft;
31  friend class cMineShaftDirtRoom;
32  friend class cMineShaftCorridor;
33  friend class cMineShaftCrossing;
34  friend class cMineShaftStaircase;
35  class cMineShaftSystem; // fwd: MineShafts.cpp
36 
37  int m_GridSize;
42 
43  // cGridStructGen overrides:
44  virtual cStructurePtr CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) override;
45 } ;
46 
47 
48 
49 
Generates structures in a semi-random grid.
Definition: GridStructGen.h:46
std::shared_ptr< cStructure > cStructurePtr
Definition: GridStructGen.h:77
int m_ProbLevelCrossing
Probability level of a branch object being the crossing, minus Corridor.
Definition: MineShafts.h:40
friend class cMineShaft
Definition: MineShafts.h:30
int m_ProbLevelStaircase
Probability level of a branch object being the staircase, minus Crossing.
Definition: MineShafts.h:41
int m_GridSize
Average spacing of the systems.
Definition: MineShafts.h:35
cGridStructGen Super
Definition: MineShafts.h:21
int m_ProbLevelCorridor
Probability level of a branch object being the corridor.
Definition: MineShafts.h:39
int m_MaxSystemSize
Maximum blcok size of a mineshaft system.
Definition: MineShafts.h:38
virtual cStructurePtr CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) override
Create a new structure at the specified gridpoint.
cStructGenMineShafts(int a_Seed, int a_GridSize, int a_MaxOffset, int a_MaxSystemSize, int a_ChanceCorridor, int a_ChanceCrossing, int a_ChanceStaircase)