From 8438def87e40e43fd66d38dbf8cc287cea7de29b Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Sat, 3 Feb 2018 12:24:19 +0100 Subject: Add Zombie Villagers --- src/Protocol/Protocol_1_8.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/Protocol/Protocol_1_8.cpp') diff --git a/src/Protocol/Protocol_1_8.cpp b/src/Protocol/Protocol_1_8.cpp index 1b3c261f5..a516ec891 100644 --- a/src/Protocol/Protocol_1_8.cpp +++ b/src/Protocol/Protocol_1_8.cpp @@ -3825,9 +3825,9 @@ void cProtocol_1_8_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_M a_Pkt.WriteBEUInt8(0x0c); a_Pkt.WriteBEInt8(Zombie.IsBaby() ? 1 : -1); a_Pkt.WriteBEUInt8(0x0d); - a_Pkt.WriteBEUInt8(Zombie.IsVillagerZombie() ? 1 : 0); + a_Pkt.WriteBEUInt8(0); a_Pkt.WriteBEUInt8(0x0e); - a_Pkt.WriteBEUInt8(Zombie.IsConverting() ? 1 : 0); + a_Pkt.WriteBEUInt8(0); break; } // case mtZombie @@ -3839,6 +3839,18 @@ void cProtocol_1_8_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_M break; } // case mtZombiePigman + case mtZombieVillager: + { + auto & ZombieVillager = reinterpret_cast(a_Mob); + a_Pkt.WriteBEUInt8(0x0c); + a_Pkt.WriteBEInt8(ZombieVillager.IsBaby() ? 1 : -1); + a_Pkt.WriteBEUInt8(0x0d); + a_Pkt.WriteBEUInt8(1); + a_Pkt.WriteBEUInt8(0x0e); + a_Pkt.WriteBEUInt8((ZombieVillager.ConversionTime() == -1) ? 0 : 1); + break; + } // case mtZombieVillager + default: break; } // switch (a_Mob.GetType()) } -- cgit v1.2.3