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/World.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/World.h') diff --git a/src/World.h b/src/World.h index 1ee473970..1902296be 100644 --- a/src/World.h +++ b/src/World.h @@ -27,7 +27,7 @@ #include "Blocks/BroadcastInterface.h" #include "FastRandom.h" #include "ClientHandle.h" - +#include @@ -434,6 +434,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 */ virtual bool ForEachChunkInRect(int a_MinChunkX, int a_MaxChunkX, int a_MinChunkZ, int a_MaxChunkZ, cChunkDataCallback & a_Callback) override; + /** Calls the callback for each loaded chunk. Returns true if all chunks have been processed successfully */ + bool ForEachLoadedChunk(std::function a_Callback); + // tolua_begin /** Sets the block at the specified coords to the specified value. -- cgit v1.2.3