2013-12-06 19:18:58 -05:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2014-06-29 06:36:38 -04:00
|
|
|
#include "BlockEntity.h"
|
|
|
|
#include "UI/WindowOwner.h"
|
2013-12-06 19:18:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-16 16:02:28 -05:00
|
|
|
// tolua_begin
|
|
|
|
class cEnderChestEntity :
|
2014-06-29 06:36:38 -04:00
|
|
|
public cBlockEntity,
|
|
|
|
public cBlockEntityWindowOwner
|
2013-12-06 19:18:58 -05:00
|
|
|
{
|
2017-06-15 09:32:33 -04:00
|
|
|
typedef cBlockEntity Super;
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-07-17 16:50:58 -04:00
|
|
|
public:
|
2013-12-06 19:18:58 -05:00
|
|
|
// tolua_end
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-11-27 16:42:08 -05:00
|
|
|
BLOCKENTITY_PROTODEF(cEnderChestEntity)
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2017-06-15 09:32:33 -04:00
|
|
|
cEnderChestEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World);
|
2017-05-20 02:16:28 -04:00
|
|
|
virtual ~cEnderChestEntity() override;
|
2013-12-06 19:18:58 -05:00
|
|
|
|
|
|
|
// cBlockEntity overrides:
|
2015-12-01 17:12:44 -05:00
|
|
|
virtual bool UsedBy(cPlayer * a_Player) override;
|
2017-05-21 05:48:33 -04:00
|
|
|
virtual void SendTo(cClientHandle & a_Client) override;
|
2014-06-29 06:36:38 -04:00
|
|
|
|
|
|
|
static void LoadFromJson(const Json::Value & a_Value, cItemGrid & a_Grid);
|
|
|
|
static void SaveToJson(Json::Value & a_Value, const cItemGrid & a_Grid);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-06-29 06:36:38 -04:00
|
|
|
/** Opens a new enderchest window for this enderchest */
|
2013-12-06 19:18:58 -05:00
|
|
|
void OpenNewWindow(void);
|
|
|
|
} ; // tolua_export
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|