summaryrefslogtreecommitdiffstats
path: root/source/cWorld.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-21 17:27:30 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-21 17:27:30 +0100
commitb653e6a01271c05bdbd947ab7120d10d30ecee91 (patch)
tree43d7a6e5ce26b77d1c759a8dc0cc533a13a933e7 /source/cWorld.h
parentFixed heightmap optimization from rev 302; removed a few more cChunkPtrs (diff)
downloadcuberite-b653e6a01271c05bdbd947ab7120d10d30ecee91.tar
cuberite-b653e6a01271c05bdbd947ab7120d10d30ecee91.tar.gz
cuberite-b653e6a01271c05bdbd947ab7120d10d30ecee91.tar.bz2
cuberite-b653e6a01271c05bdbd947ab7120d10d30ecee91.tar.lz
cuberite-b653e6a01271c05bdbd947ab7120d10d30ecee91.tar.xz
cuberite-b653e6a01271c05bdbd947ab7120d10d30ecee91.tar.zst
cuberite-b653e6a01271c05bdbd947ab7120d10d30ecee91.zip
Diffstat (limited to '')
-rw-r--r--source/cWorld.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/source/cWorld.h b/source/cWorld.h
index b181df365..2fc907b3a 100644
--- a/source/cWorld.h
+++ b/source/cWorld.h
@@ -57,9 +57,6 @@ public:
void SetWorldTime(long long a_WorldTime) { m_WorldTime = a_WorldTime; } //tolua_export
- cChunkPtr GetChunk ( int a_ChunkX, int a_ChunkY, int a_ChunkZ ) {return m_ChunkMap->GetChunk (a_ChunkX, a_ChunkY, a_ChunkZ); }
- cChunkPtr GetChunkNoGen ( int a_ChunkX, int a_ChunkY, int a_ChunkZ ) {return m_ChunkMap->GetChunkNoGen(a_ChunkX, a_ChunkY, a_ChunkZ); }
- cChunkPtr GetChunkOfBlock( int a_X, int a_Y, int a_Z );
int GetHeight( int a_X, int a_Z ); //tolua_export
//void AddClient( cClientHandle* a_Client );
@@ -124,11 +121,19 @@ public:
/// Adds client to a chunk, if not already present; returns true if added, false if present
bool AddChunkClient(int a_ChunkX, int a_ChunkY, int a_ChunkZ, cClientHandle * a_Client);
+ /// Removes client from the chunk specified
+ void RemoveChunkClient(int a_ChunkX, int a_ChunkY, int a_ChunkZ, cClientHandle * a_Client);
+
/// Removes the client from all chunks specified
void RemoveClientFromChunks(cClientHandle * a_Client, const cChunkCoordsList & a_Chunks);
/// Sends a chunk to client, returns true if successful, false if not sent
bool SendChunkTo(int a_ChunkX, int a_ChunkY, int a_ChunkZ, cClientHandle * a_Client);
+
+ /// Touches the chunk, causing it to be loaded or generated
+ void TouchChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ);
+
+ void UpdateSign(int a_X, int a_Y, int a_Z, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4);
// TODO: Export to Lua
bool DoWithEntity( int a_UniqueID, cEntityCallback & a_Callback );
@@ -150,7 +155,8 @@ public:
inline cLavaSimulator *GetLavaSimulator() { return m_LavaSimulator; }
// TODO: This interface is dangerous! Export as a set of specific action functions for Lua: GetChestItem, GetFurnaceItem, SetFurnaceItem, SetSignLines etc.
- cBlockEntity * GetBlockEntity( int a_X, int a_Y, int a_Z ); //tolua_export
+ // _X 2012_02_21: This function always returns NULL
+ OBSOLETE cBlockEntity * GetBlockEntity( int a_X, int a_Y, int a_Z ); //tolua_export
/// a_Player is using block entity at [x, y, z], handle that:
void UseBlockEntity(cPlayer * a_Player, int a_X, int a_Y, int a_Z) {m_ChunkMap->UseBlockEntity(a_Player, a_X, a_Y, a_Z); }