diff options
author | STRWarrior <niels.breuker@hotmail.nl> | 2014-01-12 15:27:50 +0100 |
---|---|---|
committer | STRWarrior <niels.breuker@hotmail.nl> | 2014-01-12 15:27:50 +0100 |
commit | c5603ce064d7e4e897aa92d6f43d407802ae3687 (patch) | |
tree | 8a50533bd8e07807587100e3a1016d07f3335406 /src/Protocol/Protocol17x.cpp | |
parent | Added cWorld::SpawnMinecart. (diff) | |
download | cuberite-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/Protocol/Protocol17x.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index 9c46c6843..8e397358f 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -1781,7 +1781,22 @@ void cProtocol172::cPacketizer::WriteEntityMetadata(const cEntity & a_Entity) WriteInt(1); // Shaking direction, doesn't seem to affect anything WriteByte(0x73); WriteFloat((float)(((const cMinecart &)a_Entity).LastDamage() + 10)); // Damage taken / shake effect multiplyer - + + if (((cMinecart &)a_Entity).GetPayload() == cMinecart::mpNone) + { + cEmptyMinecart EmptyMinecart = ((cEmptyMinecart &)a_Entity); + if (!EmptyMinecart.GetContent().IsEmpty()) + { + WriteByte(0x54); + int Content = EmptyMinecart.GetContent().m_ItemType; + Content |= EmptyMinecart.GetContent().m_ItemDamage << 8; + WriteInt(Content); + WriteByte(0x55); + WriteInt(EmptyMinecart.GetBlockHeight()); + WriteByte(0x56); + WriteByte(1); + } + } if (((cMinecart &)a_Entity).GetPayload() == cMinecart::mpFurnace) { WriteByte(0x10); |