From 21bcb2a7578e6b25faadda89345684871c7144aa Mon Sep 17 00:00:00 2001 From: Simon Pribylski <66266021+Persson-dev@users.noreply.github.com> Date: Wed, 20 Apr 2022 12:21:30 +0200 Subject: Improving 1.14 support (#5388) * Fixing login * Add basic 1.14 support * Adding pktHorseWindowOpen to PacketTypeToStr * Fixing build with clang * Fixing inventories * Add entities metadata * Add particles * Fixing style * Fixing build with clang-tidy * fixing build --- src/Protocol/Protocol_1_8.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/Protocol/Protocol_1_8.h') diff --git a/src/Protocol/Protocol_1_8.h b/src/Protocol/Protocol_1_8.h index f32754d87..59dacbca0 100644 --- a/src/Protocol/Protocol_1_8.h +++ b/src/Protocol/Protocol_1_8.h @@ -156,9 +156,16 @@ protected: Returns -1 if the protocol version doesn't support this animation. */ virtual signed char GetProtocolEntityStatus(EntityAnimation a_Animation) const; + /** Converts an entity to a protocol-specific entity type. + Only entities that the Send Spawn Entity packet supports are valid inputs to this method */ + virtual UInt8 GetProtocolEntityType(const cEntity & a_Entity) const; + /** Converts eMonsterType to protocol-specific mob types */ virtual UInt32 GetProtocolMobType(eMonsterType a_MobType) const; + /** The 1.8 protocol use a particle id instead of a string. This function converts the name to the id. If the name is incorrect, it returns 0. */ + virtual int GetProtocolParticleID(const AString & a_ParticleName) const; + /** Returns the protocol version. */ virtual Version GetProtocolVersion() const override; @@ -254,13 +261,6 @@ private: /** Adds the received (unencrypted) data to m_ReceivedData, parses complete packets */ void AddReceivedData(cByteBuffer & a_Buffer, ContiguousByteBufferView a_Data); - /** Converts an entity to a protocol-specific entity type. - Only entities that the Send Spawn Entity packet supports are valid inputs to this method */ - static UInt8 GetProtocolEntityType(const cEntity & a_Entity); - - /** The 1.8 protocol use a particle id instead of a string. This function converts the name to the id. If the name is incorrect, it returns 0. */ - static int GetProtocolParticleID(const AString & a_ParticleName); - /** Converts a statistic to a protocol-specific string. Protocols <= 1.12 use strings, hence this is a static as the string-mapping was append-only for the versions that used it. Returns an empty string, handled correctly by the client, for newer, unsupported statistics. */ -- cgit v1.2.3