summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_9.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol_1_9.cpp69
1 files changed, 36 insertions, 33 deletions
diff --git a/src/Protocol/Protocol_1_9.cpp b/src/Protocol/Protocol_1_9.cpp
index 90eedf91e..fcfc6674a 100644
--- a/src/Protocol/Protocol_1_9.cpp
+++ b/src/Protocol/Protocol_1_9.cpp
@@ -3434,6 +3434,7 @@ void cProtocol_1_9_0::WriteItem(cPacketizer & a_Pkt, const cItem & a_Item)
case cEntityEffect::effInstantDamage: PotionID = "harming"; break;
case cEntityEffect::effWaterBreathing: PotionID = "water_breathing"; break;
case cEntityEffect::effInvisibility: PotionID = "invisibility"; break;
+ default: ASSERT(!"Unknown potion effect"); break;
}
if (cEntityEffect::GetPotionEffectIntensity(a_Item.m_ItemDamage) == 1)
{
@@ -3835,6 +3836,26 @@ void cProtocol_1_9_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_M
break;
} // case mtBat
+ case mtChicken:
+ {
+ auto & Chicken = reinterpret_cast<const cChicken &>(a_Mob);
+
+ a_Pkt.WriteBEUInt8(11); // Index 11: Is baby
+ a_Pkt.WriteBEUInt8(METADATA_TYPE_BOOL);
+ a_Pkt.WriteBool(Chicken.IsBaby());
+ break;
+ } // case mtChicken
+
+ case mtCow:
+ {
+ auto & Cow = reinterpret_cast<const cCow &>(a_Mob);
+
+ a_Pkt.WriteBEUInt8(11); // Index 11: Is baby
+ a_Pkt.WriteBEUInt8(METADATA_TYPE_BOOL);
+ a_Pkt.WriteBool(Cow.IsBaby());
+ break;
+ } // case mtCow
+
case mtCreeper:
{
auto & Creeper = reinterpret_cast<const cCreeper &>(a_Mob);
@@ -3949,26 +3970,6 @@ void cProtocol_1_9_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_M
break;
} // case mtOcelot
- case mtCow:
- {
- auto & Cow = reinterpret_cast<const cCow &>(a_Mob);
-
- a_Pkt.WriteBEUInt8(11); // Index 11: Is baby
- a_Pkt.WriteBEUInt8(METADATA_TYPE_BOOL);
- a_Pkt.WriteBool(Cow.IsBaby());
- break;
- } // case mtCow
-
- case mtChicken:
- {
- auto & Chicken = reinterpret_cast<const cChicken &>(a_Mob);
-
- a_Pkt.WriteBEUInt8(11); // Index 11: Is baby
- a_Pkt.WriteBEUInt8(METADATA_TYPE_BOOL);
- a_Pkt.WriteBool(Chicken.IsBaby());
- break;
- } // case mtChicken
-
case mtPig:
{
auto & Pig = reinterpret_cast<const cPig &>(a_Mob);
@@ -3984,6 +3985,19 @@ void cProtocol_1_9_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_M
break;
} // case mtPig
+ case mtRabbit:
+ {
+ auto & Rabbit = reinterpret_cast<const cRabbit &>(a_Mob);
+ a_Pkt.WriteBEUInt8(11); // Index 11: Is baby
+ a_Pkt.WriteBEUInt8(METADATA_TYPE_BOOL);
+ a_Pkt.WriteBool(Rabbit.IsBaby());
+
+ a_Pkt.WriteBEUInt8(12); // Index 12: Type
+ a_Pkt.WriteBEUInt8(METADATA_TYPE_VARINT);
+ a_Pkt.WriteVarInt32(static_cast<UInt32>(Rabbit.GetRabbitType()));
+ break;
+ } // case mtRabbit
+
case mtSheep:
{
auto & Sheep = reinterpret_cast<const cSheep &>(a_Mob);
@@ -4004,19 +4018,6 @@ void cProtocol_1_9_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_M
break;
} // case mtSheep
- case mtRabbit:
- {
- auto & Rabbit = reinterpret_cast<const cRabbit &>(a_Mob);
- a_Pkt.WriteBEUInt8(11); // Index 11: Is baby
- a_Pkt.WriteBEUInt8(METADATA_TYPE_BOOL);
- a_Pkt.WriteBool(Rabbit.IsBaby());
-
- a_Pkt.WriteBEUInt8(12); // Index 12: Type
- a_Pkt.WriteBEUInt8(METADATA_TYPE_VARINT);
- a_Pkt.WriteVarInt32(static_cast<UInt32>(Rabbit.GetRabbitType()));
- break;
- } // case mtRabbit
-
case mtSkeleton:
{
auto & Skeleton = reinterpret_cast<const cSkeleton &>(a_Mob);
@@ -4131,6 +4132,8 @@ void cProtocol_1_9_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_M
a_Pkt.WriteBool(ZombiePigman.IsBaby());
break;
} // case mtZombiePigman
+
+ default: break;
} // switch (a_Mob.GetType())
}