summaryrefslogtreecommitdiffstats
path: root/source/cBlockEntity.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-23 22:12:48 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-23 22:12:48 +0100
commitbe31652c40af10b0410c76c6bd37b60717c385be (patch)
treea84e138bc4d0c1cd4b298dc807f3a196e9a78e3d /source/cBlockEntity.h
parentFixed a deadlock by removing clients from all chunks upon their exit, not using the clients chunklists. (diff)
downloadcuberite-be31652c40af10b0410c76c6bd37b60717c385be.tar
cuberite-be31652c40af10b0410c76c6bd37b60717c385be.tar.gz
cuberite-be31652c40af10b0410c76c6bd37b60717c385be.tar.bz2
cuberite-be31652c40af10b0410c76c6bd37b60717c385be.tar.lz
cuberite-be31652c40af10b0410c76c6bd37b60717c385be.tar.xz
cuberite-be31652c40af10b0410c76c6bd37b60717c385be.tar.zst
cuberite-be31652c40af10b0410c76c6bd37b60717c385be.zip
Diffstat (limited to '')
-rw-r--r--source/cBlockEntity.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/cBlockEntity.h b/source/cBlockEntity.h
index 3f0190c77..662a6c5eb 100644
--- a/source/cBlockEntity.h
+++ b/source/cBlockEntity.h
@@ -41,7 +41,17 @@ protected:
, m_BlockType( a_BlockType )
, m_World( a_World )
{}
+
+ 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 )
+ , m_World(NULL)
+ {}
+
public:
+
virtual ~cBlockEntity() {};
virtual void Destroy() {};
@@ -52,6 +62,7 @@ public:
ENUM_BLOCK_ID GetBlockType() { return m_BlockType; }
cWorld * GetWorld(void) const {return m_World; }
+ void SetWorld(cWorld * a_World) {m_World = a_World; }
virtual void SaveToJson (Json::Value & a_Value ) = 0;