Temp: 26.3-rc-1 protocol support - #880
Merged
Merged
Conversation
Adds MINECRAFT_26_3 behind the existing net.md_5.bungee.protocol.snapshot flag, using the snapshot protocol number (0x40000000 | 336) as upstream does during a pre-release cycle, and remaps the packets whose ids moved. Relative to 26.2, 26.3 inserts post_effects into both the configuration and game clientbound tables, swing_animation into the game clientbound table, and add_transient_block at game clientbound 0x25. That last one sits low enough to shift almost the whole table, so 25 of the game clientbound packets we register move, on top of the 7 configuration ones. Serverbound is unaffected for us, as the punch/swing shuffle sits in the 0x2E-0x3F window we do not register in, and CustomClickAction at 0x44 is above it. Every id was checked against the registration order in GameProtocols and ConfigurationProtocols rather than the protocol summary. CommonPlayerSpawnInfo, which Login and Respawn both embed, is the one packet payload change. gameType moved from a byte to a var int, and previousGameType from a byte with a -1 sentinel to vanilla's OPTIONAL_VAR_INT, where zero means absent and any other value is the id plus one. Both fields are only ever round-tripped by the proxy, so no call site needs to change. Everything else we parse is a FriendlyByteBuf to StreamCodec refactor that leaves the wire format identical, including PlayerListItemUpdate, whose new Action id is enum-internal and not serialised. The command argument type registry also grew: context_float_provider, context_int_provider and slot_source after loot_modifier, then feature and swing_animation after dialog, taking it from 57 to 62 entries and shifting dialog and uuid. All five are singleton argument types with no payload, so IDS_26_3 adds them as VOID. Without this, decoding Commands from a 26.3 backend throws ArrayIndexOutOfBoundsException. 26.3 likewise adds a post_effects suggestion provider; those are keyed by name rather than index and unknown names are rejected outright, so it is registered as a dummy for every version. rc-1 is a protocol number bump only: nothing under network/ changed between pre-3 and rc-1, and the argument type and suggestion provider registries are untouched, so only the constant moves. This is temporary and should be dropped once upstream adds 26.3 support.
Contributor
|
so much text for a 1 line change, what a waste of gpu |
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.
Moves the temporary 26.3 protocol patch from pre-3 to rc-1.
MINECRAFT_26_3becomes1073742160(0x40000000 | 336), following upstream's convention of bumping the existing constant's value through a pre-release cycle rather than adding a new one, so only one snapshot version is live at a time.rc-1 is a protocol number bump and nothing else
Diffed the decompiled sources for
26.3-pre-3against26.3-rc-1:SNAPSHOT_NETWORK_PROTOCOL_VERSION335 → 336,WORLD_VERSION5019 → 5020src/main/java/net/minecraft/network/changed — no packet added, removed, renumbered, or re-payloadedGameProtocols.java/ConfigurationProtocols.java— untouchedArgumentTypeInfos.java/SuggestionProviders.java— untouched, so neither of the registries that broke on the 26.2 → 26.3 jump grew this timeThe rest of the release diff is gameplay and client internals (
LivingEntity,Ravager,ChunkMap,LevelExtractor, loot predicates) plusversion.json.So the only code hunk in the regenerated patch is the constant:
This supersedes the pre-3 patch, it does not sit beside it
The commit is a single-file rename (
R096):0069-Temp-26.3-pre-3-protocol-support.patch→0069-Temp-26.3-rc-1-protocol-support.patch. The number stays0069so it remains after #877's0067/0068.Worth flagging at merge time: #878 was the same shape — a rename of this same temp patch — and because its base had drifted it merged as an add, leaving the superseded file behind and producing the duplicate numbering that #879 had to fix. This branch is currently exactly one commit on top of
masterwith no drift. If anything lands before it merges, regenerate rather than letting the rename be auto-resolved, and afterwards confirm only one temp patch survived:Testing
Patch applies cleanly from scratch; full build and test suite pass. Smoke tested against a live proxy driven at the protocol level with fake rc-1 backends:
1073742160→ accepted,26.3.xadvertised1073742159(pre-3) → correctly rejected, confirming the in-place constant bumpLogin 0x32,StartConfiguration 0x78, secondLogin 0x32,Respawn 0x54, all decoding at the expected ids withpreviousGameModepresent and intact (2 and 3) and every parsed packet consuming its payload exactlyPacket ids needed no changes, which is the expected result given the empty
network/diff.