diff options
Diffstat (limited to '')
-rw-r--r-- | src/Protocol/Protocol_1_11.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/Protocol/Protocol_1_11.cpp b/src/Protocol/Protocol_1_11.cpp index 8a846b540..7e46fa332 100644 --- a/src/Protocol/Protocol_1_11.cpp +++ b/src/Protocol/Protocol_1_11.cpp @@ -1182,15 +1182,6 @@ void cProtocol_1_11_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_ a_Pkt.WriteBEUInt8(ZOMBIE_IS_BABY); a_Pkt.WriteBEUInt8(METADATA_TYPE_BOOL); a_Pkt.WriteBool(Zombie.IsBaby()); - - // These don't exist - // a_Pkt.WriteBEUInt8(ZOMBIE_TYPE); - // a_Pkt.WriteBEUInt8(METADATA_TYPE_VARINT); - // a_Pkt.WriteVarInt32(Zombie.IsVillagerZombie() ? 1 : 0); - - // a_Pkt.WriteBEUInt8(ZOMBIE_CONVERTING); - // a_Pkt.WriteBEUInt8(METADATA_TYPE_BOOL); - // a_Pkt.WriteBool(Zombie.IsConverting()); break; } // case mtZombie @@ -1203,6 +1194,23 @@ void cProtocol_1_11_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_ break; } // case mtZombiePigman + case mtZombieVillager: + { + auto & ZombieVillager = reinterpret_cast<const cZombieVillager &>(a_Mob); + a_Pkt.WriteBEUInt8(ZOMBIE_IS_BABY); + a_Pkt.WriteBEUInt8(METADATA_TYPE_BOOL); + a_Pkt.WriteBool(ZombieVillager.IsBaby()); + + a_Pkt.WriteBEUInt8(ZOMBIE_VILLAGER_CONVERTING); + a_Pkt.WriteBEUInt8(METADATA_TYPE_VARINT); + a_Pkt.WriteVarInt32(static_cast<UInt32>(ZombieVillager.ConversionTime())); + + a_Pkt.WriteBEUInt8(ZOMBIE_VILLAGER_PROFESSION); + a_Pkt.WriteBEUInt8(METADATA_TYPE_VARINT); + a_Pkt.WriteVarInt32(static_cast<UInt32>(ZombieVillager.GetProfession())); + break; + } // case mtZombieVillager + default: break; } // switch (a_Mob.GetType()) } |