summaryrefslogtreecommitdiffstats
path: root/source/cChunkMap.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-18 20:18:16 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-18 20:18:16 +0100
commit76a92a21d11265ad17dffd11101ea87ce5c60e6a (patch)
tree9e6890042c4157ce1ee85d6e0e0a01a3b8e73efc /source/cChunkMap.cpp
parentThread-safe chunk generation, storage and generator are queried for progress while initializing server (diff)
downloadcuberite-76a92a21d11265ad17dffd11101ea87ce5c60e6a.tar
cuberite-76a92a21d11265ad17dffd11101ea87ce5c60e6a.tar.gz
cuberite-76a92a21d11265ad17dffd11101ea87ce5c60e6a.tar.bz2
cuberite-76a92a21d11265ad17dffd11101ea87ce5c60e6a.tar.lz
cuberite-76a92a21d11265ad17dffd11101ea87ce5c60e6a.tar.xz
cuberite-76a92a21d11265ad17dffd11101ea87ce5c60e6a.tar.zst
cuberite-76a92a21d11265ad17dffd11101ea87ce5c60e6a.zip
Diffstat (limited to '')
-rw-r--r--source/cChunkMap.cpp16
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);