1
0
cuberite-2a/src/BlockEntities/MobHeadEntity.h

69 lines
1.3 KiB
C
Raw Normal View History

2014-02-19 13:45:09 +00:00
// MobHeadEntity.h
// Declares the cMobHeadEntity class representing a single skull / head in the world
2014-02-19 13:45:09 +00:00
#pragma once
#include "BlockEntity.h"
2014-09-26 17:13:19 +00:00
#include "Defines.h"
2014-02-19 13:45:09 +00:00
// tolua_begin
2014-07-17 20:50:58 +00:00
class cMobHeadEntity :
2014-02-19 13:45:09 +00:00
public cBlockEntity
{
typedef cBlockEntity super;
public:
// tolua_end
BLOCKENTITY_PROTODEF(cMobHeadEntity)
2014-10-20 20:55:07 +00:00
/** Creates a new mob head entity at the specified block coords. a_World may be nullptr */
2014-02-19 13:45:09 +00:00
cMobHeadEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World);
// tolua_begin
/** Set the type of the mob head */
2014-02-19 13:45:09 +00:00
void SetType(const eMobHeadType & a_SkullType);
/** Set the rotation of the mob head */
2014-02-19 13:45:09 +00:00
void SetRotation(eMobHeadRotation a_Rotation);
/** Set the player name for mob heads with player type */
2014-02-19 13:45:09 +00:00
void SetOwner(const AString & a_Owner);
/** Returns the type of the mob head */
2014-02-19 13:45:09 +00:00
eMobHeadType GetType(void) const { return m_Type; }
/** Returns the rotation of the mob head */
2014-02-19 13:45:09 +00:00
eMobHeadRotation GetRotation(void) const { return m_Rotation; }
/** Returns the player name of the mob head */
2014-02-19 13:45:09 +00:00
AString GetOwner(void) const { return m_Owner; }
// tolua_end
virtual void UsedBy(cPlayer * a_Player) override;
virtual void SendTo(cClientHandle & a_Client) override;
private:
eMobHeadType m_Type;
eMobHeadRotation m_Rotation;
AString m_Owner;
} ; // tolua_export