summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-11-30 15:58:27 +0100
committermadmaxoft <github@xoft.cz>2013-11-30 15:58:27 +0100
commitc70c2fa42fa9336958e7b66a8813d075963f3463 (patch)
tree52ef965eb191c81aca95fd56146d10478496d645 /src/ChunkMap.cpp
parentAdded IsBiomeNoDownfall() function. (diff)
downloadcuberite-c70c2fa42fa9336958e7b66a8813d075963f3463.tar
cuberite-c70c2fa42fa9336958e7b66a8813d075963f3463.tar.gz
cuberite-c70c2fa42fa9336958e7b66a8813d075963f3463.tar.bz2
cuberite-c70c2fa42fa9336958e7b66a8813d075963f3463.tar.lz
cuberite-c70c2fa42fa9336958e7b66a8813d075963f3463.tar.xz
cuberite-c70c2fa42fa9336958e7b66a8813d075963f3463.tar.zst
cuberite-c70c2fa42fa9336958e7b66a8813d075963f3463.zip
Diffstat (limited to 'src/ChunkMap.cpp')
-rw-r--r--src/ChunkMap.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index 692f97ddf..a6caa5ef7 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -2244,7 +2244,24 @@ void cChunkMap::Tick(float a_Dt)
-void cChunkMap::UnloadUnusedChunks()
+void cChunkMap::TickBlock(int a_BlockX, int a_BlockY, int a_BlockZ)
+{
+ cCSLock Lock(m_CSLayers);
+ int ChunkX, ChunkZ;
+ cChunkDef::AbsoluteToRelative(a_BlockX, a_BlockY, a_BlockZ, ChunkX, ChunkZ);
+ cChunkPtr Chunk = GetChunkNoLoad(ChunkX, ZERO_CHUNK_Y, ChunkZ);
+ if ((Chunk == NULL) || !Chunk->IsValid())
+ {
+ return;
+ }
+ Chunk->TickBlock(a_BlockX, a_BlockY, a_BlockZ);
+}
+
+
+
+
+
+void cChunkMap::UnloadUnusedChunks(void)
{
cCSLock Lock(m_CSLayers);
for (cChunkLayerList::iterator itr = m_Layers.begin(); itr != m_Layers.end(); ++itr)