From 6a21bf979c5ef4ad473971257f59fe9101397cd6 Mon Sep 17 00:00:00 2001 From: Mat Date: Wed, 8 Apr 2020 00:23:54 +0300 Subject: Initial resource pack support (#4622) --- src/Protocol/Protocol_1_10.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/Protocol/Protocol_1_10.cpp') diff --git a/src/Protocol/Protocol_1_10.cpp b/src/Protocol/Protocol_1_10.cpp index 47d27c461..8a23ec09d 100644 --- a/src/Protocol/Protocol_1_10.cpp +++ b/src/Protocol/Protocol_1_10.cpp @@ -45,6 +45,19 @@ Implements the 1.10 protocol classes: +#define HANDLE_READ(ByteBuf, Proc, Type, Var) \ + Type Var; \ + do { \ + if (!ByteBuf.Proc(Var))\ + {\ + return;\ + } \ + } while (false) + + + + + // The disabled error is intended, since the Metadata have overlapping indexes // based on the type of the Entity. // @@ -318,6 +331,15 @@ void cProtocol_1_10_0::SendSoundEffect(const AString & a_SoundName, double a_X, +void cProtocol_1_10_0::HandlePacketResourcePackStatus(cByteBuffer & a_ByteBuffer) +{ + HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, Status); +} + + + + + void cProtocol_1_10_0::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer) { cServer * Server = cRoot::Get()->GetServer(); -- cgit v1.2.3