From e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f Mon Sep 17 00:00:00 2001 From: faketruth Date: Mon, 31 Oct 2011 00:52:20 +0000 Subject: Prepared some parts of the code for multi world support, I created lots of TODO's git-svn-id: http://mc-server.googlecode.com/svn/trunk@29 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cBlockEntity.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'source/cBlockEntity.h') 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; }; -- cgit v1.2.3