summaryrefslogtreecommitdiffstats
path: root/src/Entities/HangingEntity.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-03-15 02:45:25 +0100
committerHowaner <franzi.moos@googlemail.com>2014-03-15 02:45:25 +0100
commit7ac7304c913f9cf82a906589904068a3e7f09d43 (patch)
treeb4eea6cc46781c7c253c44072c1ad446c8633997 /src/Entities/HangingEntity.h
parentAdd health and age load to pickup's. (diff)
downloadcuberite-7ac7304c913f9cf82a906589904068a3e7f09d43.tar
cuberite-7ac7304c913f9cf82a906589904068a3e7f09d43.tar.gz
cuberite-7ac7304c913f9cf82a906589904068a3e7f09d43.tar.bz2
cuberite-7ac7304c913f9cf82a906589904068a3e7f09d43.tar.lz
cuberite-7ac7304c913f9cf82a906589904068a3e7f09d43.tar.xz
cuberite-7ac7304c913f9cf82a906589904068a3e7f09d43.tar.zst
cuberite-7ac7304c913f9cf82a906589904068a3e7f09d43.zip
Diffstat (limited to 'src/Entities/HangingEntity.h')
-rw-r--r--src/Entities/HangingEntity.h49
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
+
+
+
+