summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2014-01-12 15:27:50 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2014-01-12 15:27:50 +0100
commitc5603ce064d7e4e897aa92d6f43d407802ae3687 (patch)
tree8a50533bd8e07807587100e3a1016d07f3335406 /src/Entities
parentAdded cWorld::SpawnMinecart. (diff)
downloadcuberite-c5603ce064d7e4e897aa92d6f43d407802ae3687.tar
cuberite-c5603ce064d7e4e897aa92d6f43d407802ae3687.tar.gz
cuberite-c5603ce064d7e4e897aa92d6f43d407802ae3687.tar.bz2
cuberite-c5603ce064d7e4e897aa92d6f43d407802ae3687.tar.lz
cuberite-c5603ce064d7e4e897aa92d6f43d407802ae3687.tar.xz
cuberite-c5603ce064d7e4e897aa92d6f43d407802ae3687.tar.zst
cuberite-c5603ce064d7e4e897aa92d6f43d407802ae3687.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Minecart.cpp6
-rw-r--r--src/Entities/Minecart.h8
2 files changed, 11 insertions, 3 deletions
diff --git a/src/Entities/Minecart.cpp b/src/Entities/Minecart.cpp
index f75e23d8b..5a9217c9e 100644
--- a/src/Entities/Minecart.cpp
+++ b/src/Entities/Minecart.cpp
@@ -413,8 +413,10 @@ void cMinecart::DoTakeDamage(TakeDamageInfo & TDI)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cEmptyMinecart:
-cEmptyMinecart::cEmptyMinecart(double a_X, double a_Y, double a_Z) :
- super(mpNone, a_X, a_Y, a_Z)
+cEmptyMinecart::cEmptyMinecart(double a_X, double a_Y, double a_Z, const cItem & a_Content, int a_Height) :
+ super(mpNone, a_X, a_Y, a_Z),
+ m_Content(a_Content),
+ m_Height(a_Height)
{
}
diff --git a/src/Entities/Minecart.h b/src/Entities/Minecart.h
index b1b48be4e..87d375c68 100644
--- a/src/Entities/Minecart.h
+++ b/src/Entities/Minecart.h
@@ -77,10 +77,16 @@ class cEmptyMinecart :
public:
CLASS_PROTODEF(cEmptyMinecart);
- cEmptyMinecart(double a_X, double a_Y, double a_Z);
+ cEmptyMinecart(double a_X, double a_Y, double a_Z, const cItem & a_Content, int a_Height);
+ cItem GetContent(void) const {return m_Content;}
+ int GetBlockHeight(void) const {return m_Height;}
// cEntity overrides:
virtual void OnRightClicked(cPlayer & a_Player) override;
+protected:
+
+ const cItem & m_Content;
+ int m_Height;
} ;