21 class cChunkDataCallback
abstract 25 virtual ~cChunkDataCallback() {}
30 virtual bool Coords(
int a_ChunkX,
int a_ChunkZ) {
UNUSED(a_ChunkX);
UNUSED(a_ChunkZ);
return true; }
39 virtual void LightIsValid(
bool a_IsLightValid) {
UNUSED(a_IsLightValid); }
57 public cChunkDataCallback
81 public cChunkDataCallback
106 public cChunkDataCallback
131 m_Data.
Assign(a_ChunkBuffer);
void CopyMetas(NIBBLETYPE *a_Dest) const
Copies the metadata into the specified flat array.
virtual void ChunkData(const cChunkData &a_ChunkBuffer) override
virtual void ChunkData(const cChunkData &a_ChunkBuffer) override
virtual void OnEndUsingReserve() override
Is called once the reserve buffer has returned to normal size.
cChunkDef::BlockNibbles m_BlockSkyLight
virtual void OnStartUsingReserve() override
Is called when the reserve buffer starts to be used.
cChunkDef::BlockNibbles m_BlockLight
std::unique_ptr< T > make_unique(Args &&...args)
BLOCKTYPE BlockTypes[NumBlocks]
The type used for block type operations and storage, AXIS_ORDER ordering.
void CopyBlockLight(NIBBLETYPE *a_Dest) const
Copies the block light data into the specified flat array.
static const int NumBlocks
void CopySkyLight(NIBBLETYPE *a_Dest) const
Copies the skylight data into the specified flat array.
A simple implementation of the cChunkDataCallback interface that just copies the cChunkData.
cChunkDef::BlockNibbles m_BlockMetas
cListAllocationPool< cChunkData::sChunkSection > m_Pool
cChunkDef::BlockTypes m_BlockTypes
void CopyBlockTypes(BLOCKTYPE *a_Dest, size_t a_Idx=0, size_t a_Length=cChunkDef::NumBlocks) const
Copies the blocktype data into the specified flat array.
virtual void OnOutOfReserve() override
Is called when the allocation pool is unable to allocate memory.
static const int BlockDataSize
If the data is collected into a single buffer, how large it needs to be:
cChunkDataCopyCollector()
virtual void ChunkData(const cChunkData &a_ChunkBuffer) override
A simple implementation of the cChunkDataCallback interface that collects all block data into a singl...
void Assign(const cChunkData &a_Other)
Copy assign from another cChunkData.
NIBBLETYPE BlockNibbles[NumBlocks/2]
The type used for block data in nibble format, AXIS_ORDER ordering.
A simple implementation of the cChunkDataCallback interface that collects all block data into separat...
HEIGHTTYPE HeightMap[Width *Width]
The type used for any heightmap operations and storage; idx = x + Width * z; Height points to the hig...
EMCSBiome BiomeMap[Width *Width]
The type used for any biomemap operations and storage inside Cuberite, using Cuberite biomes (need no...