summaryrefslogtreecommitdiffstats
path: root/source/Minecart.h
diff options
context:
space:
mode:
authorbearbin <bearbin@gmail.com>2013-07-29 14:55:26 +0200
committerbearbin <bearbin@gmail.com>2013-07-29 14:55:26 +0200
commitfb1044c4e55c726753d094b66756a1cb3bc60ee8 (patch)
treec61e56725da7dff0154d566722651e2c39c9d6c6 /source/Minecart.h
parentWebAdmin: Removed the duplicate memory usage querying (diff)
parentChanged everyting to Unix line endings. (diff)
downloadcuberite-fb1044c4e55c726753d094b66756a1cb3bc60ee8.tar
cuberite-fb1044c4e55c726753d094b66756a1cb3bc60ee8.tar.gz
cuberite-fb1044c4e55c726753d094b66756a1cb3bc60ee8.tar.bz2
cuberite-fb1044c4e55c726753d094b66756a1cb3bc60ee8.tar.lz
cuberite-fb1044c4e55c726753d094b66756a1cb3bc60ee8.tar.xz
cuberite-fb1044c4e55c726753d094b66756a1cb3bc60ee8.tar.zst
cuberite-fb1044c4e55c726753d094b66756a1cb3bc60ee8.zip
Diffstat (limited to 'source/Minecart.h')
-rw-r--r--source/Minecart.h234
1 files changed, 117 insertions, 117 deletions
diff --git a/source/Minecart.h b/source/Minecart.h
index db61997d8..b7b4c2b04 100644
--- a/source/Minecart.h
+++ b/source/Minecart.h
@@ -1,117 +1,117 @@
-
-// Minecart.h
-
-// Declares the cMinecart class representing a minecart in the world
-
-
-
-
-
-#pragma once
-
-#include "Entity.h"
-#include "Item.h"
-
-
-
-
-
-class cMinecart :
- public cEntity
-{
- typedef cEntity super;
-
-public:
- CLASS_PROTODEF(cMinecart);
-
- enum ePayload
- {
- mpNone, // Empty minecart, ridable by player or mobs
- mpChest, // Minecart-with-chest, can store a grid of 3*8 items
- mpFurnace, // Minecart-with-furnace, can be powered
- // TODO: Other 1.5 features: hopper, tnt, dispenser, spawner
- } ;
-
- // cEntity overrides:
- virtual void Initialize(cWorld * a_World) override;
- virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
- virtual void Tick(float a_Dt, cChunk & a_Chunk) override;
-
- ePayload GetPayload(void) const { return m_Payload; }
-
-protected:
- ePayload m_Payload;
-
- cMinecart(ePayload a_Payload, double a_X, double a_Y, double a_Z);
-} ;
-
-
-
-
-
-class cEmptyMinecart :
- public cMinecart
-{
- typedef cMinecart super;
-
-public:
- CLASS_PROTODEF(cEmptyMinecart);
-
- cEmptyMinecart(double a_X, double a_Y, double a_Z);
-
- // cEntity overrides:
- virtual void OnRightClicked(cPlayer & a_Player) override;
-} ;
-
-
-
-
-
-class cMinecartWithChest :
- public cMinecart
-{
- typedef cMinecart super;
-
-public:
- CLASS_PROTODEF(cMinecartWithChest);
-
- /// Number of item slots in the chest
- static const int NumSlots = 9 * 3;
-
- cMinecartWithChest(double a_X, double a_Y, double a_Z);
-
- const cItem & GetSlot(int a_Idx) const { return m_Items[a_Idx]; }
- cItem & GetSlot(int a_Idx) { return m_Items[a_Idx]; }
-
- void SetSlot(int a_Idx, const cItem & a_Item);
-
-protected:
-
- /// The chest contents:
- cItem m_Items[NumSlots];
-
- // cEntity overrides:
- virtual void OnRightClicked(cPlayer & a_Player) override;
-} ;
-
-
-
-
-
-class cMinecartWithFurnace :
- public cMinecart
-{
- typedef cMinecart super;
-
-public:
- CLASS_PROTODEF(cMinecartWithFurnace);
-
- cMinecartWithFurnace(double a_X, double a_Y, double a_Z);
-
- // cEntity overrides:
- virtual void OnRightClicked(cPlayer & a_Player) override;
-} ;
-
-
-
-
+
+// Minecart.h
+
+// Declares the cMinecart class representing a minecart in the world
+
+
+
+
+
+#pragma once
+
+#include "Entity.h"
+#include "Item.h"
+
+
+
+
+
+class cMinecart :
+ public cEntity
+{
+ typedef cEntity super;
+
+public:
+ CLASS_PROTODEF(cMinecart);
+
+ enum ePayload
+ {
+ mpNone, // Empty minecart, ridable by player or mobs
+ mpChest, // Minecart-with-chest, can store a grid of 3*8 items
+ mpFurnace, // Minecart-with-furnace, can be powered
+ // TODO: Other 1.5 features: hopper, tnt, dispenser, spawner
+ } ;
+
+ // cEntity overrides:
+ virtual void Initialize(cWorld * a_World) override;
+ virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
+ virtual void Tick(float a_Dt, cChunk & a_Chunk) override;
+
+ ePayload GetPayload(void) const { return m_Payload; }
+
+protected:
+ ePayload m_Payload;
+
+ cMinecart(ePayload a_Payload, double a_X, double a_Y, double a_Z);
+} ;
+
+
+
+
+
+class cEmptyMinecart :
+ public cMinecart
+{
+ typedef cMinecart super;
+
+public:
+ CLASS_PROTODEF(cEmptyMinecart);
+
+ cEmptyMinecart(double a_X, double a_Y, double a_Z);
+
+ // cEntity overrides:
+ virtual void OnRightClicked(cPlayer & a_Player) override;
+} ;
+
+
+
+
+
+class cMinecartWithChest :
+ public cMinecart
+{
+ typedef cMinecart super;
+
+public:
+ CLASS_PROTODEF(cMinecartWithChest);
+
+ /// Number of item slots in the chest
+ static const int NumSlots = 9 * 3;
+
+ cMinecartWithChest(double a_X, double a_Y, double a_Z);
+
+ const cItem & GetSlot(int a_Idx) const { return m_Items[a_Idx]; }
+ cItem & GetSlot(int a_Idx) { return m_Items[a_Idx]; }
+
+ void SetSlot(int a_Idx, const cItem & a_Item);
+
+protected:
+
+ /// The chest contents:
+ cItem m_Items[NumSlots];
+
+ // cEntity overrides:
+ virtual void OnRightClicked(cPlayer & a_Player) override;
+} ;
+
+
+
+
+
+class cMinecartWithFurnace :
+ public cMinecart
+{
+ typedef cMinecart super;
+
+public:
+ CLASS_PROTODEF(cMinecartWithFurnace);
+
+ cMinecartWithFurnace(double a_X, double a_Y, double a_Z);
+
+ // cEntity overrides:
+ virtual void OnRightClicked(cPlayer & a_Player) override;
+} ;
+
+
+
+