Skip to content

minecraft/protocol: Fix four 1.26.60 packet layouts - #545

Merged
TwistedAsylumMC merged 2 commits into
Sandertv:masterfrom
HashimTheArab:upstream/1.26.60-packet-shapes
Oct 29, 2026
Merged

TwistedAsylumMC merged 2 commits into
Sandertv:masterfrom
HashimTheArab:upstream/1.26.60-packet-shapes

Conversation

@HashimTheArab

@HashimTheArab HashimTheArab commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes four packet layouts that are wrong for 1.26.60. All four packets are serialized only from their reflected schemas in this version, so the wire follows the payload member types.

Packet Was Now
StructureBlockUpdate filtered structure name is a plain string optional string (FilteredStructureName protocol.Optional[string])
PlayerVideoCapture uint8 action, stop = 0 varuint32 variant index, start = 0 (Action uint32)
CameraInstruction spline type, identifier and load-from-JSON flag are optionals always written (uint8, string, bool)
CameraSpline definition spline type is optional; key frame easing is a plain string spline type always written; key frame easing is optional

The CameraSpline definition key frames get their own types, CameraSplineProgressKeyFrame and CameraSplineRotationKeyFrame. The instruction's key frames keep a required easing, so they still use CameraProgressOption and CameraRotationOption.

Sources

Mojang's docs and Endstone's dumps are for 1.26.60 (protocol 2225). LeviLamina only has 26.51 headers, so they back up member types that the 1.26.60 sources show unchanged.

Packet Mojang docs 1.26.60 Endstone 1.26.60 LeviLamina 26.51.9
StructureBlockUpdate Bedrock__Safety__RedactableString: Unredacted required, Redacted not Bedrock__Safety__RedactableString: Redacted optional RedactableString: std::string, std::optional<std::string>
PlayerVideoCapture PlayerVideoCapturePacketPayload: one of start, stop PlayerVideoCapturePacket: uvarint32 switch, start then stop PlayerVideoCapturePacketPayload: std::variant<StartVideoCapture, StopVideoCapture>
CameraInstruction spline CameraInstruction__SplineInstruction: type required; identifier and flag have defaults CameraInstructionOptions__SplineInstruction: all plain SplineInstruction: std::string, SplineType, bool
CameraSpline definition CameraSplineDefinition: spline_type has a default; key frame easing not required CameraSplineDefinition: spline_type plain; key frame easing optional CameraSplineDefinition: mSplineType is std::string; key frame easing is std::optional<EasingType>

The variant index is positional, as for PlayerList's std::variant<RemoveEntry, AddEntry>. Unlike PlayerList, PlayerVideoCapture's payloads carry no separate action enum, so the start-first order is the only numbering. A Mojang default (identifier, flag, spline type) means the field is always written; a field that is neither required nor defaulted (key frame easing) is optional. Endstone types the camera easing as its name, a string, and the attribute transition easing as a uvarint32, so the string form is specific to these fields.

CloudburstMC Protocol's v2225 codec matches the CameraInstruction spline only. It still uses the older layouts for the other three.

Checks

  • go vet ./..., go test ./... and golangci-lint run ./... pass.
  • No 1.26.60 capture of these packets yet. They are rare: structure blocks, video capture on development builds, and scripted camera splines.

Breaking changes

StructureBlockUpdate.FilteredStructureName, PlayerVideoCapture.Action and the PlayerVideoCaptureAction* values, the three CameraSplineInstruction fields, CameraSplineDefinition.SplineType, and the key frame slice types of CameraSplineDefinition.

StructureBlockUpdate, PlayerVideoCapture, CameraInstruction and CameraSpline
are serialized from their reflected schemas in 1.26.60:

- The filtered structure name is an optional string.
- The video capture action is a varuint32 union selector with start first.
- A spline instruction's type, identifier and load-from-JSON flag are
  always written.
- A spline definition's type is always written, and its key frames carry an
  optional easing type, so they get their own key frame types.
@TwistedAsylumMC
TwistedAsylumMC merged commit d483610 into Sandertv:master Oct 29, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants