Cuberite
A lightweight, fast and extensible game server for Minecraft
|
#include <PrefabStructure.h>
Public Member Functions | |
cPrefabStructure (int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ, cPlacedPieces &&a_Pieces, cTerrainHeightGen &a_HeightGen) | |
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 () |
Protected Member Functions | |
virtual void | DrawIntoChunk (cChunkDesc &a_Chunk) override |
Draws self into the specified chunk. More... | |
void | PlacePieceOnGround (cPlacedPiece &a_Piece) |
Adjusts the Y coord of the given piece so that the piece is on the ground. More... | |
Protected Attributes | |
cTerrainHeightGen & | m_HeightGen |
The height generator used when adjusting pieces onto the ground. More... | |
cPlacedPieces | m_Pieces |
The pieces placed by the generator. More... | |
Private Types | |
using | Super = cGridStructGen::cStructure |
Additional Inherited Members | |
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 |
Definition at line 19 of file PrefabStructure.h.
|
private |
Definition at line 22 of file PrefabStructure.h.
cPrefabStructure::cPrefabStructure | ( | int | a_GridX, |
int | a_GridZ, | ||
int | a_OriginX, | ||
int | a_OriginZ, | ||
cPlacedPieces && | a_Pieces, | ||
cTerrainHeightGen & | a_HeightGen | ||
) |
Definition at line 14 of file PrefabStructure.cpp.
|
overrideprotectedvirtual |
Draws self into the specified chunk.
Implements cGridStructGen::cStructure.
Definition at line 30 of file PrefabStructure.cpp.
|
protected |
Adjusts the Y coord of the given piece so that the piece is on the ground.
Ground level is assumed to be represented by the first connector in the piece.
Definition at line 49 of file PrefabStructure.cpp.
|
protected |
The height generator used when adjusting pieces onto the ground.
Definition at line 38 of file PrefabStructure.h.
|
protected |
The pieces placed by the generator.
Definition at line 35 of file PrefabStructure.h.