From 4f26f11dc77ab032feec8c746fc6ddaa1ea44057 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 3 Aug 2013 20:26:50 +0200 Subject: Added cWorld::DoWithChunk() function. This will be used by the blocktracers to gain direct access to chunk data. --- source/World.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/World.h') diff --git a/source/World.h b/source/World.h index 9de00ceec..52d634769 100644 --- a/source/World.h +++ b/source/World.h @@ -404,6 +404,9 @@ public: /// a_Player is using block entity at [x, y, z], handle that: void UseBlockEntity(cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ) {m_ChunkMap->UseBlockEntity(a_Player, a_BlockX, a_BlockY, a_BlockZ); } + + /// Calls the callback for the chunk specified, with ChunkMapCS locked; returns false if the chunk doesn't exist, otherwise returns the same value as the callback + bool DoWithChunk(int a_ChunkX, int a_ChunkZ, cChunkCallback & a_Callback); void GrowTree (int a_BlockX, int a_BlockY, int a_BlockZ); // tolua_export void GrowTreeFromSapling(int a_BlockX, int a_BlockY, int a_BlockZ, char a_SaplingMeta); // tolua_export -- cgit v1.2.3