From 071b7be3d4d08c337c01de7abca034e6c3746194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Imrich?= Date: Sat, 3 Apr 2021 19:45:20 +0200 Subject: Basic elytra flight (#5124) * Basic elytra flight Co-authored-by: 12xx12 <44411062+12xx12@users.noreply.github.com> Co-authored-by: Tiger Wang --- src/Protocol/Protocol_1_12.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Protocol/Protocol_1_12.cpp') diff --git a/src/Protocol/Protocol_1_12.cpp b/src/Protocol/Protocol_1_12.cpp index 81f81dc1c..06238e408 100644 --- a/src/Protocol/Protocol_1_12.cpp +++ b/src/Protocol/Protocol_1_12.cpp @@ -349,6 +349,10 @@ void cProtocol_1_12::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_ { Flags |= 0x20; } + if (a_Entity.IsElytraFlying()) + { + Flags |= 0x80; + } a_Pkt.WriteBEUInt8(ENTITY_FLAGS); // Index a_Pkt.WriteBEUInt8(METADATA_TYPE_BYTE); // Type a_Pkt.WriteBEInt8(Flags); -- cgit v1.2.3