summaryrefslogtreecommitdiffstats
path: root/source/cWorld.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-16 10:35:07 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-16 10:35:07 +0200
commitada984facf47465b7a081eaf75d5541110c12f60 (patch)
treeebf09e32018e76a20df35e49965e15f8235cd6e2 /source/cWorld.h
parentLua binding for cVine fixed (diff)
downloadcuberite-ada984facf47465b7a081eaf75d5541110c12f60.tar
cuberite-ada984facf47465b7a081eaf75d5541110c12f60.tar.gz
cuberite-ada984facf47465b7a081eaf75d5541110c12f60.tar.bz2
cuberite-ada984facf47465b7a081eaf75d5541110c12f60.tar.lz
cuberite-ada984facf47465b7a081eaf75d5541110c12f60.tar.xz
cuberite-ada984facf47465b7a081eaf75d5541110c12f60.tar.zst
cuberite-ada984facf47465b7a081eaf75d5541110c12f60.zip
Diffstat (limited to '')
-rw-r--r--source/cWorld.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/cWorld.h b/source/cWorld.h
index e557a56ed..c4ce91474 100644
--- a/source/cWorld.h
+++ b/source/cWorld.h
@@ -124,6 +124,7 @@ public:
void AddPlayer( cPlayer* a_Player );
void RemovePlayer( cPlayer* a_Player );
+ /// Calls the callback for each player in the list; returns true if all players processed, false if the callback aborted by returning true
bool ForEachPlayer(cPlayerListCallback & a_Callback); // >> EXPORTED IN MANUALBINDINGS <<
unsigned int GetNumPlayers(); //tolua_export
@@ -146,6 +147,15 @@ public:
/// 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);
+
+ /// Calls the callback for each entity in the entire world; returns true if all entities processed, false if the callback aborted by returning true
+ bool ForEachEntity(cEntityCallback & a_Callback); // Exported in ManualBindings.cpp
+
+ /// Calls the callback for each entity in the specified chunk; returns true if all entities processed, false if the callback aborted by returning true
+ bool ForEachEntityInChunk(int a_ChunkX, int a_ChunkZ, cEntityCallback & a_Callback); // Exported in ManualBindings.cpp
+
+ /// Calls the callback if the entity with the specified ID is found, with the entity object as the callback param
+ bool DoWithEntityByID(int a_UniqueID, cEntityCallback & a_Callback); // TODO: Exported in ManualBindings.cpp
/// 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);
@@ -193,9 +203,6 @@ public:
bool IsChunkLighted(int a_ChunkX, int a_ChunkZ);
- // TODO: Export to Lua
- bool DoWithEntity( int a_UniqueID, cEntityCallback & a_Callback );
-
void SetBlock( int a_X, int a_Y, int a_Z, char a_BlockType, char a_BlockMeta ); //tolua_export
void FastSetBlock( int a_X, int a_Y, int a_Z, char a_BlockType, char a_BlockMeta ); //tolua_export
char GetBlock( int a_X, int a_Y, int a_Z ); //tolua_export