From 6744738a85c60238585dcf72af211f852fd7e4c6 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 2 Mar 2013 19:57:09 +0000 Subject: Rewritten SandSimulator to use direct chunk access; and sand falling on torches now creates a pickup. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1240 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/FallingBlock.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'source/FallingBlock.h') diff --git a/source/FallingBlock.h b/source/FallingBlock.h index abc3f8d9b..37fb4c4cc 100644 --- a/source/FallingBlock.h +++ b/source/FallingBlock.h @@ -23,9 +23,10 @@ class cFallingBlock : public: CLASS_PROTODEF(cFallingBlock); - cFallingBlock(const Vector3i & a_BlockPosition, BLOCKTYPE a_BlockType); + cFallingBlock(const Vector3i & a_BlockPosition, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); - BLOCKTYPE GetBlockType(void) const { return m_BlockType; } + BLOCKTYPE GetBlockType(void) const { return m_BlockType; } + NIBBLETYPE GetBlockMeta(void) const { return m_BlockMeta; } // cEntity overrides: virtual void Initialize(cWorld * a_World) override; @@ -33,13 +34,9 @@ public: virtual void Tick(float a_Dt, MTRand & a_TickRandom) override; private: - BLOCKTYPE m_BlockType; - Vector3i m_OriginalPosition; - - static bool IsPassable(BLOCKTYPE a_BlockType) - { - return ((a_BlockType == E_BLOCK_AIR) || IsBlockLiquid(a_BlockType)); - } + BLOCKTYPE m_BlockType; + NIBBLETYPE m_BlockMeta; + Vector3i m_OriginalPosition; } ; -- cgit v1.2.3