diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-18 20:18:16 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-18 20:18:16 +0100 |
commit | 76a92a21d11265ad17dffd11101ea87ce5c60e6a (patch) | |
tree | 9e6890042c4157ce1ee85d6e0e0a01a3b8e73efc /source/cChunkMap.cpp | |
parent | Thread-safe chunk generation, storage and generator are queried for progress while initializing server (diff) | |
download | cuberite-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.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);
|