From cb640ffea4a51a10db2e379ada8dc0487378ba09 Mon Sep 17 00:00:00 2001 From: bibo38 Date: Wed, 12 Oct 2016 14:38:45 +0200 Subject: Spectators added (#2852) --- 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 ff8f82f91..871881483 100644 --- a/src/ChunkMap.h +++ b/src/ChunkMap.h @@ -56,6 +56,8 @@ typedef cItemCallback cCommandBlockCallback; typedef cItemCallback cMobHeadCallback; typedef cItemCallback cChunkCallback; +typedef std::function cLambdaEntityCallback; + @@ -237,6 +239,7 @@ public: /** Calls the callback if the entity with the specified ID is found, with the entity object as the callback param. Returns true if entity found and callback returned false. */ bool DoWithEntityByID(UInt32 a_EntityID, cEntityCallback & a_Callback); // Lua-accessible + bool DoWithEntityByID(UInt32 a_EntityID, cLambdaEntityCallback a_Callback); // Lambda version /** Calls the callback for each block entity in the specified chunk. Returns true if all block entities processed, false if the callback aborted by returning true. */ -- cgit v1.2.3