summaryrefslogtreecommitdiffstats
path: root/src/Protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/Protocol')
-rw-r--r--src/Protocol/Protocol18x.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/Protocol/Protocol18x.cpp b/src/Protocol/Protocol18x.cpp
index 428e24f7c..15dd085be 100644
--- a/src/Protocol/Protocol18x.cpp
+++ b/src/Protocol/Protocol18x.cpp
@@ -3361,9 +3361,8 @@ void cProtocol180::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob)
a_Pkt.WriteBEInt32(Appearance);
a_Pkt.WriteBEUInt8(0x56); // Int at index 22
a_Pkt.WriteBEInt32(Horse.GetHorseArmour());
-
a_Pkt.WriteBEUInt8(0x0c);
- a_Pkt.WriteBEInt8(Horse.GetAge());
+ a_Pkt.WriteBEInt8(Horse.IsBaby() ? -1 : 0);
break;
} // case mtHorse
@@ -3379,7 +3378,7 @@ void cProtocol180::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob)
{
auto & Ocelot = reinterpret_cast<const cOcelot &>(a_Mob);
a_Pkt.WriteBEUInt8(0x0c);
- a_Pkt.WriteBEInt8(Ocelot.GetAge());
+ a_Pkt.WriteBEInt8(Ocelot.IsBaby() ? -1 : 0);
break;
} // case mtOcelot
@@ -3387,7 +3386,7 @@ void cProtocol180::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob)
{
auto & Pig = reinterpret_cast<const cPig &>(a_Mob);
a_Pkt.WriteBEUInt8(0x0c);
- a_Pkt.WriteBEInt8(Pig.GetAge());
+ a_Pkt.WriteBEInt8(Pig.IsBaby() ? -1 : 0);
a_Pkt.WriteBEUInt8(0x10);
a_Pkt.WriteBEUInt8(Pig.IsSaddled() ? 1 : 0);
break;
@@ -3397,7 +3396,7 @@ void cProtocol180::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob)
{
auto & Sheep = reinterpret_cast<const cSheep &>(a_Mob);
a_Pkt.WriteBEUInt8(0x0c);
- a_Pkt.WriteBEInt8(Sheep.GetAge());
+ a_Pkt.WriteBEInt8(Sheep.IsBaby() ? -1 : 0);
a_Pkt.WriteBEUInt8(0x10);
Byte SheepMetadata = 0;
@@ -3415,9 +3414,8 @@ void cProtocol180::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob)
auto & Rabbit = reinterpret_cast<const cRabbit &>(a_Mob);
a_Pkt.WriteBEUInt8(0x12);
a_Pkt.WriteBEUInt8(Rabbit.GetRabbitTypeAsNumber());
-
a_Pkt.WriteBEUInt8(0x0c);
- a_Pkt.WriteBEInt8(Rabbit.GetAge());
+ a_Pkt.WriteBEInt8(Rabbit.IsBaby() ? -1 : 0);
break;
} // case mtRabbit
@@ -3443,7 +3441,7 @@ void cProtocol180::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob)
a_Pkt.WriteBEUInt8(0x50);
a_Pkt.WriteBEInt32(Villager.GetVilType());
a_Pkt.WriteBEUInt8(0x0c);
- a_Pkt.WriteBEInt8(Villager.GetAge());
+ a_Pkt.WriteBEInt8(Villager.IsBaby() ? -1 : 0);
break;
} // case mtVillager
@@ -3490,9 +3488,8 @@ void cProtocol180::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob)
a_Pkt.WriteBEUInt8(Wolf.IsBegging() ? 1 : 0);
a_Pkt.WriteBEUInt8(0x14);
a_Pkt.WriteBEUInt8(static_cast<UInt8>(Wolf.GetCollarColor()));
-
a_Pkt.WriteBEUInt8(0x0c);
- a_Pkt.WriteBEInt8(Wolf.GetAge());
+ a_Pkt.WriteBEInt8(Wolf.IsBaby() ? -1 : 0);
break;
} // case mtWolf