2017-07-07 03:31:45 -04:00
|
|
|
|
|
|
|
// BedEntity.h
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "BlockEntity.h"
|
2020-04-03 02:57:01 -04:00
|
|
|
#include "../BlockType.h"
|
2017-07-07 03:31:45 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// tolua_begin
|
|
|
|
|
2020-10-20 07:28:45 -04:00
|
|
|
class cBedEntity :
|
2017-07-07 03:31:45 -04:00
|
|
|
public cBlockEntity
|
|
|
|
{
|
|
|
|
// tolua_end
|
2020-04-13 12:38:06 -04:00
|
|
|
using Super = cBlockEntity;
|
2019-09-29 08:59:24 -04:00
|
|
|
|
|
|
|
public: // tolua_export
|
2017-07-07 03:31:45 -04:00
|
|
|
|
2019-09-29 08:59:24 -04:00
|
|
|
cBedEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World, short a_Color = E_META_WOOL_RED);
|
2017-07-07 03:31:45 -04:00
|
|
|
|
|
|
|
// tolua_begin
|
|
|
|
|
|
|
|
/** Returns the color of the bed */
|
|
|
|
short GetColor(void) const { return m_Color; }
|
|
|
|
|
|
|
|
/** Set the color of the bed. */
|
|
|
|
void SetColor(short a_Color);
|
|
|
|
|
|
|
|
/** Returns true if this is the pillow block, it has then the meta 8. */
|
|
|
|
bool IsPillowBlock(void) { return ((m_BlockMeta & 0x08) == 0x08); }
|
|
|
|
|
|
|
|
// tolua_end
|
|
|
|
|
|
|
|
// cBlockEntity overrides:
|
2020-09-23 11:06:27 -04:00
|
|
|
virtual cItems ConvertToPickups() const override;
|
2017-07-07 03:31:45 -04:00
|
|
|
virtual void CopyFrom(const cBlockEntity & a_Src) override;
|
|
|
|
virtual bool UsedBy(cPlayer * a_Player) override { return false; }
|
|
|
|
virtual void SendTo(cClientHandle & a_Client) override;
|
|
|
|
|
|
|
|
private:
|
2020-10-20 07:28:45 -04:00
|
|
|
|
2017-07-07 03:31:45 -04:00
|
|
|
short m_Color;
|
|
|
|
}; // tolua_export
|