2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2013-05-25 07:59:13 -04:00
|
|
|
#include "BlockEntityWithItems.h"
|
2013-05-28 15:12:47 -04:00
|
|
|
#include "../UI/WindowOwner.h"
|
2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Json
|
|
|
|
{
|
|
|
|
class Value;
|
|
|
|
};
|
|
|
|
|
|
|
|
class cClientHandle;
|
|
|
|
class cServer;
|
|
|
|
class cNBTData;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-12 08:30:47 -04:00
|
|
|
class cChestEntity : // tolua_export
|
|
|
|
public cBlockEntityWindowOwner,
|
|
|
|
// tolua_begin
|
|
|
|
public cBlockEntityWithItems
|
2013-04-06 17:21:57 -04:00
|
|
|
{
|
2013-05-25 07:59:13 -04:00
|
|
|
typedef cBlockEntityWithItems super;
|
2013-04-06 17:21:57 -04:00
|
|
|
|
2012-06-14 09:06:06 -04:00
|
|
|
public:
|
2013-05-25 07:59:13 -04:00
|
|
|
enum {
|
|
|
|
ContentsHeight = 3,
|
|
|
|
ContentsWidth = 9,
|
|
|
|
} ;
|
|
|
|
|
2013-04-06 17:21:57 -04:00
|
|
|
// tolua_end
|
|
|
|
|
2013-05-25 07:59:13 -04:00
|
|
|
/// Constructor used for normal operation
|
2012-10-20 17:53:09 -04:00
|
|
|
cChestEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World);
|
2013-04-06 17:21:57 -04:00
|
|
|
|
2012-06-14 09:06:06 -04:00
|
|
|
virtual ~cChestEntity();
|
|
|
|
|
2013-05-25 07:59:13 -04:00
|
|
|
static const char * GetClassStatic(void) { return "cChestEntity"; }
|
2013-02-02 18:55:29 -05:00
|
|
|
|
2013-06-13 02:13:56 -04:00
|
|
|
bool LoadFromJson(const Json::Value & a_Value);
|
2012-10-20 17:53:09 -04:00
|
|
|
|
|
|
|
// cBlockEntity overrides:
|
2013-06-13 02:13:56 -04:00
|
|
|
virtual void SaveToJson(Json::Value & a_Value) override;
|
2012-08-24 03:58:26 -04:00
|
|
|
virtual void SendTo(cClientHandle & a_Client) override;
|
2013-06-13 02:13:56 -04:00
|
|
|
virtual void UsedBy(cPlayer * a_Player) override;
|
2012-10-20 17:53:09 -04:00
|
|
|
|
2013-06-13 02:13:56 -04:00
|
|
|
/// Opens a new chest window for this chest. Scans for neighbors to open a double chest window, if appropriate.
|
2012-10-20 17:53:09 -04:00
|
|
|
void OpenNewWindow(void);
|
2013-04-06 17:21:57 -04:00
|
|
|
} ; // tolua_export
|
2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|