1
0
Fork 0
cuberite-2a/src/Entities/HangingEntity.h

55 lines
1.0 KiB
C
Raw Normal View History

2014-03-15 01:45:25 +00:00
#pragma once
#include "Entity.h"
// tolua_begin
class cHangingEntity :
public cEntity
{
typedef cEntity super;
public:
// tolua_end
CLASS_PROTODEF(cHangingEntity)
2014-03-15 01:45:25 +00:00
cHangingEntity(eEntityType a_EntityType, eBlockFace a_BlockFace, double a_X, double a_Y, double a_Z);
// tolua_begin
/** Returns the direction in which the entity is facing. */
eBlockFace GetFacing() const { return m_Facing; }
2014-03-15 01:45:25 +00:00
/** Set the direction in which the entity is facing. */
void SetFacing(eBlockFace a_Facing);
2014-03-15 01:45:25 +00:00
/** Returns the X coord of the block in which the entity resides. */
int GetBlockX() const { return POSX_TOINT; }
2014-03-15 01:45:25 +00:00
/** Returns the Y coord of the block in which the entity resides. */
int GetBlockY() const { return POSY_TOINT; }
2014-03-15 01:45:25 +00:00
/** Returns the Z coord of the block in which the entity resides. */
int GetBlockZ() const { return POSZ_TOINT; }
// tolua_end
2014-03-15 01:45:25 +00:00
private:
virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
virtual void Tick(float a_Dt, cChunk & a_Chunk) override {}
2014-03-15 01:45:25 +00:00
eBlockFace m_Facing;
2014-03-15 01:45:25 +00:00
}; // tolua_export