summaryrefslogtreecommitdiffstats
path: root/source/ChunkMap.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-03 20:26:50 +0200
committermadmaxoft <github@xoft.cz>2013-08-03 20:26:50 +0200
commit4f26f11dc77ab032feec8c746fc6ddaa1ea44057 (patch)
tree19a62e06c11061af47273e8c9d159f38f5f2cc58 /source/ChunkMap.cpp
parentRemoved the unused BlockY parameter from cChunkDef::BlockToChunk() (diff)
downloadcuberite-4f26f11dc77ab032feec8c746fc6ddaa1ea44057.tar
cuberite-4f26f11dc77ab032feec8c746fc6ddaa1ea44057.tar.gz
cuberite-4f26f11dc77ab032feec8c746fc6ddaa1ea44057.tar.bz2
cuberite-4f26f11dc77ab032feec8c746fc6ddaa1ea44057.tar.lz
cuberite-4f26f11dc77ab032feec8c746fc6ddaa1ea44057.tar.xz
cuberite-4f26f11dc77ab032feec8c746fc6ddaa1ea44057.tar.zst
cuberite-4f26f11dc77ab032feec8c746fc6ddaa1ea44057.zip
Diffstat (limited to '')
-rw-r--r--source/ChunkMap.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/ChunkMap.cpp b/source/ChunkMap.cpp
index 9a9e0dcf6..0d49ce9c4 100644
--- a/source/ChunkMap.cpp
+++ b/source/ChunkMap.cpp
@@ -713,6 +713,21 @@ void cChunkMap::UseBlockEntity(cPlayer * a_Player, int a_BlockX, int a_BlockY, i
+bool cChunkMap::DoWithChunk(int a_ChunkX, int a_ChunkZ, cChunkCallback & a_Callback)
+{
+ cCSLock Lock(m_CSLayers);
+ cChunkPtr Chunk = GetChunkNoLoad(a_ChunkX, ZERO_CHUNK_Y, a_ChunkZ);
+ if (Chunk == NULL)
+ {
+ return false;
+ }
+ return a_Callback.Item(Chunk);
+}
+
+
+
+
+
void cChunkMap::WakeUpSimulators(int a_BlockX, int a_BlockY, int a_BlockZ)
{
cCSLock Lock(m_CSLayers);