diff options
Diffstat (limited to 'source/cBlockEntity.h')
-rw-r--r-- | source/cBlockEntity.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/cBlockEntity.h b/source/cBlockEntity.h index 75c864cec..cbb6e7681 100644 --- a/source/cBlockEntity.h +++ b/source/cBlockEntity.h @@ -6,12 +6,19 @@ enum ENUM_BLOCK_ID;
#endif
+class cChunk;
class cClientHandle;
class cPlayer;
class cBlockEntity
{
protected:
- cBlockEntity(ENUM_BLOCK_ID a_BlockType, int a_X, int a_Y, int a_Z) : m_PosX( a_X ), m_PosY( a_Y ), m_PosZ( a_Z ), m_BlockType( a_BlockType ) {}
+ cBlockEntity(ENUM_BLOCK_ID a_BlockType, int a_X, int a_Y, int a_Z, cChunk* a_Chunk)
+ : m_PosX( a_X )
+ , m_PosY( a_Y )
+ , m_PosZ( a_Z )
+ , m_BlockType( a_BlockType )
+ , m_Chunk( a_Chunk )
+ {}
public:
virtual ~cBlockEntity() {};
virtual void Destroy() {};
@@ -19,6 +26,7 @@ public: int GetPosX() { return m_PosX; }
int GetPosY() { return m_PosY; }
int GetPosZ() { return m_PosZ; }
+ cChunk* GetChunk() { return m_Chunk; }
ENUM_BLOCK_ID GetBlockType() { return m_BlockType; }
@@ -30,5 +38,7 @@ protected: int m_PosY;
int m_PosZ;
+ cChunk* m_Chunk;
+
ENUM_BLOCK_ID m_BlockType;
};
|