Repository navigation
minecraft/protocol: Fix four 1.26.60 packet layouts - #545
Merged
TwistedAsylumMC merged 2 commits intoOct 29, 2026
Merged
TwistedAsylumMC merged 2 commits into
TwistedAsylumMC merged 2 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
FilteredStructureName protocol.Optional[string])uint8action, stop = 0Action uint32)uint8,string,bool)The CameraSpline definition key frames get their own types,
CameraSplineProgressKeyFrameandCameraSplineRotationKeyFrame. The instruction's key frames keep a required easing, so they still useCameraProgressOptionandCameraRotationOption.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.
Bedrock__Safety__RedactableString:Unredactedrequired,RedactednotBedrock__Safety__RedactableString:RedactedoptionalRedactableString:std::string,std::optional<std::string>PlayerVideoCapturePacketPayload: one of start, stopPlayerVideoCapturePacket: uvarint32 switch, start then stopPlayerVideoCapturePacketPayload:std::variant<StartVideoCapture, StopVideoCapture>CameraInstruction__SplineInstruction:typerequired; identifier and flag have defaultsCameraInstructionOptions__SplineInstruction: all plainSplineInstruction:std::string,SplineType,boolCameraSplineDefinition:spline_typehas a default; key frameeasingnot requiredCameraSplineDefinition:spline_typeplain; key frameeasingoptionalCameraSplineDefinition:mSplineTypeisstd::string; key frame easing isstd::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 ./...andgolangci-lint run ./...pass.Breaking changes
StructureBlockUpdate.FilteredStructureName,PlayerVideoCapture.Actionand thePlayerVideoCaptureAction*values, the threeCameraSplineInstructionfields,CameraSplineDefinition.SplineType, and the key frame slice types ofCameraSplineDefinition.