summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/EnderChestEntity.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-12-07 01:18:58 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-12-07 01:18:58 +0100
commit347e80bdd88f894394373745859f405dc82c1819 (patch)
tree82bf1b2163cbf7c59bf3c0181583982f34912aca /src/BlockEntities/EnderChestEntity.h
parentRenamed animation function (diff)
downloadcuberite-347e80bdd88f894394373745859f405dc82c1819.tar
cuberite-347e80bdd88f894394373745859f405dc82c1819.tar.gz
cuberite-347e80bdd88f894394373745859f405dc82c1819.tar.bz2
cuberite-347e80bdd88f894394373745859f405dc82c1819.tar.lz
cuberite-347e80bdd88f894394373745859f405dc82c1819.tar.xz
cuberite-347e80bdd88f894394373745859f405dc82c1819.tar.zst
cuberite-347e80bdd88f894394373745859f405dc82c1819.zip
Diffstat (limited to '')
-rw-r--r--src/BlockEntities/EnderChestEntity.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/BlockEntities/EnderChestEntity.h b/src/BlockEntities/EnderChestEntity.h
new file mode 100644
index 000000000..683b652b2
--- /dev/null
+++ b/src/BlockEntities/EnderChestEntity.h
@@ -0,0 +1,59 @@
+
+#pragma once
+
+#include "BlockEntityWithItems.h"
+#include "../UI/WindowOwner.h"
+
+
+
+
+
+namespace Json
+{
+ class Value;
+};
+
+class cClientHandle;
+class cServer;
+class cNBTData;
+
+
+
+
+
+class cEnderChestEntity : // tolua_export
+ public cBlockEntityWindowOwner,
+ // tolua_begin
+ public cBlockEntityWithItems
+{
+ typedef cBlockEntityWithItems super;
+
+public:
+ enum {
+ ContentsHeight = 3,
+ ContentsWidth = 9,
+ } ;
+
+ // tolua_end
+
+ /// Constructor used for normal operation
+ 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;
+
+ /// Opens a new chest window for this chest. Scans for neighbors to open a double chest window, if appropriate.
+ void OpenNewWindow(void);
+} ; // tolua_export
+
+
+
+