summaryrefslogtreecommitdiffstats
path: root/src/Entities/ItemFrame.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-03-16 21:43:33 +0100
committerMattes D <github@xoft.cz>2014-03-16 21:43:33 +0100
commitdc77cbfdc47016e0cb2a5ba9e4b18a1cb6896805 (patch)
tree0b599b418d62011ddc5f6ebb2702d7c4f6e1567e /src/Entities/ItemFrame.h
parentWrong if in BlockLeaves (diff)
parentFix anvil pickups. (diff)
downloadcuberite-dc77cbfdc47016e0cb2a5ba9e4b18a1cb6896805.tar
cuberite-dc77cbfdc47016e0cb2a5ba9e4b18a1cb6896805.tar.gz
cuberite-dc77cbfdc47016e0cb2a5ba9e4b18a1cb6896805.tar.bz2
cuberite-dc77cbfdc47016e0cb2a5ba9e4b18a1cb6896805.tar.lz
cuberite-dc77cbfdc47016e0cb2a5ba9e4b18a1cb6896805.tar.xz
cuberite-dc77cbfdc47016e0cb2a5ba9e4b18a1cb6896805.tar.zst
cuberite-dc77cbfdc47016e0cb2a5ba9e4b18a1cb6896805.zip
Diffstat (limited to 'src/Entities/ItemFrame.h')
-rw-r--r--src/Entities/ItemFrame.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/Entities/ItemFrame.h b/src/Entities/ItemFrame.h
index 43915e3f9..6577e7d94 100644
--- a/src/Entities/ItemFrame.h
+++ b/src/Entities/ItemFrame.h
@@ -1,7 +1,7 @@
#pragma once
-#include "Entity.h"
+#include "HangingEntity.h"
@@ -9,10 +9,10 @@
// tolua_begin
class cItemFrame :
- public cEntity
+ public cHangingEntity
{
// tolua_end
- typedef cEntity super;
+ typedef cHangingEntity super;
public:
@@ -20,18 +20,24 @@ public:
cItemFrame(eBlockFace a_BlockFace, double a_X, double a_Y, double a_Z);
- const cItem & GetItem(void) { return m_Item; }
- Byte GetRotation(void) const { return m_Rotation; }
+ /** Returns the item in the frame */
+ const cItem & GetItem(void) { return m_Item; } // tolua_export
+
+ /** Set the item in the frame */
+ void SetItem(cItem & a_Item) { m_Item = a_Item; }; // tolua_export
+
+ /** Returns the rotation from the item in the frame */
+ Byte GetRotation(void) const { return m_Rotation; } // tolua_export
+
+ /** Set the rotation from the item in the frame */
+ void SetRotation(Byte a_Rotation) { m_Rotation = a_Rotation; } // tolua_export
private:
- virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
virtual void OnRightClicked(cPlayer & a_Player) override;
- virtual void Tick(float a_Dt, cChunk & a_Chunk) override {};
virtual void KilledBy(cEntity * a_Killer) override;
virtual void GetDrops(cItems & a_Items, cEntity * a_Killer) override;
- eBlockFace m_BlockFace;
cItem m_Item;
Byte m_Rotation;