From 75937077136b9ec2eaba49c74543bdee323f68ff Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 9 Mar 2013 14:35:43 +0000 Subject: Pickups are now being saved into Anvil. Also changed cEntity rotation datatype to double git-svn-id: http://mc-server.googlecode.com/svn/trunk@1262 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Minecart.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source/Minecart.h') 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; } ; -- cgit v1.2.3