Fix default painting handling in 1.19.4+ - #1315
Open
roccodev wants to merge 1 commit into
Open
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.
This fixes the following issues:
alban) painting would:(Unfortunately, the implementation leaves 1.19.3 servers affected)
See also this reply.
In 1.19.3+, default values for entity data are no longer sent. The 1.19->1.18.2 rewriter waits to receive the painting type data before sending
add_painting, so it needs to be sent manually. 1.19.4 added bundles, andadd_entityis always followed byset_entity_datain a bundle (reference), so this can be used to detect whether no entity data packet was sent.When that's the case, the implementation sends the default type manually. The default type seemingly changed with 1.21, previously it was
kebabin all versions (see e.g. https://mcsrc.dev/2/1.19/net/minecraft/world/entity/decoration/Painting#L35), but in 1.21 there is no explicit default set, and the first type in the registry is used instead. Currently, this meansalbanis the new default (you can test this by running/summon painting ~ ~ ~). So this PR also fixes that painting spawning as kebab in newer clients.