mirror of
https://github.com/cuberite/cuberite.git
synced 2025-01-08 11:57:39 +08:00
Handle name item packet
This commit is contained in:
parent
1806f3acef
commit
ad216a00ab
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user