summaryrefslogtreecommitdiffstats
path: root/src/Protocol
diff options
context:
space:
mode:
authorGargaj <gargaj@conspiracy.hu>2015-11-29 19:13:31 +0100
committerGargaj <gargaj@conspiracy.hu>2015-11-29 20:14:28 +0100
commit4ae3b64b077b444c8217f8da265cb5eedeaf699a (patch)
tree0da79374832cae75ae5d9e6822712b3b62cbdbe8 /src/Protocol
parentUpdated DumpInfo plugin (diff)
downloadcuberite-4ae3b64b077b444c8217f8da265cb5eedeaf699a.tar
cuberite-4ae3b64b077b444c8217f8da265cb5eedeaf699a.tar.gz
cuberite-4ae3b64b077b444c8217f8da265cb5eedeaf699a.tar.bz2
cuberite-4ae3b64b077b444c8217f8da265cb5eedeaf699a.tar.lz
cuberite-4ae3b64b077b444c8217f8da265cb5eedeaf699a.tar.xz
cuberite-4ae3b64b077b444c8217f8da265cb5eedeaf699a.tar.zst
cuberite-4ae3b64b077b444c8217f8da265cb5eedeaf699a.zip
Diffstat (limited to 'src/Protocol')
-rw-r--r--src/Protocol/Protocol18x.cpp26
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