From 6e86d20f730aa46e0fa6b13b26a3b2586d21e513 Mon Sep 17 00:00:00 2001 From: tycho Date: Thu, 24 Sep 2015 15:43:31 +0100 Subject: Add new "ForEach" function: ForEachLoadedChunk. --- src/ChunkMap.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ChunkMap.h') diff --git a/src/ChunkMap.h b/src/ChunkMap.h index 4974671da..e9309dbd8 100644 --- a/src/ChunkMap.h +++ b/src/ChunkMap.h @@ -344,6 +344,9 @@ public: /** Calls the callback for each chunk in the coords specified (all cords are inclusive). Returns true if all chunks have been processed successfully */ bool ForEachChunkInRect(int a_MinChunkX, int a_MaxChunkX, int a_MinChunkZ, int a_MaxChunkZ, cChunkDataCallback & a_Callback); + + /** Calls the callback for each loaded chunk. Returns true if all chunks have been processed successfully */ + bool ForEachLoadedChunk(std::function a_Callback); /** Writes the block area into the specified coords. Returns true if all chunks have been processed. Prefer cBlockArea::Write() instead. */ bool WriteBlockArea(cBlockArea & a_Area, int a_MinBlockX, int a_MinBlockY, int a_MinBlockZ, int a_DataTypes); -- cgit v1.2.3