diff options
author | STRWarrior <niels.breuker@hotmail.nl> | 2014-01-12 18:04:41 +0100 |
---|---|---|
committer | STRWarrior <niels.breuker@hotmail.nl> | 2014-01-12 18:04:41 +0100 |
commit | f11427e8cd5506204958eec68a8ac2a9152df108 (patch) | |
tree | cce60b10962d911daf4b70e96c21701b975b1eb8 /src/Protocol/Protocol17x.cpp | |
parent | EmptyMinecarts should be able to get a block inside of them. (diff) | |
download | cuberite-f11427e8cd5506204958eec68a8ac2a9152df108.tar cuberite-f11427e8cd5506204958eec68a8ac2a9152df108.tar.gz cuberite-f11427e8cd5506204958eec68a8ac2a9152df108.tar.bz2 cuberite-f11427e8cd5506204958eec68a8ac2a9152df108.tar.lz cuberite-f11427e8cd5506204958eec68a8ac2a9152df108.tar.xz cuberite-f11427e8cd5506204958eec68a8ac2a9152df108.tar.zst cuberite-f11427e8cd5506204958eec68a8ac2a9152df108.zip |
Diffstat (limited to 'src/Protocol/Protocol17x.cpp')
-rw-r--r-- | src/Protocol/Protocol17x.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index 8e397358f..a107c4b1f 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -1784,20 +1784,20 @@ void cProtocol172::cPacketizer::WriteEntityMetadata(const cEntity & a_Entity) if (((cMinecart &)a_Entity).GetPayload() == cMinecart::mpNone) { - cEmptyMinecart EmptyMinecart = ((cEmptyMinecart &)a_Entity); - if (!EmptyMinecart.GetContent().IsEmpty()) + cRideableMinecart & RideableMinecart = ((cRideableMinecart &)a_Entity); + if (!RideableMinecart.GetContent().IsEmpty()) { WriteByte(0x54); - int Content = EmptyMinecart.GetContent().m_ItemType; - Content |= EmptyMinecart.GetContent().m_ItemDamage << 8; + int Content = RideableMinecart.GetContent().m_ItemType; + Content |= RideableMinecart.GetContent().m_ItemDamage << 8; WriteInt(Content); WriteByte(0x55); - WriteInt(EmptyMinecart.GetBlockHeight()); + WriteInt(RideableMinecart.GetBlockHeight()); WriteByte(0x56); WriteByte(1); } } - if (((cMinecart &)a_Entity).GetPayload() == cMinecart::mpFurnace) + else if (((cMinecart &)a_Entity).GetPayload() == cMinecart::mpFurnace) { WriteByte(0x10); WriteByte(((const cMinecartWithFurnace &)a_Entity).IsFueled() ? 1 : 0); |