Repository navigation
fix(codec): serialize persona tints and skin colours like BDS since v2168 - #290
Open
Miroshka000 wants to merge 1 commit into
Open
Miroshka000 wants to merge 1 commit into
Miroshka000 wants to merge 1 commit into
Conversation
…2168
Clients send persona tint types as "persona_mouth" and the skin colour as
"#RRGGBB" in their login data. v2168+ wrote the tint type verbatim and the
colour with a zero alpha, while BDS writes the canonical name ("mouth") and
an opaque colour; 1.26.52 clients drop the session on such a player list
entry for themselves.
Write the canonical tint name, parse "#RRGGBB" colours as opaque in one
place and write the skin colour from its ARGB value.
Author
|
Closing for now: daoge_cmd has added Bedrock 1.26.45 and 1.26.50 support to Allay himself (AllayMC/Allay@ac391e41f). I'll wait for his feedback on how he wants the rest of the 1.26.50 work and reopen if it is still needed. |
Author
|
Reopening: on current Allay master (with ac391e41f) a 1.26.52 Windows client still fails to join with |
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.
Summary
Since v2168 a skin in
PlayerListPacketcarries its persona tint colours and skin colour. Two fields were written differently from BDS, and a 1.26.50 - 1.26.52 client refuses the player list entry (InitialConnectionerror on join) when they do not match:persona_form of a piece type in their login data (for examplepersona_mouth), but BDS writes the canonical name (mouth). The serializer now writesPersonaPieceType.fromName(type).getSerializeName().#RRGGBB, which was parsed with alpha 0, so the colour was written as transparent.SerializedSkinnow reads#RRGGBBas opaque and keeps the alpha of#AARRGGBB(#0stays transparent), and the serializer writesColor#getRGB().The change is in
BedrockCodecHelper_v2168and inBedrockCodecHelper_v2225, which writes the same fields.How it was checked
BedrockCodecHelper_v2168SkinTestcovers both fields../gradlew :bedrock-codec:testpasses (44 tests).