Skip to main content
Version: Next

Configuration

Clientbound (Client → Server)

This packet is used to request a cookie from the client. It is part of the client-server communication protocol in Minecraft, specifically for handling cookie-related operations.

FieldDisplay NameTypeNotes
keyResource Location KeyResourceLocationThis field represents the unique identifier for the cookie being requested. It is read from the buffer when the packet is constructed and written to the buffer when the packet is sent.

0x01 Custom Payload Packet

This packet is used to send custom payloads from the server to the client. It allows for the transmission of various types of data that are not covered by standard packets, enabling custom features and debugging information to be communicated.

FieldDisplay NameTypeNotes
payloadCustom PayloadCustomPacketPayloadThe main content of the packet, which can be any type of custom data defined by the server. This is the core of the packet, containing the specific information to be processed by the client.
MAX_PAYLOAD_SIZEMaximum Payload SizeintDefines the maximum size of the payload that can be sent in this packet. It is set to 1,048,576 bytes (1 MB) to prevent excessively large data from being transmitted, which could cause performance issues.
GAMEPLAY_STREAM_CODECGameplay Stream CodecStreamCodec<RegistryFriendlyByteBuf ClientboundCustomPayloadPacket>A codec used for encoding and decoding gameplay-related custom payloads. It supports a variety of payload types, each with its own codec, allowing for flexible data handling.
CONFIG_STREAM_CODECConfiguration Stream CodecStreamCodec<FriendlyByteBuf ClientboundCustomPayloadPacket>A codec specifically for encoding and decoding configuration-related custom payloads. It is more limited in scope compared to the gameplay stream codec, focusing on configuration data.

0x02 Client Disconnect Notification

This packet is sent from the server to the client to notify the client that it has been disconnected from the server. The reason for the disconnection is provided as a component.

FieldDisplay NameTypeNotes
reasonDisconnection ReasonComponentThis field contains the reason for the disconnection, formatted as a chat component. It is serialized and deserialized using the ComponentSerialization.TRUSTED_CONTEXT_FREE_STREAM_CODEC.

0x03 Clientbound Finish Configuration Packet

This packet is sent from the server to the client to indicate that the configuration process is complete. It is a signal for the client to finalize any setup or initialization tasks related to configuration.

FieldDisplay NameTypeNotes
INSTANCEInstanceClientboundFinishConfigurationPacketA singleton instance of the packet, used to avoid creating multiple instances.
STREAM_CODECStream CodecStreamCodec<ByteBuf ClientboundFinishConfigurationPacket>A codec for encoding and decoding the packet, using a unit codec for the singleton instance.

0x04 Keep Alive Packet

This packet is used to ensure that the connection between the client and server is still active. It is sent periodically to check if the client is still responsive.

FieldDisplay NameTypeNotes
idKeep Alive IDlongA unique identifier for the keep-alive packet. This ID is used to match the keep-alive request with the response.

0x05 Ping Packet from Server to Client

This packet is used to send a ping request from the server to the client. It is part of the network protocol to measure latency or ensure connectivity.

FieldDisplay NameTypeNotes
idPing IdentifierintThis is an integer value that uniquely identifies the ping request. It is used to match the ping response with the request.

0x06 Reset Chat Packet

This packet is used to reset the chat settings or state on the client side. It is sent from the server to the client to indicate that the chat should be reset to its default state.

FieldDisplay NameTypeNotes
INSTANCESingleton InstanceClientboundResetChatPacketThis is a singleton instance of the ClientboundResetChatPacket, ensuring that only one instance of this packet is used throughout the application.
STREAM_CODECStream CodecStreamCodec<ByteBuf ClientboundResetChatPacket>This field defines the codec used for encoding and decoding the packet. It uses a unit codec since the packet does not carry any additional data.

0x07 Clientbound Registry Data Packet

This packet is used to send registry data from the server to the client. It contains information about a specific registry and its entries, allowing the client to synchronize its registry data with the server.

FieldDisplay NameTypeNotes
registryRegistry KeyResourceKey<? extends Registry<?>>This field represents the key of the registry being synchronized. It is used to identify which registry the entries belong to.
entriesRegistry EntriesList<RegistrySynchronization.PackedRegistryEntry>This field contains a list of packed registry entries. These entries provide the data necessary for the client to update its local registry.

0x08 Resource Pack Pop Notification

This packet is sent from the server to the client to notify about a resource pack pop event, which may involve the removal or change of a resource pack.

FieldDisplay NameTypeNotes
idResource Pack IDOptional<UUID>This field contains the unique identifier for the resource pack. It is optional, meaning the packet may or may not include this ID.

0x09 Resource Pack Push Notification

This packet is sent from the server to the client to notify the client about a resource pack that is available for download. It includes details such as the resource pack's URL, a hash for verification, and whether the resource pack is required.

FieldDisplay NameTypeNotes
idResource Pack IdentifierUUIDA unique identifier for the resource pack, used to distinguish it from others.
urlResource Pack URLStringThe URL from which the client can download the resource pack.
hashResource Pack HashStringA hash of the resource pack file, used to verify its integrity. The hash must not exceed 40 characters.
requiredIs Resource Pack RequiredbooleanIndicates whether the resource pack is mandatory for the client to use.
promptResource Pack PromptOptional<Component>An optional message that can be displayed to the client, prompting them to download the resource pack.

This packet is used to store a cookie on the client side. It contains a key and a payload, which is a byte array, to be stored.

FieldDisplay NameTypeNotes
keyResource KeyResourceLocationThis field represents the unique identifier for the cookie being stored. It is read from the buffer using the readResourceLocation method and written using the writeResourceLocation method.
payloadPayload Databyte[]This field contains the data to be stored as a cookie. It is a byte array with a maximum size of 5120 bytes. The data is encoded and decoded using the PAYLOAD_STREAM_CODEC.

0x0b Clientbound Transfer Packet

This packet is used to transfer the client to a different server by specifying a new host and port.

FieldDisplay NameTypeNotes
hostHost AddressUtfThe host address to which the client should be transferred. It is read and written as a UTF-8 string.
portPort NumberVarIntThe port number of the new host server. It is read and written as a variable-length integer.

0x0c Update Enabled Features Packet

This packet is sent from the server to the client to update the list of enabled features. It informs the client about which features are currently active or available in the game.

FieldDisplay NameTypeNotes
featuresEnabled Features SetSet<ResourceLocation>A set of ResourceLocation objects representing the features that are enabled. This is read from or written to the buffer using a collection method.
STREAM_CODECStream CodecStreamCodec<FriendlyByteBuf ClientboundUpdateEnabledFeaturesPacket>A codec for encoding and decoding the packet data. It uses the write method for encoding and the constructor for decoding.

0x0d Update Tags Packet

This packet is used to update the client with the latest tag data from the server. Tags are used to group blocks, items, and other game elements for various purposes, such as crafting recipes or advancements.

FieldDisplay NameTypeNotes
tagsTags MapMap<ResourceKey<? extends Registry<?>> TagNetworkSerialization.NetworkPayload>A map containing the tags data, where each entry consists of a registry key and its corresponding network payload.
STREAM_CODECStream CodecStreamCodec<FriendlyByteBuf ClientboundUpdateTagsPacket>A codec for encoding and decoding the packet data.

0x0e Select Known Resource Packs

This packet is sent from the server to the client to inform the client about the list of known resource packs that are available for selection.

FieldDisplay NameTypeNotes
knownPacksList of Known PacksList<KnownPack>This field contains a list of KnownPack objects, representing the resource packs that the server recognizes and offers to the client.

0x0f Custom Report Details Packet

This packet is used to send custom report details from the server to the client. It contains a map of key-value pairs where each key and value are strings. This is typically used for sending detailed information about a specific report or event.

FieldDisplay NameTypeNotes
detailsDetails MapMap<String String>A map containing the report details. Each entry in the map consists of a key and a value, both of which are strings. The map is limited to a maximum of 32 entries, with each key having a maximum length of 128 characters and each value having a maximum length of 4096 characters.
MAX_DETAIL_KEY_LENGTHMaximum Detail Key LengthintThe maximum length allowed for each key in the details map. This is set to 128 characters.
MAX_DETAIL_VALUE_LENGTHMaximum Detail Value LengthintThe maximum length allowed for each value in the details map. This is set to 4096 characters.
MAX_DETAIL_COUNTMaximum Detail CountintThe maximum number of entries allowed in the details map. This is set to 32.
DETAILS_STREAM_CODECDetails Stream CodecStreamCodec<ByteBuf Map<String String>>A codec used for encoding and decoding the details map to and from a ByteBuf. It ensures that the map adheres to the specified constraints on key length, value length, and entry count.
STREAM_CODECPacket Stream CodecStreamCodec<ByteBuf ClientboundCustomReportDetailsPacket>A composite codec that uses the DETAILS_STREAM_CODEC to encode and decode the entire packet, including its details map.

This packet is used to send a list of untrusted server links from the server to the client. It allows the client to receive and process links that are not verified by the server.

FieldDisplay NameTypeNotes
linksUntrusted Server LinksList<ServerLinks.UntrustedEntry>This field contains a list of untrusted server links that are sent from the server to the client. Each entry in the list represents a link that the server has not verified.

Serverbound (Server → Client)

0x00 Client Information Packet

This packet is used to send client-specific information from the client to the server. It contains details about the client's settings and preferences.

FieldDisplay NameTypeNotes
informationClient InformationClientInformationThis field contains the client's settings and preferences, encapsulated in a ClientInformation object.
STREAM_CODECStream CodecStreamCodec<FriendlyByteBuf ServerboundClientInformationPacket>This codec is used to encode and decode the packet data to and from the byte buffer.
friendlybytebufFriendly Byte BufferFriendlyByteBufThis buffer is used to read and write the packet data.

This packet is used to send a response from the client to the server regarding a cookie operation. It includes a key identifying the cookie and an optional payload containing the cookie data.

FieldDisplay NameTypeNotes
keyCookie KeyResourceLocationThis field represents the unique identifier for the cookie. It is read from the buffer using the readResourceLocation method and written using the writeResourceLocation method.
payloadCookie Payloadbyte[]This is an optional field that contains the data associated with the cookie. It is read and written using the readNullable and writeNullable methods, respectively, with the ClientboundStoreCookiePacket.PAYLOAD_STREAM_CODEC as the codec.

0x02 Serverbound Custom Payload Packet

This packet is used to send custom payload data from the client to the server. It allows for the transmission of custom data types that are not part of the standard protocol.

FieldDisplay NameTypeNotes
payloadCustom PayloadCustomPacketPayloadThis field contains the custom data being sent. It is an instance of CustomPacketPayload, which can represent various types of custom data.
MAX_PAYLOAD_SIZEMaximum Payload SizeintThis constant defines the maximum size of the payload that can be sent, which is 32767 bytes.
STREAM_CODECStream CodecStreamCodec<FriendlyByteBuf ServerboundCustomPayloadPacket>This field defines the codec used to encode and decode the payload data. It uses a list of TypeAndCodec to handle different types of custom payloads.

0x03 Serverbound Finish Configuration Packet

This packet is sent from the client to the server to indicate that the client has finished its configuration process. It is a signal to the server that the client is ready to proceed with the next steps in the connection or gameplay process.

FieldDisplay NameTypeNotes
INSTANCEInstanceServerboundFinishConfigurationPacketA singleton instance of the packet, used to avoid creating multiple instances.
STREAM_CODECStream CodecStreamCodec<ByteBuf ServerboundFinishConfigurationPacket>A codec for encoding and decoding the packet, using a unit codec since the packet has no data.

0x04 Keep Alive Packet

This packet is used by the client to confirm its connection to the server is still active. It helps in maintaining the connection alive by sending periodic signals to the server.

FieldDisplay NameTypeNotes
idKeep Alive IDlongA unique identifier for the keep-alive packet. This ID is used by the server to verify the packet and ensure the connection is still active.

0x05 Pong Packet from Client to Server

This packet is sent from the client to the server as a response to a ping request, typically used to measure latency or ensure the connection is still active.

FieldDisplay NameTypeNotes
idPacket IdentifierintThis field holds the unique identifier for the pong packet, which corresponds to the ping request it is responding to.

0x06 Resource Pack Response Packet

This packet is used by the client to communicate the status of a resource pack download to the server. It informs the server about the client's action or result regarding the resource pack.

FieldDisplay NameTypeNotes
idResource Pack IDUUIDA unique identifier for the resource pack. This UUID is used to track the specific resource pack being referenced.
actionResource Pack ActionEnumRepresents the action or status of the resource pack download. Possible values include SUCCESSFULLY_LOADED, DECLINED, FAILED_DOWNLOAD, ACCEPTED, DOWNLOADED, INVALID_URL, FAILED_RELOAD, and DISCARDED.

0x07 Select Known Packs Packet

This packet is used by the client to inform the server about the resource packs it is aware of. It sends a list of known resource packs to the server, which can be used for configuration or validation purposes.

FieldDisplay NameTypeNotes
knownPacksList of Known PacksList<KnownPack>This field contains a list of KnownPack objects, representing the resource packs that the client is aware of. The list is encoded using a StreamCodec with a maximum size of 64.