summaryrefslogtreecommitdiffstats
path: root/source/cChestEntity.h
diff options
context:
space:
mode:
authormtilden@gmail.com <mtilden@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-29 14:16:23 +0100
committermtilden@gmail.com <mtilden@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-29 14:16:23 +0100
commitc4f4ae5c7122c58af239a01328c168627ed68e27 (patch)
treea14c16b0e2b270caa465892a0d2a60adf2e3d78e /source/cChestEntity.h
parent- Pickups should now burn in fire (diff)
downloadcuberite-c4f4ae5c7122c58af239a01328c168627ed68e27.tar
cuberite-c4f4ae5c7122c58af239a01328c168627ed68e27.tar.gz
cuberite-c4f4ae5c7122c58af239a01328c168627ed68e27.tar.bz2
cuberite-c4f4ae5c7122c58af239a01328c168627ed68e27.tar.lz
cuberite-c4f4ae5c7122c58af239a01328c168627ed68e27.tar.xz
cuberite-c4f4ae5c7122c58af239a01328c168627ed68e27.tar.zst
cuberite-c4f4ae5c7122c58af239a01328c168627ed68e27.zip
Diffstat (limited to 'source/cChestEntity.h')
-rw-r--r--source/cChestEntity.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/cChestEntity.h b/source/cChestEntity.h
index 785f57553..599d71c18 100644
--- a/source/cChestEntity.h
+++ b/source/cChestEntity.h
@@ -3,6 +3,7 @@
#include "cBlockEntity.h"
#include "cWindowOwner.h"
#include "FileDefine.h"
+#include "packets\cPacket_BlockAction.h"
namespace Json
{
@@ -35,8 +36,17 @@ public:
virtual void UsedBy( cPlayer & a_Player );
+ cChestEntity *GetJoinedChest() { return m_JoinedChest; }
+ void SetJoinedChest(cChestEntity *a_Chest) { m_JoinedChest = a_Chest; }
+ void RemoveJoinedChest(cChestEntity *a_Chest) { if (m_JoinedChest && m_JoinedChest == a_Chest) { m_JoinedChest = NULL; m_TopChest = false; } }
+
+ int GetChestHeight() { return ((m_JoinedChest) ? c_ChestHeight * 2 : c_ChestHeight); }
+ cItem *GetContents(bool a_OnlyThis = false);
+
static const int c_ChestWidth = 9;
static const int c_ChestHeight = 3;
private:
cItem* m_Content;
+ bool m_TopChest;
+ cChestEntity *m_JoinedChest;
}; \ No newline at end of file