diff options
author | Bond-009 <bond.009@outlook.com> | 2018-02-03 12:24:19 +0100 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2020-04-10 01:50:45 +0200 |
commit | 8438def87e40e43fd66d38dbf8cc287cea7de29b (patch) | |
tree | 647b7674cca3df58507e5311e5578d14084bc691 /src/Protocol/Protocol_1_12.cpp | |
parent | Re-enable darwin download from easyinstall.sh script (diff) | |
download | cuberite-8438def87e40e43fd66d38dbf8cc287cea7de29b.tar cuberite-8438def87e40e43fd66d38dbf8cc287cea7de29b.tar.gz cuberite-8438def87e40e43fd66d38dbf8cc287cea7de29b.tar.bz2 cuberite-8438def87e40e43fd66d38dbf8cc287cea7de29b.tar.lz cuberite-8438def87e40e43fd66d38dbf8cc287cea7de29b.tar.xz cuberite-8438def87e40e43fd66d38dbf8cc287cea7de29b.tar.zst cuberite-8438def87e40e43fd66d38dbf8cc287cea7de29b.zip |
Diffstat (limited to 'src/Protocol/Protocol_1_12.cpp')
-rw-r--r-- | src/Protocol/Protocol_1_12.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/Protocol/Protocol_1_12.cpp b/src/Protocol/Protocol_1_12.cpp index 01bbf8104..8cf8df6ca 100644 --- a/src/Protocol/Protocol_1_12.cpp +++ b/src/Protocol/Protocol_1_12.cpp @@ -908,9 +908,6 @@ void cProtocol_1_12::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mo // 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 @@ -923,6 +920,23 @@ void cProtocol_1_12::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mo 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 + case mtBlaze: case mtEnderDragon: case mtGuardian: |