summaryrefslogtreecommitdiffstats
path: root/src/Entities/HangingEntity.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-03-17 17:44:34 +0100
committerTycho <work.tycho+git@gmail.com>2014-03-17 17:44:34 +0100
commit90ab055eab62b35a8ddc681e6d79aa1d42afae9f (patch)
treeb71798809ca05c1d904a18083a8c652a4954306a /src/Entities/HangingEntity.h
parentMade buffers static const (diff)
parentFixed double to float conversions. (diff)
downloadcuberite-90ab055eab62b35a8ddc681e6d79aa1d42afae9f.tar
cuberite-90ab055eab62b35a8ddc681e6d79aa1d42afae9f.tar.gz
cuberite-90ab055eab62b35a8ddc681e6d79aa1d42afae9f.tar.bz2
cuberite-90ab055eab62b35a8ddc681e6d79aa1d42afae9f.tar.lz
cuberite-90ab055eab62b35a8ddc681e6d79aa1d42afae9f.tar.xz
cuberite-90ab055eab62b35a8ddc681e6d79aa1d42afae9f.tar.zst
cuberite-90ab055eab62b35a8ddc681e6d79aa1d42afae9f.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
+
+
+
+