fix: decode painting variant item components - #4
Merged
Merged
Conversation
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.
What changed?
Models
minecraft:painting/variant, including registry references and inline values. Container packets can now decode the painting and every slot after it instead of dropping the frame.Versions affected
Minecraft 1.21.5 through 26.3, protocols 770 through 777.
Evidence
Vanilla encodes this component as a painting-variant registry holder. The direct form contains width, height, asset ID, optional title, and optional author. The original 26.3 reproduction dropped
container_set_contentat component wire ID 109. After this change, the painting and the following control item both survive reconnects on vanilla and Fabric 26.3.Validation
dotnet build UMPK.sln -c Releasepasses with no warnings.dotnet test UMPK.sln -c Releasepasses, and the test-count gate matchesengineering/testcounts/expected_counts.json.dotnet format --verify-no-changespasses.Notes for reviewers
This adds
PaintingVariantComponent,PaintingVariantDetails, andDataComponents.PaintingVariantto the public API. Codec identity hashes change for protocols 770 through 777 because their item-component tables now include the modeled codec.