summaryrefslogtreecommitdiffstats
path: root/source/Minecart.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-18 17:48:50 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-18 17:48:50 +0100
commitd47ff5520373acb359590fb036b6a761af58cf75 (patch)
tree63f68f88d8bf8730da1dd32880ec526dc889bc6c /source/Minecart.h
parentRemoved all E_ITEM_ symbols equivalent to E_BLOCK_, and all obsolete item and block symbols. (diff)
downloadcuberite-d47ff5520373acb359590fb036b6a761af58cf75.tar
cuberite-d47ff5520373acb359590fb036b6a761af58cf75.tar.gz
cuberite-d47ff5520373acb359590fb036b6a761af58cf75.tar.bz2
cuberite-d47ff5520373acb359590fb036b6a761af58cf75.tar.lz
cuberite-d47ff5520373acb359590fb036b6a761af58cf75.tar.xz
cuberite-d47ff5520373acb359590fb036b6a761af58cf75.tar.zst
cuberite-d47ff5520373acb359590fb036b6a761af58cf75.zip
Diffstat (limited to 'source/Minecart.h')
-rw-r--r--source/Minecart.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/source/Minecart.h b/source/Minecart.h
new file mode 100644
index 000000000..72270df85
--- /dev/null
+++ b/source/Minecart.h
@@ -0,0 +1,46 @@
+
+// Minecart.h
+
+// Declares the cMinecart class representing a minecart in the world
+
+
+
+
+
+#pragma once
+
+#include "Entity.h"
+
+
+
+
+
+class cMinecart :
+ public cEntity
+{
+ typedef cEntity super;
+
+public:
+ 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
+ } ;
+ cMinecart(ePayload a_Payload, double a_X, double a_Y, double a_Z);
+
+ // cEntity overrides:
+ virtual void Initialize(cWorld * a_World) override;
+ virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
+ virtual void Tick(float a_Dt, MTRand & a_TickRandom) override;
+
+ ePayload GetPayload(void) const { return m_Payload; }
+
+protected:
+ ePayload m_Payload;
+} ;
+
+
+
+