Cuberite
A lightweight, fast and extensible game server for Minecraft
EnderChestEntity.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "BlockEntity.h"
5 #include "../UI/WindowOwner.h"
6 
7 
8 
9 
10 
11 // tolua_begin
13  public cBlockEntity,
15 {
16  // tolua_end
17 
19 
20 public: // tolua_export
21 
22  cEnderChestEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World);
23 
24  // cBlockEntity overrides:
25  virtual void OnRemoveFromWorld() override;
26  virtual bool UsedBy(cPlayer * a_Player) override;
27  virtual void SendTo(cClientHandle & a_Client) override;
28 
29  static void LoadFromJson(const Json::Value & a_Value, cItemGrid & a_Grid);
30  static void SaveToJson(Json::Value & a_Value, const cItemGrid & a_Grid);
31 
33  void OpenNewWindow(void);
34 } ; // tolua_export
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
Definition: ChunkDef.h:44
unsigned char BLOCKTYPE
The datatype used by blockdata.
Definition: ChunkDef.h:41
cBlockEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld *a_World)
Definition: BlockEntity.cpp:32
cEnderChestEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld *a_World)
virtual bool UsedBy(cPlayer *a_Player) override
Called when a player uses this entity; should open the UI window.
virtual void SendTo(cClientHandle &a_Client) override
Sends the packet defining the block entity to the client specified.
static void LoadFromJson(const Json::Value &a_Value, cItemGrid &a_Grid)
void OpenNewWindow(void)
Opens a new enderchest window for this enderchest.
static void SaveToJson(Json::Value &a_Value, const cItemGrid &a_Grid)
virtual void OnRemoveFromWorld() override
Called when the block entity object is removed from a world.
Definition: Player.h:29
Window owner that is associated with a block entity (chest, furnace, ...)
Definition: WindowOwner.h:59
Definition: World.h:53