diff options
Diffstat (limited to '')
-rw-r--r-- | source/cChunkMap.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/cChunkMap.cpp b/source/cChunkMap.cpp index 96d3b14e0..c5512dd68 100644 --- a/source/cChunkMap.cpp +++ b/source/cChunkMap.cpp @@ -271,6 +271,22 @@ void cChunkMap::GetChunkData(int a_ChunkX, int a_ChunkY, int a_ChunkZ, cChunkDat +bool cChunkMap::GetChunkBlocks(int a_ChunkX, int a_ChunkY, int a_ChunkZ, char * a_Blocks)
+{
+ cCSLock Lock(m_CSLayers);
+ cChunkPtr Chunk = GetChunkNoGen(a_ChunkX, a_ChunkY, a_ChunkZ);
+ if ((Chunk == NULL) || !Chunk->IsValid())
+ {
+ return false;
+ }
+ Chunk->GetBlocks(a_Blocks);
+ return true;
+}
+
+
+
+
+
bool cChunkMap::IsChunkValid(int a_ChunkX, int a_ChunkY, int a_ChunkZ)
{
cCSLock Lock(m_CSLayers);
|