Skip to content

fix(protocol): repair 26.60 joins and restore migration fixes - #468

Closed
AlexProgrammerDE wants to merge 7 commits into
ViaVersionAddons:update/r26u6from
StackAnvil:fix/26-60-packet-omissions
Closed

AlexProgrammerDE wants to merge 7 commits into
ViaVersionAddons:update/r26u6from
StackAnvil:fix/26-60-packet-omissions

Conversation

@AlexProgrammerDE

Copy link
Copy Markdown
Collaborator

Follow-up to #466, targeting update/r26u6.

Joining a populated server fails in ADD_PLAYER because the update reads the device ID and build platform twice. Read those fields once and reuse them in the Java profile.

The comparison with #465 also exposed several missing migration fixes:

  • Consume uncompressed frame payloads exactly once. Keep the protocol enum's uint16 no-compression value (65535), and translate the uint8 frame sentinel (255) in the codec.
  • Preserve explicit redstone, fire, and chorus connections when the equal-version upgrade adds missing properties.
  • Restore 37 bundled resource archives containing 344 biome, 249 fog, and 214 render-controller files. These come from the validated 1.26.60.5 GDK snapshot in feat(protocol): update Bedrock to 1.26.60 #465; manifests, licenses, and language data remain intact.
  • Retain dimension cloud height and visibility, validate the height range, and project cloud settings through Java environment attributes.
  • Preserve packet IDs omitted by Mojang's summary enum by reading matching packet schemas. Keep Cereal resource-pack response indexes in the codec rather than modifying generated enum getters.
  • Retain the player-list PlayFab ID in the Java profile.

The attack, interaction, swing, and full-dimension biome fixes already present in this branch remain intact. The reordered block mappings are semantically identical, so this PR leaves them unchanged.

Validation:

  • ./gradlew --no-configuration-cache build validateMappings passes, including all Checkstyle tasks and 19 tests.
  • Five regression methods fail with the original branch's player decoder, compression code, connection upgrader, and resource archives. All pass with the corrections.
  • The player regression invokes the registered handler with real wire data, both passenger states, and empty and populated device IDs.
  • Enum regeneration from Mojang's protocol-2225 schemas produces no further changes.
  • The generated source targets the branch's existing Java 17 baseline.

The reproduced player failure matches the screenshot's end-of-buffer string read. I did not repeat a live minevale.de join. Block seating, signed audio playback, locator rendering, and full native visual parity remain outside this follow-up.

Read device identity after passenger data and reuse it in the Java profile. The 26.60 update consumed both fields a second time and disconnected clients as soon as another player spawned.

Exercise the registered ADD_PLAYER handler with real wire data, both passenger states, and empty and populated device IDs. Add the test runtime without duplicating compile-only dependency versions.
NetworkSettings uses the uint16 no-compression value 65535, while frame headers use uint8 value 255. Preserve the generated enum value and translate only the frame header.

Consume a retained payload slice so Netty does not decode the same payload again as a compression header. Separate regressions cover negotiation and frame consumption.
The 26.60 palette keeps block-state version 1.21.60.33. Its added-properties schema therefore also runs on current redstone, fire, and chorus states.

Add missing properties without replacing supplied values. Verify equal-version states, legacy defaults, distinct fire and chorus domains, and repeated upgrades.
The 26.60 regeneration left the bundled packs without biome, fog, or render-controller definitions. Restore the 37 affected archives from the validated 26.60 source snapshot in PR ViaVersionAddons#465.

These archives restore 344 biome files, 249 fog files, and 214 controller files. Their source is the official 1.26.60.5 GDK package recorded in that draft. Preserve the manifests, licenses, and language data. Exercise the actual definition loaders against bundled archives.
The 26.60 dimension packet supplies cloud height and visibility, but the update discarded both fields. Retain them with validated minimum-Y and height-range values and project them through Java environment attributes.

Keep the existing Overworld override boundary and preserve other dimension attributes. Transparent cloud color survives the Java day timeline multiplier. Six regressions cover packet boundaries, invalid ranges, overflow, and projection.
Protocol 2225 omits declared packets from its packet-ID summary enum. Supplement it from same-protocol packet schemas and reject conflicting IDs or mixed protocol input. Keep unsupported seating and signed audio explicitly canceled.

Resource-pack responses carry a Cereal variant index, distinct from the enum value. Move that conversion into a shared codec so enum regeneration preserves the response layout. Restore focused wire and generator regressions from the version draft.
Protocol 2225 moves PlayFab identity out of serialized skin data and into player-list entries. Retain the received identity in the Java profile instead of discarding the only remaining source of that property.
@Exterminate5573

Copy link
Copy Markdown
Collaborator

Added manually

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.

3 participants