diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-03-09 15:35:43 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-03-09 15:35:43 +0100 |
commit | 75937077136b9ec2eaba49c74543bdee323f68ff (patch) | |
tree | ee8b20b2b3866118dd1187cafa730a9c4e90b82a /source/Minecart.h | |
parent | Core: added PortsIPv6 setting to webadmin (contributed by STR_Warrior) (diff) | |
download | cuberite-75937077136b9ec2eaba49c74543bdee323f68ff.tar cuberite-75937077136b9ec2eaba49c74543bdee323f68ff.tar.gz cuberite-75937077136b9ec2eaba49c74543bdee323f68ff.tar.bz2 cuberite-75937077136b9ec2eaba49c74543bdee323f68ff.tar.lz cuberite-75937077136b9ec2eaba49c74543bdee323f68ff.tar.xz cuberite-75937077136b9ec2eaba49c74543bdee323f68ff.tar.zst cuberite-75937077136b9ec2eaba49c74543bdee323f68ff.zip |
Diffstat (limited to '')
-rw-r--r-- | source/Minecart.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/Minecart.h b/source/Minecart.h index a074e2f97..17c766fb8 100644 --- a/source/Minecart.h +++ b/source/Minecart.h @@ -10,6 +10,7 @@ #pragma once
#include "Entity.h"
+#include "Item.h"
@@ -74,8 +75,21 @@ class cMinecartWithChest : 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 & GetItem(int a_Idx) const { return m_Items[a_Idx]; }
+ cItem & GetItem(int a_Idx) { return m_Items[a_Idx]; }
+
+ void SetItem(int a_Idx, const cItem & a_Item);
+
+protected:
+
+ /// The chest contents:
+ cItem m_Items[NumSlots];
+
// cEntity overrides:
virtual void OnRightClicked(cPlayer & a_Player) override;
} ;
|