Handle name item packet

This commit is contained in:
Persson-dev 2021-12-31 13:45:07 +01:00 committed by Alexander Harkness
parent 1806f3acef
commit ad216a00ab
2 changed files with 13 additions and 0 deletions

View File

@ -638,6 +638,7 @@ bool cProtocol_1_13::HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketTyp
case 0x19: HandlePacketEntityAction(a_ByteBuffer); return true;
case 0x1a: HandlePacketSteerVehicle(a_ByteBuffer); return true;
case 0x1b: HandlePacketCraftingBookData(a_ByteBuffer); return true;
case 0x1c: HandlePacketNameItem(a_ByteBuffer); return true;
case 0x1d: break; // Resource pack status - not yet implemented
case 0x1e: HandlePacketAdvancementTab(a_ByteBuffer); return true;
case 0x20: HandlePacketSetBeaconEffect(a_ByteBuffer); return true;
@ -657,6 +658,17 @@ bool cProtocol_1_13::HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketTyp
void cProtocol_1_13::HandlePacketNameItem(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarUTF8String, AString, NewItemName);
LOGD("New item name : %s", NewItemName);
}
void cProtocol_1_13::HandlePacketPluginMessage(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarUTF8String, AString, NamespacedChannel);

View File

@ -57,6 +57,7 @@ protected:
virtual Version GetProtocolVersion() const override;
virtual bool HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketType) override;
virtual void HandlePacketNameItem(cByteBuffer & a_ByteBuffer);
virtual void HandlePacketPluginMessage(cByteBuffer & a_ByteBuffer) override;
virtual void HandlePacketSetBeaconEffect(cByteBuffer & a_ByteBuffer);
virtual void HandleVanillaPluginMessage(cByteBuffer & a_ByteBuffer, std::string_view a_Channel) override;