Cuberite
A lightweight, fast and extensible game server for Minecraft
|
Public Member Functions | |
void | AppendBranch (int a_BlockX, int a_BlockY, int a_BlockZ, cMineShaft::eDirection a_Direction, cNoise &a_Noise, int a_RecursionLevel) |
Creates new cMineShaft descendant connected at the specified point, heading the specified direction, if it fits, appends it to the list and calls its AppendBranches() More... | |
bool | CanAppend (const cCuboid &a_BoundingBox) |
Returns true if none of the objects in m_MineShafts intersect with the specified bounding box and the bounding box is valid. More... | |
cMineShaftSystem (int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ, int a_GridSize, int a_MaxSystemSize, cNoise &a_Noise, int a_ProbLevelCorridor, int a_ProbLevelCrossing, int a_ProbLevelStaircase) | |
Creates and generates the entire system. More... | |
virtual void | DrawIntoChunk (cChunkDesc &a_Chunk) override |
Draws self into the specified chunk. More... | |
virtual | ~cMineShaftSystem () override |
Public Member Functions inherited from cGridStructGen::cStructure | |
cStructure (int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) | |
Creates a structure that has its origin set at the specified coords. More... | |
virtual size_t | GetCacheCost (void) const |
Returns the cost of keeping this structure in the cache. More... | |
virtual | ~cStructure () |
Public Attributes | |
cCuboid | m_BoundingBox |
Bounding box into which all of the components need to fit. More... | |
int | m_ChanceChest |
Chance [0 .. 250] that a corridor has a chest in it. More... | |
int | m_ChanceSpawner |
Chance [0 .. 250] that a corridor has a spawner in it. More... | |
int | m_ChanceTorch |
Chance [0 .. 10k] for a torch appearing attached to a corridor's beam. More... | |
int | m_GridSize |
Maximum offset of the dirtroom from grid center, * 2, in each direction. More... | |
int | m_MaxRecursion |
Maximum recursion level (initialized from cStructGenMineShafts::m_MaxRecursion) More... | |
cMineShafts | m_MineShafts |
List of cMineShaft descendants that comprise this 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... | |
Public Attributes inherited from cGridStructGen::cStructure | |
int | m_GridX |
The grid point for which the structure is generated. More... | |
int | m_GridZ |
int | m_OriginX |
The origin (the coords for which the structure is generated) More... | |
int | m_OriginZ |
Private Types | |
using | Super = cGridStructGen::cStructure |
Definition at line 233 of file MineShafts.cpp.
Definition at line 236 of file MineShafts.cpp.
cStructGenMineShafts::cMineShaftSystem::cMineShaftSystem | ( | int | a_GridX, |
int | a_GridZ, | ||
int | a_OriginX, | ||
int | a_OriginZ, | ||
int | a_GridSize, | ||
int | a_MaxSystemSize, | ||
cNoise & | a_Noise, | ||
int | a_ProbLevelCorridor, | ||
int | a_ProbLevelCrossing, | ||
int | a_ProbLevelStaircase | ||
) |
Creates and generates the entire system.
Definition at line 284 of file MineShafts.cpp.
|
overridevirtual |
Definition at line 321 of file MineShafts.cpp.
void cStructGenMineShafts::cMineShaftSystem::AppendBranch | ( | int | a_BlockX, |
int | a_BlockY, | ||
int | a_BlockZ, | ||
cMineShaft::eDirection | a_Direction, | ||
cNoise & | a_Noise, | ||
int | a_RecursionLevel | ||
) |
Creates new cMineShaft descendant connected at the specified point, heading the specified direction, if it fits, appends it to the list and calls its AppendBranches()
Definition at line 346 of file MineShafts.cpp.
bool cStructGenMineShafts::cMineShaftSystem::CanAppend | ( | const cCuboid & | a_BoundingBox | ) |
Returns true if none of the objects in m_MineShafts intersect with the specified bounding box and the bounding box is valid.
Definition at line 383 of file MineShafts.cpp.
|
overridevirtual |
Draws self into the specified chunk.
Implements cGridStructGen::cStructure.
Definition at line 334 of file MineShafts.cpp.
cCuboid cStructGenMineShafts::cMineShaftSystem::m_BoundingBox |
Bounding box into which all of the components need to fit.
Definition at line 249 of file MineShafts.cpp.
int cStructGenMineShafts::cMineShaftSystem::m_ChanceChest |
Chance [0 .. 250] that a corridor has a chest in it.
Definition at line 245 of file MineShafts.cpp.
int cStructGenMineShafts::cMineShaftSystem::m_ChanceSpawner |
Chance [0 .. 250] that a corridor has a spawner in it.
Definition at line 246 of file MineShafts.cpp.
int cStructGenMineShafts::cMineShaftSystem::m_ChanceTorch |
Chance [0 .. 10k] for a torch appearing attached to a corridor's beam.
Definition at line 247 of file MineShafts.cpp.
int cStructGenMineShafts::cMineShaftSystem::m_GridSize |
Maximum offset of the dirtroom from grid center, * 2, in each direction.
Definition at line 240 of file MineShafts.cpp.
int cStructGenMineShafts::cMineShaftSystem::m_MaxRecursion |
Maximum recursion level (initialized from cStructGenMineShafts::m_MaxRecursion)
Definition at line 241 of file MineShafts.cpp.
cMineShafts cStructGenMineShafts::cMineShaftSystem::m_MineShafts |
List of cMineShaft descendants that comprise this system.
Definition at line 248 of file MineShafts.cpp.
int cStructGenMineShafts::cMineShaftSystem::m_ProbLevelCorridor |
Probability level of a branch object being the corridor.
Definition at line 242 of file MineShafts.cpp.
int cStructGenMineShafts::cMineShaftSystem::m_ProbLevelCrossing |
Probability level of a branch object being the crossing, minus Corridor.
Definition at line 243 of file MineShafts.cpp.
int cStructGenMineShafts::cMineShaftSystem::m_ProbLevelStaircase |
Probability level of a branch object being the staircase, minus Crossing.
Definition at line 244 of file MineShafts.cpp.