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/ChunkMap.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/ChunkMap.h') diff --git a/source/ChunkMap.h b/source/ChunkMap.h index 899f290c5..183031808 100644 --- a/source/ChunkMap.h +++ b/source/ChunkMap.h @@ -35,6 +35,7 @@ typedef cItemCallback cDispenserCallback; typedef cItemCallback cDropperCallback; typedef cItemCallback cDropSpenserCallback; typedef cItemCallback cFurnaceCallback; +typedef cItemCallback cChunkCallback; @@ -79,6 +80,9 @@ public: /// a_Player rclked block entity at the coords specified, handle it void UseBlockEntity(cPlayer * a_Player, int a_X, int a_Y, int a_Z); + /// 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); + /// Wakes up simulators for the specified block void WakeUpSimulators(int a_BlockX, int a_BlockY, int a_BlockZ); -- cgit v1.2.3