diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-16 10:35:07 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-16 10:35:07 +0200 |
commit | ada984facf47465b7a081eaf75d5541110c12f60 (patch) | |
tree | ebf09e32018e76a20df35e49965e15f8235cd6e2 /source/cChunkMap.h | |
parent | Lua binding for cVine fixed (diff) | |
download | cuberite-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 'source/cChunkMap.h')
-rw-r--r-- | source/cChunkMap.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/cChunkMap.h b/source/cChunkMap.h index 1d90c6aaa..df5cb5814 100644 --- a/source/cChunkMap.h +++ b/source/cChunkMap.h @@ -21,6 +21,7 @@ class cPlayer; typedef std::list<cClientHandle *> cClientHandleList; typedef cChunk * cChunkPtr; +typedef cItemCallback<cEntity> cEntityCallback; @@ -126,6 +127,9 @@ public: /// Removes the entity from the chunk specified void RemoveEntityFromChunk(cEntity * a_Entity, int a_ChunkX, int a_ChunkY, int a_ChunkZ); + /// 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); // Lua-accessible + /// Touches the chunk, causing it to be loaded or generated void TouchChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ); |