From a3c4b7580b1f5e0ac6aa74ba8c702359d32eda27 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Thu, 30 Apr 2015 23:16:33 +0200 Subject: Added cBlockArea:CountNonAirBlocks API function. --- src/BlockArea.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/BlockArea.h') diff --git a/src/BlockArea.h b/src/BlockArea.h index ce417ceb4..856df542f 100644 --- a/src/BlockArea.h +++ b/src/BlockArea.h @@ -303,7 +303,11 @@ public: bool HasBlockMetas (void) const { return (m_BlockMetas != nullptr); } bool HasBlockLights (void) const { return (m_BlockLight != nullptr); } bool HasBlockSkyLights(void) const { return (m_BlockSkyLight != nullptr); } - + + /** Returns the count of blocks that are not air. + Returns 0 if blocktypes not available. Block metas are ignored (if present, air with any meta is still considered air). */ + size_t CountNonAirBlocks(void) const; + // tolua_end /** Returns the minimum and maximum coords in each direction for the first non-ignored block in each direction. -- cgit v1.2.3