From 1edc6c8601f9d00751bf7c9f7fcc69d1e18bb46a Mon Sep 17 00:00:00 2001 From: Persson-dev <66266021+Persson-dev@users.noreply.github.com> Date: Wed, 29 Dec 2021 20:30:09 +0100 Subject: Add skeleton bow pulling animation (#5355) * Added basic skeleton bow animation * Fixing style --- src/Protocol/Protocol_1_9.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/Protocol/Protocol_1_9.cpp') diff --git a/src/Protocol/Protocol_1_9.cpp b/src/Protocol/Protocol_1_9.cpp index 2cc087682..a36e3f53d 100644 --- a/src/Protocol/Protocol_1_9.cpp +++ b/src/Protocol/Protocol_1_9.cpp @@ -2110,9 +2110,20 @@ void cProtocol_1_9_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_M case mtSkeleton: { + auto & Skeleton = static_cast(a_Mob); a_Pkt.WriteBEUInt8(11); a_Pkt.WriteBEUInt8(METADATA_TYPE_VARINT); a_Pkt.WriteVarInt32(0); + + // Index 5 and 12 used for charging bow client animation. + a_Pkt.WriteBEUInt8(5); + a_Pkt.WriteBEUInt8(METADATA_TYPE_BYTE); + a_Pkt.WriteBEInt8(0x02 | (Skeleton.IsChargingBow() ? 0x01 : 0x00)); + + a_Pkt.WriteBEUInt8(12); + a_Pkt.WriteBEUInt8(METADATA_TYPE_BYTE); + a_Pkt.WriteBool(Skeleton.IsChargingBow()); + break; } case mtSlime: -- cgit v1.2.3