Configuration
Clientbound (Client → Server)
0x00 Clientbound Cookie Request Packet
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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| key | Resource Location Key | ResourceLocation | This 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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| payload | Custom Payload | CustomPacketPayload | The 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_SIZE | Maximum Payload Size | int | Defines 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_CODEC | Gameplay Stream Codec | StreamCodec<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_CODEC | Configuration Stream Codec | StreamCodec<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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| reason | Disconnection Reason | Component | This 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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| INSTANCE | Instance | ClientboundFinishConfigurationPacket | A singleton instance of the packet, used to avoid creating multiple instances. |
| STREAM_CODEC | Stream Codec | StreamCodec<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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| id | Keep Alive ID | long | A 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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| id | Ping Identifier | int | This 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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| INSTANCE | Singleton Instance | ClientboundResetChatPacket | This is a singleton instance of the ClientboundResetChatPacket, ensuring that only one instance of this packet is used throughout the application. |
| STREAM_CODEC | Stream Codec | StreamCodec<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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| registry | Registry Key | ResourceKey<? extends Registry<?>> | This field represents the key of the registry being synchronized. It is used to identify which registry the entries belong to. |
| entries | Registry Entries | List<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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| id | Resource Pack ID | Optional<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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| id | Resource Pack Identifier | UUID | A unique identifier for the resource pack, used to distinguish it from others. |
| url | Resource Pack URL | String | The URL from which the client can download the resource pack. |
| hash | Resource Pack Hash | String | A hash of the resource pack file, used to verify its integrity. The hash must not exceed 40 characters. |
| required | Is Resource Pack Required | boolean | Indicates whether the resource pack is mandatory for the client to use. |
| prompt | Resource Pack Prompt | Optional<Component> | An optional message that can be displayed to the client, prompting them to download the resource pack. |
0x0a Store Cookie Packet
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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| key | Resource Key | ResourceLocation | This 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. |
| payload | Payload Data | byte[] | 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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| host | Host Address | Utf | The host address to which the client should be transferred. It is read and written as a UTF-8 string. |
| port | Port Number | VarInt | The 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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| features | Enabled Features Set | Set<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_CODEC | Stream Codec | StreamCodec<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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| tags | Tags Map | Map<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_CODEC | Stream Codec | StreamCodec<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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| knownPacks | List of Known Packs | List<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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| details | Details Map | Map<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_LENGTH | Maximum Detail Key Length | int | The maximum length allowed for each key in the details map. This is set to 128 characters. |
| MAX_DETAIL_VALUE_LENGTH | Maximum Detail Value Length | int | The maximum length allowed for each value in the details map. This is set to 4096 characters. |
| MAX_DETAIL_COUNT | Maximum Detail Count | int | The maximum number of entries allowed in the details map. This is set to 32. |
| DETAILS_STREAM_CODEC | Details Stream Codec | StreamCodec<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_CODEC | Packet Stream Codec | StreamCodec<ByteBuf ClientboundCustomReportDetailsPacket> | A composite codec that uses the DETAILS_STREAM_CODEC to encode and decode the entire packet, including its details map. |
0x10 Server Links Packet
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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| links | Untrusted Server Links | List<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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| information | Client Information | ClientInformation | This field contains the client's settings and preferences, encapsulated in a ClientInformation object. |
| STREAM_CODEC | Stream Codec | StreamCodec<FriendlyByteBuf ServerboundClientInformationPacket> | This codec is used to encode and decode the packet data to and from the byte buffer. |
| friendlybytebuf | Friendly Byte Buffer | FriendlyByteBuf | This buffer is used to read and write the packet data. |
0x01 Serverbound Cookie Response Packet
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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| key | Cookie Key | ResourceLocation | This field represents the unique identifier for the cookie. It is read from the buffer using the readResourceLocation method and written using the writeResourceLocation method. |
| payload | Cookie Payload | byte[] | 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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| payload | Custom Payload | CustomPacketPayload | This field contains the custom data being sent. It is an instance of CustomPacketPayload, which can represent various types of custom data. |
| MAX_PAYLOAD_SIZE | Maximum Payload Size | int | This constant defines the maximum size of the payload that can be sent, which is 32767 bytes. |
| STREAM_CODEC | Stream Codec | StreamCodec<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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| INSTANCE | Instance | ServerboundFinishConfigurationPacket | A singleton instance of the packet, used to avoid creating multiple instances. |
| STREAM_CODEC | Stream Codec | StreamCodec<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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| id | Keep Alive ID | long | A 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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| id | Packet Identifier | int | This 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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| id | Resource Pack ID | UUID | A unique identifier for the resource pack. This UUID is used to track the specific resource pack being referenced. |
| action | Resource Pack Action | Enum | Represents 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.
| Field | Display Name | Type | Notes |
|---|---|---|---|
| knownPacks | List of Known Packs | List<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. |