diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-05-23 16:02:55 +0200 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-05-23 16:02:55 +0200 |
commit | 5a76eab4c0ff309886cb407ba6b9d84516db11ff (patch) | |
tree | 51997884fc6c7407b1737dee014f94cea977b57a /src/ChunkDataCallback.h | |
parent | Added callback for stopping starvation mode (diff) | |
parent | Ignore CTest files (diff) | |
download | cuberite-5a76eab4c0ff309886cb407ba6b9d84516db11ff.tar cuberite-5a76eab4c0ff309886cb407ba6b9d84516db11ff.tar.gz cuberite-5a76eab4c0ff309886cb407ba6b9d84516db11ff.tar.bz2 cuberite-5a76eab4c0ff309886cb407ba6b9d84516db11ff.tar.lz cuberite-5a76eab4c0ff309886cb407ba6b9d84516db11ff.tar.xz cuberite-5a76eab4c0ff309886cb407ba6b9d84516db11ff.tar.zst cuberite-5a76eab4c0ff309886cb407ba6b9d84516db11ff.zip |
Diffstat (limited to 'src/ChunkDataCallback.h')
-rw-r--r-- | src/ChunkDataCallback.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ChunkDataCallback.h b/src/ChunkDataCallback.h index 76c45040e..340582885 100644 --- a/src/ChunkDataCallback.h +++ b/src/ChunkDataCallback.h @@ -3,7 +3,7 @@ #pragma once -#include "ChunkBuffer.h" +#include "ChunkData.h" /** Interface class used for getting data out of a chunk using the GetAllData() function. @@ -26,13 +26,13 @@ public: virtual void HeightMap(const cChunkDef::HeightMap * a_HeightMap) {UNUSED(a_HeightMap); }; /// Called once to provide biome data - virtual void BiomeData (const cChunkDef::BiomeMap * a_BiomeMap) {UNUSED(a_BiomeMap); }; + virtual void BiomeData(const cChunkDef::BiomeMap * a_BiomeMap) {UNUSED(a_BiomeMap); }; /// Called once to let know if the chunk lighting is valid. Return value is ignored virtual void LightIsValid(bool a_IsLightValid) {UNUSED(a_IsLightValid); }; /// Called once to export block info - virtual void ChunkBuffer (const cChunkBuffer & a_Buffer) {UNUSED(a_Buffer); }; + virtual void ChunkData(const cChunkData & a_Buffer) {UNUSED(a_Buffer); }; /// Called for each entity in the chunk virtual void Entity(cEntity * a_Entity) {UNUSED(a_Entity); }; @@ -43,16 +43,16 @@ public: /** A simple implementation of the cChunkDataCallback interface that collects all block data into a buffer */ -class cChunkBufferCollector : +class cChunkDataCollector : public cChunkDataCallback { public: - cChunkBuffer m_BlockData; + cChunkData m_BlockData; protected: - virtual void ChunkBuffer(const cChunkBuffer & a_BlockData) override + virtual void ChunkData(const cChunkData & a_BlockData) override { m_BlockData = a_BlockData.Copy(); } @@ -61,7 +61,7 @@ protected: /** A simple implementation of the cChunkDataCallback interface that collects all block data into a single buffer */ -class cChunkDataCollector : +class cChunkDataArrayCollector : public cChunkDataCallback { public: @@ -71,7 +71,7 @@ public: protected: - virtual void ChunkBuffer(const cChunkBuffer & a_ChunkBuffer) override + virtual void ChunkData(const cChunkData & a_ChunkBuffer) override { a_ChunkBuffer.CopyBlocks(m_BlockData); a_ChunkBuffer.CopyMeta(m_BlockData + cChunkDef::NumBlocks); @@ -94,7 +94,7 @@ public: protected: - virtual void ChunkBuffer(const cChunkBuffer & a_ChunkBuffer) override + virtual void ChunkData(const cChunkData & a_ChunkBuffer) override { a_ChunkBuffer.CopyBlocks(m_BlockTypes); a_ChunkBuffer.CopyMeta(m_BlockMetas); |