diff options
author | Mattes D <github@xoft.cz> | 2014-07-02 22:59:21 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-07-02 22:59:21 +0200 |
commit | 39fff19955e07460b1160ed962829c9e0a51a454 (patch) | |
tree | cd2b8aa7e24fb9c9052c55a67ea3364b837a5cf5 /src/BlockEntities/EnderChestEntity.h | |
parent | Merge remote-tracking branch 'origin/master' (diff) | |
parent | Suggestion (diff) | |
download | cuberite-39fff19955e07460b1160ed962829c9e0a51a454.tar cuberite-39fff19955e07460b1160ed962829c9e0a51a454.tar.gz cuberite-39fff19955e07460b1160ed962829c9e0a51a454.tar.bz2 cuberite-39fff19955e07460b1160ed962829c9e0a51a454.tar.lz cuberite-39fff19955e07460b1160ed962829c9e0a51a454.tar.xz cuberite-39fff19955e07460b1160ed962829c9e0a51a454.tar.zst cuberite-39fff19955e07460b1160ed962829c9e0a51a454.zip |
Diffstat (limited to 'src/BlockEntities/EnderChestEntity.h')
-rw-r--r-- | src/BlockEntities/EnderChestEntity.h | 44 |
1 files changed, 14 insertions, 30 deletions
diff --git a/src/BlockEntities/EnderChestEntity.h b/src/BlockEntities/EnderChestEntity.h index 45beee45f..04af67683 100644 --- a/src/BlockEntities/EnderChestEntity.h +++ b/src/BlockEntities/EnderChestEntity.h @@ -1,20 +1,9 @@ #pragma once -#include "BlockEntityWithItems.h" - - - - - -namespace Json -{ - class Value; -}; - -class cClientHandle; -class cServer; -class cNBTData; +#include "BlockEntity.h" +#include "UI/WindowOwner.h" +#include "json/json.h" @@ -22,33 +11,28 @@ class cNBTData; // tolua_begin class cEnderChestEntity : - public cBlockEntityWithItems + public cBlockEntity, + public cBlockEntityWindowOwner { - typedef cBlockEntityWithItems super; - -public: - enum { - ContentsHeight = 3, - ContentsWidth = 9, - } ; + typedef cBlockEntity super; +public: // tolua_end - /// Constructor used for normal operation - cEnderChestEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World); - + cEnderChestEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World); virtual ~cEnderChestEntity(); static const char * GetClassStatic(void) { return "cEnderChestEntity"; } - - bool LoadFromJson(const Json::Value & a_Value); // cBlockEntity overrides: - virtual void SaveToJson(Json::Value & a_Value) override; - virtual void SendTo(cClientHandle & a_Client) override; virtual void UsedBy(cPlayer * a_Player) override; + virtual void SaveToJson(Json::Value & a_Value) override { UNUSED(a_Value); } + virtual void SendTo(cClientHandle & a_Client) override { UNUSED(a_Client); } + + static void LoadFromJson(const Json::Value & a_Value, cItemGrid & a_Grid); + static void SaveToJson(Json::Value & a_Value, const cItemGrid & a_Grid); - /// Opens a new chest window for this chest. Scans for neighbors to open a double chest window, if appropriate. + /** Opens a new enderchest window for this enderchest */ void OpenNewWindow(void); } ; // tolua_export |