Repository navigation
fix(entities): send cat variant as cat_variant registry holder - #505
Open
michelmalle wants to merge 1 commit into
Open
michelmalle wants to merge 1 commit into
michelmalle wants to merge 1 commit into
Conversation
Java 26.3 expects the cat VARIANT entity data field to use the cat_variant type. Sending a plain varint made the client disconnect with a Network Protocol Error as soon as a cat's data was synced. Also maps Bedrock cat variant indices to Java registry ids.
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.
Problem
Joining a Bedrock server with a Java 26.3 client via ViaProxy disconnects the client with "Network Protocol Error" as soon as a cat's entity data is synced:
The
CATbranch inEntityMetadataRewriter(markedTODO: Test when I can) wrote the Bedrock variant as a plainvarIntType, while Java 26.3 expectscatVariantType.Fix
catVariantType, consistent with the existing wolf and frog handling.cat_variantregistry ids. The Bedrock order comes fromcontroller.render.catin Mojang/bedrock-samples, and the Java order from the bundledregistries.nbt. Unknown variants fall back to TABBY with a warning.Testing
Tested with ViaProxy 3.5.0-SNAPSHOT, a Java 26.3 client and a Bedrock 1.26.66 dedicated server with a black cat near spawn. Before the fix the client was disconnected every time within seconds of joining. After the fix it stays connected and the cat renders with the correct texture.