summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/EnderChestEntity.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-29 12:36:38 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-29 12:36:38 +0200
commitdde641ce83de474187102f0efbbced826673f54d (patch)
treecfa07264ef4762567c3ebf504e368e3c330ad6fc /src/BlockEntities/EnderChestEntity.h
parentMerge pull request #1136 from Howaner/GlobalFixes (diff)
downloadcuberite-dde641ce83de474187102f0efbbced826673f54d.tar
cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.gz
cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.bz2
cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.lz
cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.xz
cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.zst
cuberite-dde641ce83de474187102f0efbbced826673f54d.zip
Diffstat (limited to 'src/BlockEntities/EnderChestEntity.h')
-rw-r--r--src/BlockEntities/EnderChestEntity.h44
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