Protocol 2168 changelog

For r/26_u4, Network Protocol Version 2168

New Packets

  • ClientboundUpdateSoundDataPacket: New server→client packet that updates an in-flight sound identified by ServerSoundHandle. Payload is a variant of Stop, SetVolume, SetPitch, Fade, SeekTo, Pause, and Resume params.

Packets Converted to Cereal

The following packets migrated to Cereal-only serialization. Each is an intentional wire-format change that is not backwards compatible with prior protocols.

  • AddActorPacket: Synched actor data entries are now emitted as tagged variant payloads (discriminator + value) rather than the legacy hand-rolled DataItem byte stream.
  • AddItemActorPacket: Reuses the value-typed SynchedActorData::CopyableDataList schema introduced for AddActorPacket.
  • AddPlayerPacket: Entity data inherits the tagged-variant encoding from AddActorPacket; abilities, property-sync, and link payloads use their cereal-bound schemas. The carried item is now captured via ItemStack::getStrippedNetworkItem() (item/count/aux/networkUserData/chargedItem); the item-stack net id variant is no longer included and network user data is stripped (the empty ench key is preserved so enchantment glint still renders).
  • ClientboundMapItemDataPacket: The legacy mType bitmask and its eight unconditional payload fields are replaced with brstd::optional<T> projections whose presence drives the matching Type bit.
  • CraftingDataPacket: Recipe data now serializes as separate vectors by recipe shape/type instead of the tagged CraftingDataEntry union. RecipeUnlockingRequirement is fully reflected: an Unlocking Context enum (None, AlwaysUnlocked, PlayerInWater, PlayerHasManyItems) followed by an optional Unlocking Ingredients list present only when the context is None.
  • CreativeContentPacket: Group and entry data serialize as reflected Groups and Entries vectors; entries still reference groups by index or CreativeItemRegistry::INVALID_INDEX for ungrouped items.
  • ItemStackRequestPacket: Reflected request fields serialize directly. CraftRecipeAuto no longer duplicates the craft count or ingredient-count byte; recipe ingredients and results use packet-local item descriptor variants; item-stack net id variants use a tagged cereal variant (replacing the legacy sign-bit-tagged signed-integer encoding). Deserialization now rejects malformed request/action payloads.
  • ItemStackResponsePacket: Responses serialize as a reflected Responses vector. Cross-field invariants are encoded in the binding: Containers is present iff Result == Success; a slot’s Item Stack Net Id is present iff Amount > 0; Durability Correction carries an int16_t range constraint.
  • LevelChunkPacket: The subchunk-count sentinel is replaced with a regular varint count plus an optional client request limit; mCacheMetadata is now always present as a length-prefixed vector (empty when caching is disabled).
  • MoveActorDeltaPacket: The 16-bit packed header is replaced with reflected bindings — the six payload-bearing fields (position xyz, rotation xy/head-y) are brstd::optional<T> whose presence drives the matching header flag; the remaining flag bits are standalone booleans.
  • MovePlayerPacket: Player runtime id, position, rotation, head rotation, position mode, on-ground state, riding runtime id, teleport data, and tick serialize as reflected fields. Teleport data is a brstd::optional<MovePlayerTeleportData> valid only with Teleport position mode; it now carries a 1-byte presence flag (+1 byte vs. the legacy format).
  • PlayerAuthInputPacket: The shared ItemStackNetIdVariant binding now projects to and from a single signed-VarInt encoding (non-negative = server net id, negative-odd = client request id, negative-even = legacy client request id) instead of cereal’s default tagged-variant encoding. The same correction applies to other packets embedding item-stack net ids (for example InventorySlotPacket, MobEquipmentPacket, AddItemActorPacket).
  • PlayerListPacket: Entries are now a tagged variant over AddEntry and RemoveEntry, dispatched per-entry instead of a single top-level Action byte.
  • PlayerLocationPacket: The payload is a tagged variant over CoordinatesLocation (carries a Vec3) and HiddenLocation (no payload), replacing the legacy (Type, optional<Vec3>) pair.
  • PlayerSkinPacket: The trusted-skin flag is now serialized inside the shared SerializedSkinRef binding instead of as a standalone trailing boolean.
  • PlayerUpdateEntityOverridesPacket: The payload is a tagged variant over ClearOverrides, RemoveOverride, SetIntOverride, and SetFloatOverride, so each variant’s Value is part of the alternative’s schema.
  • ResourcePackClientResponsePacket: The Downloading Packs set is now bound as an optional field emitted only when Response == Downloading.
  • ResourcePacksInfoPacket: The reflected payload carries the pack requirement flags, world template identity/version, and resource-pack entries directly.
  • SetActorDataPacket: Uses SynchedActorData::CopyableDataList from AddActorPacket’s conversion; each Actor Data entry serializes as { ID, Payload } where Payload is a tagged variant (Type enum + typed Value).
  • SetScorePacket: Converted to Cereal-only serialization.
  • SetScoreboardIdentityPacket: The packet-level mType (Update/Remove) is still serialized; mPlayerId is now gated per-entry by an optional<int64_t> presence byte instead of the legacy conditional keyed on the packet type.
  • StartGamePacket: Converted to Cereal-only serialization.
  • StructureBlockUpdatePacket: The payload and its nested StructureEditorData use declarative cereal bindings; the structure name is emitted as a nested redactable string (Unredacted/Redacted) instead of the legacy flat unredacted/filtered string pair.
  • SubChunkPacket: Conditional fields driven by mResult and mCacheEnabled are now brstd::optional<T>, each preceded by a presence byte. SubChunkRequestPacket’s SubChunkPosOffset is also reflected through Cereal as part of the same migration.

Modified Packets

  • AnvilDamagePacket: Removed Damage Amount; damage is now calculated by the server.
  • DimensionDataPacket: Added mPackId field to DimensionDefinitionGroup::DimensionDefinition.
  • PhotoTransferPacket: Restricted the photo name to [uuid].jpeg, and restricted photo data to a maximum size of 20 MiB.
  • PrimitiveShapesPacket: Added mLineHeightOverride field to the TextDataPayload for the mExtraDataPayload.
  • RequestAbilityPacket: Added field constraints.
  • ServerBoundDiagnosticsPacket: Now sends Entity System category-to-index mappings for use in visual categorization within the Minecraft Debugger.
  • ServerToClientHandshakePacket: Added a size constraint on the serialized token (16 KiB) and validation that it is a well-formed JWT.
  • TransferPacket: Added optional mGatheringsConfiguration field to allow transferring players with gatherings context.

Types

  • ConnectionRequest: Added ProfileHash JSON key mirroring SerializedSkin::mProfileHash for the initial join handshake.
  • GatheringsConfigurationJoinInfo: The worldId, worldName, targetId, scenarioId, and serverId fields are now optional.
  • PresenceConfiguration: Increased the maximum length of string fields (mExperienceName, mWorldName, mRichPresenceId) from 40 to 50 characters, then removed the unused mExperienceName and mWorldName fields. Only mRichPresenceId remains, and it changed from std::string to brstd::optional<std::string> (empty values are rejected via rejectEmpty()). Affects ServerPresenceInfoPacket and ServerConfigurationJoinInfo.
  • SerializedSkin: Added mProfileHash field carrying the server-computed appearance hash used as the authoritative cache key for remote profile-image (LoD) fetches.

Modified Enums

  • ActorFlags: Added NOT_PICKABLE_FROM_INSIDE.
  • ActorType: Added Cushion; modified SulfurCube.
  • LevelSoundEvent: Added Mount, Dismount, and StrawBedBreakLeave.
  • ParticleType: Added OrangePoplarLeaves, RedPoplarLeaves, and YellowPoplarLeaves.

Memory Categories

  • Added OreUI_Client memory category to the tracked memory.

General

  • LAN secret is now required for self-signed auth on client-hosted games.