summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.cpp
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/Protocol/Protocol17x.cpp
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/Protocol/Protocol17x.cpp17
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);