Skip to content

Fix default painting handling in 1.19.4+ - #1315

Open
roccodev wants to merge 1 commit into
ViaVersion:masterfrom
roccodev:fix/default-paintings
Open

Fix default painting handling in 1.19.4+#1315
roccodev wants to merge 1 commit into
ViaVersion:masterfrom
roccodev:fix/default-paintings

Conversation

@roccodev

@roccodev roccodev commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

This fixes the following issues:

  • In 1.21+ servers, the Albanian (alban) painting would:
    • spawn as Kebab when placed, and not spawn upon reload (in 1.18.2 or older clients)
    • spawn as Kebab (in 1.19 and above)
  • In 1.19.3-1.20.6 servers, the Kebab painting would not spawn for 1.18.2 or older clients.

(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, and add_entity is always followed by set_entity_data in 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 kebab in 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 means alban is the new default (you can test this by running /summon painting ~ ~ ~). So this PR also fixes that painting spawning as kebab in newer clients.

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