Cuberite
A lightweight, fast and extensible game server for Minecraft
Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Types | List of all members
cMineShaftCorridor Class Reference
Inheritance diagram for cMineShaftCorridor:
Inheritance graph
[legend]
Collaboration diagram for cMineShaftCorridor:
Collaboration graph
[legend]

Static Public Member Functions

static cMineShaft * CreateAndFit (cStructGenMineShafts::cMineShaftSystem &a_ParentSystem, int a_PivotX, int a_PivotY, int a_PivotZ, eDirection a_Direction, cNoise &a_Noise)
 Creates a new Corridor attached to the specified pivot point and direction. More...
 

Protected Member Functions

virtual void AppendBranches (int a_RecursionLevel, cNoise &a_Noise) override
 
 cMineShaftCorridor (cStructGenMineShafts::cMineShaftSystem &a_ParentSystem, const cCuboid &a_BoundingBox, int a_NumSegments, eDirection a_Direction, cNoise &a_Noise)
 
void PlaceChest (cChunkDesc &a_ChunkDesc)
 Places a chest, if the corridor has one. More...
 
void PlaceSpawner (cChunkDesc &a_ChunkDesc)
 If this corridor has a spawner, places the spawner. More...
 
void PlaceTorches (cChunkDesc &a_ChunkDesc)
 Randomly places torches around the central beam block. More...
 
void PlaceTracks (cChunkDesc &a_ChunkDesc)
 If this corridor has tracks, places them randomly. More...
 
virtual void ProcessChunk (cChunkDesc &a_ChunkDesc) override
 

Protected Attributes

int m_ChestPosition
 If <0, no chest; otherwise an offset from m_BoundingBox's p1.x or p1.z, depenging on m_Direction. More...
 
eDirection m_Direction
 
bool m_HasFullBeam [MAX_SEGMENTS]
 If true, segment at that index has a full beam support (planks in the top center block) More...
 
bool m_HasTracks
 If true, random tracks will be placed on the floor. More...
 
int m_NumSegments
 
int m_SpawnerPosition
 If <0, no spawner; otherwise an offset from m_BoundingBox's p1.x or p1.z, depenging on m_Direction. More...
 

Static Protected Attributes

static const int MAX_SEGMENTS = 5
 

Private Types

using Super = cMineShaft
 

Detailed Description

Definition at line 108 of file MineShafts.cpp.

Member Typedef Documentation

◆ Super

using cMineShaftCorridor::Super = cMineShaft
private

Definition at line 111 of file MineShafts.cpp.

Constructor & Destructor Documentation

◆ cMineShaftCorridor()

cMineShaftCorridor::cMineShaftCorridor ( cStructGenMineShafts::cMineShaftSystem a_ParentSystem,
const cCuboid a_BoundingBox,
int  a_NumSegments,
eDirection  a_Direction,
cNoise a_Noise 
)
protected

Definition at line 501 of file MineShafts.cpp.

Member Function Documentation

◆ AppendBranches()

void cMineShaftCorridor::AppendBranches ( int  a_RecursionLevel,
cNoise a_Noise 
)
overrideprotectedvirtual

Definition at line 567 of file MineShafts.cpp.

◆ CreateAndFit()

cMineShaft * cMineShaftCorridor::CreateAndFit ( cStructGenMineShafts::cMineShaftSystem a_ParentSystem,
int  a_PivotX,
int  a_PivotY,
int  a_PivotZ,
eDirection  a_Direction,
cNoise a_Noise 
)
static

Creates a new Corridor attached to the specified pivot point and direction.

Checks all ParentSystem's objects and disallows intersecting. Initializes the new object to fit. May return nullptr if cannot fit.

Definition at line 539 of file MineShafts.cpp.

◆ PlaceChest()

void cMineShaftCorridor::PlaceChest ( cChunkDesc a_ChunkDesc)
protected

Places a chest, if the corridor has one.

Definition at line 746 of file MineShafts.cpp.

◆ PlaceSpawner()

void cMineShaftCorridor::PlaceSpawner ( cChunkDesc a_ChunkDesc)
protected

If this corridor has a spawner, places the spawner.

Definition at line 854 of file MineShafts.cpp.

◆ PlaceTorches()

void cMineShaftCorridor::PlaceTorches ( cChunkDesc a_ChunkDesc)
protected

Randomly places torches around the central beam block.

Definition at line 894 of file MineShafts.cpp.

◆ PlaceTracks()

void cMineShaftCorridor::PlaceTracks ( cChunkDesc a_ChunkDesc)
protected

If this corridor has tracks, places them randomly.

Definition at line 817 of file MineShafts.cpp.

◆ ProcessChunk()

void cMineShaftCorridor::ProcessChunk ( cChunkDesc a_ChunkDesc)
overrideprotectedvirtual

Definition at line 640 of file MineShafts.cpp.

Member Data Documentation

◆ m_ChestPosition

int cMineShaftCorridor::m_ChestPosition
protected

If <0, no chest; otherwise an offset from m_BoundingBox's p1.x or p1.z, depenging on m_Direction.

Definition at line 130 of file MineShafts.cpp.

◆ m_Direction

eDirection cMineShaftCorridor::m_Direction
protected

Definition at line 128 of file MineShafts.cpp.

◆ m_HasFullBeam

bool cMineShaftCorridor::m_HasFullBeam[MAX_SEGMENTS]
protected

If true, segment at that index has a full beam support (planks in the top center block)

Definition at line 129 of file MineShafts.cpp.

◆ m_HasTracks

bool cMineShaftCorridor::m_HasTracks
protected

If true, random tracks will be placed on the floor.

Definition at line 132 of file MineShafts.cpp.

◆ m_NumSegments

int cMineShaftCorridor::m_NumSegments
protected

Definition at line 127 of file MineShafts.cpp.

◆ m_SpawnerPosition

int cMineShaftCorridor::m_SpawnerPosition
protected

If <0, no spawner; otherwise an offset from m_BoundingBox's p1.x or p1.z, depenging on m_Direction.

Definition at line 131 of file MineShafts.cpp.

◆ MAX_SEGMENTS

const int cMineShaftCorridor::MAX_SEGMENTS = 5
staticprotected

Definition at line 125 of file MineShafts.cpp.


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