diff options
author | madmaxoft <github@xoft.cz> | 2014-09-03 17:00:26 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-09-03 17:00:26 +0200 |
commit | a51c1e0b73a83cddcce865671ca30240393e458f (patch) | |
tree | 688e63c296f02e327b4ee2f9e117a172a6e2d85b /src/ChunkMap.h | |
parent | cBoundingBox: Added accessors. (diff) | |
download | cuberite-a51c1e0b73a83cddcce865671ca30240393e458f.tar cuberite-a51c1e0b73a83cddcce865671ca30240393e458f.tar.gz cuberite-a51c1e0b73a83cddcce865671ca30240393e458f.tar.bz2 cuberite-a51c1e0b73a83cddcce865671ca30240393e458f.tar.lz cuberite-a51c1e0b73a83cddcce865671ca30240393e458f.tar.xz cuberite-a51c1e0b73a83cddcce865671ca30240393e458f.tar.zst cuberite-a51c1e0b73a83cddcce865671ca30240393e458f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ChunkMap.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ChunkMap.h b/src/ChunkMap.h index 1e9a0f982..24a91dcd1 100644 --- a/src/ChunkMap.h +++ b/src/ChunkMap.h @@ -36,6 +36,7 @@ class cBlockArea; class cMobCensus; class cMobSpawner; class cSetChunkData; +class cBoundingBox; typedef std::list<cClientHandle *> cClientHandleList; typedef cChunk * cChunkPtr; @@ -209,6 +210,11 @@ public: /** 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 + /** Calls the callback for each entity that has a nonempty intersection with the specified boundingbox. + Returns true if all entities processed, false if the callback aborted by returning true. + If any chunk in the box is missing, ignores the entities in that chunk silently. */ + bool ForEachEntityInBox(const cBoundingBox & a_Box, cEntityCallback & a_Callback); // Lua-accessible + /** Destroys and returns a list of blocks destroyed in the explosion at the specified coordinates */ void DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_BlockY, double a_BlockZ, cVector3iArray & a_BlockAffected); |