diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-03-22 15:48:16 +0100 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-03-22 15:48:16 +0100 |
commit | 2266c2150daad68c19d320683f6bf5abd7f2ebb2 (patch) | |
tree | 111fe0c36643afd27317b8d9a4c7912b6899ec4a /src/Entities/HangingEntity.h | |
parent | Patched tolua to understand size_t (diff) | |
parent | Implemented faster upscaling using templates. (diff) | |
download | cuberite-2266c2150daad68c19d320683f6bf5abd7f2ebb2.tar cuberite-2266c2150daad68c19d320683f6bf5abd7f2ebb2.tar.gz cuberite-2266c2150daad68c19d320683f6bf5abd7f2ebb2.tar.bz2 cuberite-2266c2150daad68c19d320683f6bf5abd7f2ebb2.tar.lz cuberite-2266c2150daad68c19d320683f6bf5abd7f2ebb2.tar.xz cuberite-2266c2150daad68c19d320683f6bf5abd7f2ebb2.tar.zst cuberite-2266c2150daad68c19d320683f6bf5abd7f2ebb2.zip |
Diffstat (limited to 'src/Entities/HangingEntity.h')
-rw-r--r-- | src/Entities/HangingEntity.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/Entities/HangingEntity.h b/src/Entities/HangingEntity.h new file mode 100644 index 000000000..6498e4b5b --- /dev/null +++ b/src/Entities/HangingEntity.h @@ -0,0 +1,49 @@ + +#pragma once + +#include "Entity.h" + + + + + +// tolua_begin +class cHangingEntity : + public cEntity +{ + // tolua_end + typedef cEntity super; + +public: + + CLASS_PROTODEF(cHangingEntity); + + cHangingEntity(eEntityType a_EntityType, eBlockFace a_BlockFace, double a_X, double a_Y, double a_Z); + + /** Returns the orientation from the hanging entity */ + eBlockFace GetDirection() const { return m_BlockFace; } // tolua_export + + /** Set the orientation from the hanging entity */ + void SetDirection(eBlockFace a_BlockFace) { m_BlockFace = a_BlockFace; } // tolua_export + + /** Returns the X coord. */ + int GetTileX() const { return POSX_TOINT; } // tolua_export + + /** Returns the Y coord. */ + int GetTileY() const { return POSY_TOINT; } // tolua_export + + /** Returns the Z coord. */ + int GetTileZ() const { return POSZ_TOINT; } // tolua_export + +private: + + virtual void SpawnOn(cClientHandle & a_ClientHandle) override; + virtual void Tick(float a_Dt, cChunk & a_Chunk) override {}; + + eBlockFace m_BlockFace; + +}; // tolua_export + + + + |