Skip to content

Fix cat variant metadata translation - #493

Open
guhlutions wants to merge 1 commit into
ViaVersionAddons:mainfrom
guhlutions:fix/cat-variant-metadata
Open

guhlutions wants to merge 1 commit into
ViaVersionAddons:mainfrom
guhlutions:fix/cat-variant-metadata

Conversation

@guhlutions

@guhlutions guhlutions commented Nov 13, 2026 •

Copy link
Copy Markdown

Problem

A Java client disconnects when it receives a Bedrock cat's coat variant. ViaBedrock writes the cat's VARIANT with the generic VarInt serializer, and the client rejects the resulting Integer at the cat-variant metadata index. This was observed with Java 26.3 and 1.21.4 on ViaProxy 3.4.15-SNAPSHOT connected to Bedrock 1.26.60.

Fix

Map all 11 vanilla Bedrock coat IDs to their Java variant keys, resolve those keys in the cat registry sent for the session, and encode the result with catVariantType. Unknown Bedrock coat IDs use Java's default minecraft:black variant.

The source for the Bedrock IDs is Mojang's vanilla cat definition.

Verification

  • ./gradlew build passed, including Checkstyle.
  • A local packet test reproduced the generic serializer on the original build. It passed for all 11 variants and the unknown-ID fallback with the patch, checking Java 26.3 encoding and the ViaBackwards translation to Java 1.21.4. This includes Bedrock IDs 2 and 9 from the disconnect logs.
  • Live retest with the patched ViaProxy and Java 26.3 passed on the affected Bedrock Realm. The client loaded the village and remained connected while the same villager and horse warnings appeared in the proxy log.

Resolve Bedrock coat variants against the Java cat registry and send them with the dedicated cat variant serializer.
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.

1 participant