From c640e9346c5e6c72b62b1beeaf5ec6de9cdc6924 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 25 May 2013 11:59:13 +0000 Subject: cChestEntity and cDispenserEntity now inherit from a common ancestor, cBlockEntityWithItems git-svn-id: http://mc-server.googlecode.com/svn/trunk@1507 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/BlockEntity.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'source/BlockEntity.h') diff --git a/source/BlockEntity.h b/source/BlockEntity.h index b3273b9c9..0cc7f6077 100644 --- a/source/BlockEntity.h +++ b/source/BlockEntity.h @@ -20,19 +20,10 @@ class cPacket; +// tolua_begin class cBlockEntity { protected: - cBlockEntity(BLOCKTYPE a_BlockType, int a_BlockX, int a_BlockY, int a_BlockZ) : // Used when generating - m_PosX(a_BlockX), - m_PosY(a_BlockY), - m_PosZ(a_BlockZ), - m_BlockType(a_BlockType), - m_World(NULL) - { - } - - cBlockEntity(BLOCKTYPE a_BlockType, int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World) : m_PosX(a_BlockX), m_PosY(a_BlockY), @@ -43,6 +34,8 @@ protected: } public: + // tolua_end + virtual ~cBlockEntity() {}; // force a virtual destructor in all descendants virtual void Destroy(void) {}; @@ -52,6 +45,8 @@ public: m_World = a_World; } + // tolua_begin + // Position, in absolute block coordinates: int GetPosX(void) const { return m_PosX; } int GetPosY(void) const { return m_PosY; } @@ -60,6 +55,8 @@ public: BLOCKTYPE GetBlockType(void) const { return m_BlockType; } cWorld * GetWorld(void) const {return m_World; } + + // tolua_end virtual void SaveToJson (Json::Value & a_Value) = 0; @@ -81,7 +78,7 @@ protected: BLOCKTYPE m_BlockType; cWorld * m_World; -}; +} ; // tolua_export -- cgit v1.2.3