From fc95501f68b28f2fc595eb574546500c2713ef96 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Wed, 29 Apr 2015 15:14:22 +0200 Subject: Added cBlockArea:GetNonAirCropRelCoords() API function. Fixes #1915. --- src/BlockArea.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/BlockArea.h') diff --git a/src/BlockArea.h b/src/BlockArea.h index 348e960dd..6b8b30443 100644 --- a/src/BlockArea.h +++ b/src/BlockArea.h @@ -288,6 +288,11 @@ public: bool HasBlockSkyLights(void) const { return (m_BlockSkyLight != nullptr); } // tolua_end + + /** Returns the minimum and maximum coords in each direction for the first non-ignored block in each direction. + If there are no non-ignored blocks within the area, or blocktypes are not present, the returned values are reverse-ranges (MinX <- m_RangeX, MaxX <- 0 etc.) + Exported to Lua in ManualBindings.cpp. */ + void GetNonAirCropRelCoords(int & a_MinRelX, int & a_MinRelY, int & a_MinRelZ, int & a_MaxRelX, int & a_MaxRelY, int & a_MaxRelZ, BLOCKTYPE a_IgnoreBlockType = E_BLOCK_AIR); // Clients can use these for faster access to all blocktypes. Be careful though! /** Returns the internal pointer to the block types */ -- cgit v1.2.3