2013-12-06 19:18:58 -05:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2014-06-29 06:36:38 -04:00
|
|
|
#include "BlockEntity.h"
|
2018-08-28 20:51:25 -04:00
|
|
|
#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
|
|
|
{
|
|
|
|
// tolua_end
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2020-04-13 12:38:06 -04:00
|
|
|
using Super = cBlockEntity;
|
2019-09-29 08:59:24 -04:00
|
|
|
|
|
|
|
public: // tolua_export
|
|
|
|
|
|
|
|
cEnderChestEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World);
|
2013-12-06 19:18:58 -05:00
|
|
|
|
|
|
|
// cBlockEntity overrides:
|
2021-01-02 08:50:34 -05:00
|
|
|
virtual void OnRemoveFromWorld() override;
|
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
|