summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.h
diff options
context:
space:
mode:
authorbibo38 <bibo38@users.noreply.github.com>2016-10-12 14:38:45 +0200
committerMattes D <github@xoft.cz>2016-10-12 14:38:45 +0200
commitcb640ffea4a51a10db2e379ada8dc0487378ba09 (patch)
tree780ff243f439c9663b2f88e5df2805cc503f4f1d /src/ChunkMap.h
parentFixed cProjectileEntity double destroy bug (#3397) (diff)
downloadcuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar
cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.gz
cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.bz2
cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.lz
cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.xz
cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.zst
cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.zip
Diffstat (limited to '')
-rw-r--r--src/ChunkMap.h3
1 files changed, 3 insertions, 0 deletions
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<cCommandBlockEntity> cCommandBlockCallback;
typedef cItemCallback<cMobHeadEntity> cMobHeadCallback;
typedef cItemCallback<cChunk> cChunkCallback;
+typedef std::function<bool (cEntity *)> 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. */