From ada984facf47465b7a081eaf75d5541110c12f60 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 16 Jun 2012 08:35:07 +0000 Subject: Exported cWorld::ForEachEntity and cWorld::ForEachEntityInChunk; no idea if they actually work git-svn-id: http://mc-server.googlecode.com/svn/trunk@620 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cChunk.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/cChunk.h') diff --git a/source/cChunk.h b/source/cChunk.h index e24990982..7ebb37e43 100644 --- a/source/cChunk.h +++ b/source/cChunk.h @@ -40,7 +40,7 @@ class cPlayer; class cChunkMap; typedef std::list cClientHandleList; - +typedef cItemCallback cEntityCallback; @@ -143,6 +143,9 @@ public: void AddEntity( cEntity * a_Entity); void RemoveEntity( cEntity * a_Entity); + /// Calls the callback for each entity; returns true if all entities processed, false if the callback aborted by returning true + bool ForEachEntity(cEntityCallback & a_Callback); // Lua-accessible + void UseBlockEntity(cPlayer * a_Player, int a_X, int a_Y, int a_Z); // [x, y, z] in world block coords void CalculateLighting(); // Recalculate right now -- cgit v1.2.3