summaryrefslogtreecommitdiffstats
path: root/source/cChunkMap.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-05-30 23:29:51 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-05-30 23:29:51 +0200
commit7af3df03a056667ffeef71b785f6633d3cff957b (patch)
treebd0294bd3f8158372958c102fa9b4ab3cf8a50d5 /source/cChunkMap.cpp
parentMelon and pumpkin stems now grow melons and pumpkins (diff)
downloadcuberite-7af3df03a056667ffeef71b785f6633d3cff957b.tar
cuberite-7af3df03a056667ffeef71b785f6633d3cff957b.tar.gz
cuberite-7af3df03a056667ffeef71b785f6633d3cff957b.tar.bz2
cuberite-7af3df03a056667ffeef71b785f6633d3cff957b.tar.lz
cuberite-7af3df03a056667ffeef71b785f6633d3cff957b.tar.xz
cuberite-7af3df03a056667ffeef71b785f6633d3cff957b.tar.zst
cuberite-7af3df03a056667ffeef71b785f6633d3cff957b.zip
Diffstat (limited to '')
-rw-r--r--source/cChunkMap.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/cChunkMap.cpp b/source/cChunkMap.cpp
index 546e6f4c3..f28e2ecb0 100644
--- a/source/cChunkMap.cpp
+++ b/source/cChunkMap.cpp
@@ -1083,6 +1083,23 @@ void cChunkMap::GetChunkStats(int & a_NumChunksValid, int & a_NumChunksDirty)
+void cChunkMap::SetNextBlockTick(int a_BlockX, int a_BlockY, int a_BlockZ)
+{
+ int ChunkX, ChunkZ;
+ cChunkDef::AbsoluteToRelative(a_BlockX, a_BlockY, a_BlockZ, ChunkX, ChunkZ);
+
+ cCSLock Lock(m_CSLayers);
+ cChunkPtr Chunk = GetChunkNoLoad(ChunkX, ZERO_CHUNK_Y, ChunkZ);
+ if (Chunk != NULL)
+ {
+ Chunk->SetNextBlockTick(a_BlockX, a_BlockY, a_BlockZ);
+ }
+}
+
+
+
+
+
void cChunkMap::Tick( float a_Dt, MTRand & a_TickRandom )
{
cCSLock Lock(m_CSLayers);