diff options
Diffstat (limited to 'src/Protocol/Protocol18x.cpp')
-rw-r--r-- | src/Protocol/Protocol18x.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/Protocol/Protocol18x.cpp b/src/Protocol/Protocol18x.cpp index 373269509..833746c00 100644 --- a/src/Protocol/Protocol18x.cpp +++ b/src/Protocol/Protocol18x.cpp @@ -3368,7 +3368,7 @@ void cProtocol180::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob) a_Pkt.WriteBEUInt8(0x56); // Int at index 22 a_Pkt.WriteBEInt32(Horse.GetHorseArmour()); a_Pkt.WriteBEUInt8(0x0c); - a_Pkt.WriteBEInt8(Horse.IsBaby() ? -1 : 0); + a_Pkt.WriteBEInt8(Horse.IsBaby() ? -1 : (Horse.IsInLoveCooldown() ? 1 : 0)); break; } // case mtHorse @@ -3384,15 +3384,31 @@ 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.IsBaby() ? -1 : 0); + a_Pkt.WriteBEInt8(Ocelot.IsBaby() ? -1 : (Ocelot.IsInLoveCooldown() ? 1 : 0)); break; } // case mtOcelot + case mtCow: + { + auto & Cow = reinterpret_cast<const cCow &>(a_Mob); + a_Pkt.WriteBEUInt8(0x0c); + a_Pkt.WriteBEInt8(Cow.IsBaby() ? -1 : (Cow.IsInLoveCooldown() ? 1 : 0)); + break; + } // case mtCow + + case mtChicken: + { + auto & Chicken = reinterpret_cast<const cChicken &>(a_Mob); + a_Pkt.WriteBEUInt8(0x0c); + a_Pkt.WriteBEInt8(Chicken.IsBaby() ? -1 : (Chicken.IsInLoveCooldown() ? 1 : 0)); + break; + } // case mtChicken + case mtPig: { auto & Pig = reinterpret_cast<const cPig &>(a_Mob); a_Pkt.WriteBEUInt8(0x0c); - a_Pkt.WriteBEInt8(Pig.IsBaby() ? -1 : 0); + a_Pkt.WriteBEInt8(Pig.IsBaby() ? -1 : (Pig.IsInLoveCooldown() ? 1 : 0)); a_Pkt.WriteBEUInt8(0x10); a_Pkt.WriteBEUInt8(Pig.IsSaddled() ? 1 : 0); break; @@ -3402,7 +3418,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.IsBaby() ? -1 : 0); + a_Pkt.WriteBEInt8(Sheep.IsBaby() ? -1 : (Sheep.IsInLoveCooldown() ? 1 : 0)); a_Pkt.WriteBEUInt8(0x10); Byte SheepMetadata = 0; @@ -3421,7 +3437,7 @@ void cProtocol180::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob) a_Pkt.WriteBEUInt8(0x12); a_Pkt.WriteBEUInt8(Rabbit.GetRabbitTypeAsNumber()); a_Pkt.WriteBEUInt8(0x0c); - a_Pkt.WriteBEInt8(Rabbit.IsBaby() ? -1 : 0); + a_Pkt.WriteBEInt8(Rabbit.IsBaby() ? -1 : (Rabbit.IsInLoveCooldown() ? 1 : 0)); break; } // case mtRabbit |