diff options
author | Mattes D <github@xoft.cz> | 2015-06-02 12:51:43 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-06-02 12:51:43 +0200 |
commit | 48c153bf53d5606e351bd180e2fd9345034f60aa (patch) | |
tree | 060d1b7203b9454eb4c6fbfe086724f383ec6899 /src/Entities | |
parent | Merge pull request #2172 from mc-server/LightingCallbacks (diff) | |
download | cuberite-48c153bf53d5606e351bd180e2fd9345034f60aa.tar cuberite-48c153bf53d5606e351bd180e2fd9345034f60aa.tar.gz cuberite-48c153bf53d5606e351bd180e2fd9345034f60aa.tar.bz2 cuberite-48c153bf53d5606e351bd180e2fd9345034f60aa.tar.lz cuberite-48c153bf53d5606e351bd180e2fd9345034f60aa.tar.xz cuberite-48c153bf53d5606e351bd180e2fd9345034f60aa.tar.zst cuberite-48c153bf53d5606e351bd180e2fd9345034f60aa.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/HangingEntity.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/Entities/HangingEntity.h b/src/Entities/HangingEntity.h index 4d70cd1a0..5d0aa17b3 100644 --- a/src/Entities/HangingEntity.h +++ b/src/Entities/HangingEntity.h @@ -46,6 +46,9 @@ public: protected: + Byte m_Facing; + + virtual void SpawnOn(cClientHandle & a_ClientHandle) override; virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override { @@ -53,6 +56,7 @@ protected: UNUSED(a_Chunk); } + /** Converts protocol hanging item facing to eBlockFace values */ inline static eBlockFace ProtocolFaceToBlockFace(Byte a_ProtocolFace) { @@ -77,6 +81,7 @@ protected: return Dir; } + /** Converts eBlockFace values to protocol hanging item faces */ inline static Byte BlockFaceToProtocolFace(eBlockFace a_BlockFace) { @@ -99,13 +104,17 @@ protected: Dir = cHangingEntity::BlockFaceToProtocolFace(BLOCK_FACE_XP); } + #if !defined(__clang__) + default: + { + ASSERT(!"Unknown BLOCK_FACE"); + return 0; + } + #endif } return Dir; } - - Byte m_Facing; - }; // tolua_export |