diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-20 17:39:00 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-20 17:39:00 +0100 |
commit | d592882fe0d1e7762470e6b5eff2b14ed26f1e69 (patch) | |
tree | 2a9a9fc2a7f6efe75c19511425ad611ad1996fed /source/cChunkMap.h | |
parent | Using own ASSERT() that logs to file (diff) | |
download | cuberite-d592882fe0d1e7762470e6b5eff2b14ed26f1e69.tar cuberite-d592882fe0d1e7762470e6b5eff2b14ed26f1e69.tar.gz cuberite-d592882fe0d1e7762470e6b5eff2b14ed26f1e69.tar.bz2 cuberite-d592882fe0d1e7762470e6b5eff2b14ed26f1e69.tar.lz cuberite-d592882fe0d1e7762470e6b5eff2b14ed26f1e69.tar.xz cuberite-d592882fe0d1e7762470e6b5eff2b14ed26f1e69.tar.zst cuberite-d592882fe0d1e7762470e6b5eff2b14ed26f1e69.zip |
Diffstat (limited to 'source/cChunkMap.h')
-rw-r--r-- | source/cChunkMap.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source/cChunkMap.h b/source/cChunkMap.h index a9cb4d661..33e468eb1 100644 --- a/source/cChunkMap.h +++ b/source/cChunkMap.h @@ -32,9 +32,14 @@ public: cChunkPtr GetChunkNoGen( int a_ChunkX, int a_ChunkY, int a_ChunkZ ); // Also queues the chunk for loading if not valid; doesn't generate
// Direct action methods:
+ /// Broadcast a_Packet to all clients in the chunk specified
+ void BroadcastToChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ, cPacket & a_Packet, cClientHandle * a_Exclude = NULL);
+
/// Broadcasts a_Packet to all clients in the chunk where block [x, y, z] is, except to client a_Exclude
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
+
+ /// a_Player rclked block entity at the coords specified, handle it
+ void UseBlockEntity(cPlayer * a_Player, int a_X, int a_Y, int a_Z);
void MarkChunkDirty (int a_ChunkX, int a_ChunkY, int a_ChunkZ);
void MarkChunkSaving (int a_ChunkX, int a_ChunkY, int a_ChunkZ);
@@ -48,6 +53,16 @@ public: void SpreadChunkLighting(int a_ChunkX, int a_ChunkY, int a_ChunkZ);
int GetHeight (int a_BlockX, int a_BlockZ);
void FastSetBlocks (sSetBlockList & a_BlockList);
+ void CollectPickupsByPlayer(cPlayer * a_Player);
+
+ /// Compares clients of two chunks, calls the callback accordingly
+ void CompareChunkClients(int a_ChunkX1, int a_ChunkY1, int a_ChunkZ1, int a_ChunkX2, int a_ChunkY2, int a_ChunkZ2, cClientDiffCallback & a_Callback);
+
+ /// Moves the entity from its current chunk to the new chunk specified
+ void MoveEntityToChunk(cEntity * a_Entity, int a_ChunkX, int a_ChunkY, int a_ChunkZ);
+
+ /// Removes the entity from the chunk specified
+ void RemoveEntityFromChunk(cEntity * a_Entity, int a_ChunkX, int a_ChunkY, int a_ChunkZ);
void Tick( float a_Dt, MTRand & a_TickRand );
|