summaryrefslogtreecommitdiffstats
path: root/source/cChunkMap.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-16 14:42:35 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-16 14:42:35 +0100
commit423f49d175d8db6283232bd8bdc106e26bdcff4d (patch)
tree5c5cc58d1061c91d2cb39021853ce72ab59839ae /source/cChunkMap.h
parentChunks are properly saved before being unloaded now (diff)
downloadcuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.tar
cuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.tar.gz
cuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.tar.bz2
cuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.tar.lz
cuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.tar.xz
cuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.tar.zst
cuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.zip
Diffstat (limited to '')
-rw-r--r--source/cChunkMap.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/cChunkMap.h b/source/cChunkMap.h
index b5d6abd60..e53153c24 100644
--- a/source/cChunkMap.h
+++ b/source/cChunkMap.h
@@ -27,7 +27,7 @@ public:
cChunkMap(cWorld* a_World );
~cChunkMap();
- // TODO: Get rid of these in favor of the direct action methods:
+ // TODO: Get rid of these (put into Private section) in favor of the direct action methods:
cChunkPtr GetChunk ( int a_ChunkX, int a_ChunkY, int a_ChunkZ ); // Also queues the chunk for loading / generating if not valid
cChunkPtr GetChunkNoGen( int a_ChunkX, int a_ChunkY, int a_ChunkZ ); // Also queues the chunk for loading if not valid; doesn't generate
@@ -36,6 +36,14 @@ public:
void BroadcastToChunkOfBlock(int a_X, int a_Y, int a_Z, cPacket * a_Packet, cClientHandle * a_Exclude = NULL);
void UseBlockEntity(cPlayer * a_Player, int a_X, int a_Y, int a_Z); // a_Player rclked block entity at the coords specified, handle it
+ void MarkChunkDirty (int a_ChunkX, int a_ChunkY, int a_ChunkZ);
+ void MarkChunkSaving(int a_ChunkX, int a_ChunkY, int a_ChunkZ);
+ void MarkChunkSaved (int a_ChunkX, int a_ChunkY, int a_ChunkZ);
+ void ChunkDataLoaded(int a_ChunkX, int a_ChunkY, int a_ChunkZ, const char * a_BlockData, cEntityList & a_Entities, cBlockEntityList & a_BlockEntities);
+ void SetChunkData (int a_ChunkX, int a_ChunkY, int a_ChunkZ, const char * a_BlockData, cEntityList & a_Entities, cBlockEntityList & a_BlockEntities);
+ void GetChunkData (int a_ChunkX, int a_ChunkY, int a_ChunkZ, cChunkDataCallback * a_Callback);
+ bool IsChunkValid (int a_ChunkX, int a_ChunkY, int a_ChunkZ);
+
void Tick( float a_Dt, MTRand & a_TickRand );
void UnloadUnusedChunks();
@@ -51,7 +59,7 @@ public:
BlockToChunk(a_X, a_Y, a_Z, a_ChunkX, a_ChunkZ);
a_X = a_X - a_ChunkX * 16;
- a_Z = a_Z - a_ChunkZ*16;
+ a_Z = a_Z - a_ChunkZ * 16;
}
/// Converts absolute block coords to chunk coords: