mojira.dev
MC-279733

Inlined item component painting/variant no longer persists after a relog

The component painting/variant can accept inline definition, like this:

/give @s minecraft:painting[minecraft:painting/variant={asset_id:bust,height:3,width:3}]

This command was parsed successfully, and you can place the right paintings. But the painting entity do not save variant data when the format of painting/variant is defined inline in 25w04a, which means when you exit and re-enter the level the painting will use default variant "alban".

In 25w03a, painting entity can save inline defintion variant.

How to Reproduce:

These steps needs to be done on both 25w03a and 25w04a to compare the differences.

  1. Run above command to get a painting.

  2. Place it.

  3. Exit the world, and re-enter it.

  4. Check the painting variant.

Observed Result:

Inline difinition painting variant is saved in 25w03a, do not saved in 25w04a.

Note

Because the changelog doesn't say anything about this feature, I'm not sure which one is intentional and which one is unexpected. But for now, inline definition painting/variant does not make any sense.

Comments 2

Can confirm. Historically, painting variants being inline-able has been considered supported based on fixes like MC-271574, and I believe that the minecraft:painting/variant component supporting inline painting variant definitions reaffirms that support.

Code analysis (Yarn mappings)

The Variants utility class contains methods for reading and writing variants to NBT. This code looks up the variant field when reading and writing NBT as an identifier reference to a given variant registry.

The behavior of painting variants accepting inline definitions was not accounted for; since these definitions do not have a key, they are not written to NBT. Likewise, since the inline definition is not a valid identifier, it fails to resolve to a registry reference entry when reading from NBT.

Thank you for your report!
After consideration, the issue is being closed as Won't Fix.

Please note that this is not the same as Working as Intended, as this bug report correctly describes behavior in the game that might not be the intended or desirable behaviour, but it will not be fixed right now. Sometimes, this is because the issue reported is minor and/or impossible to change without large architectural changes to the code base.

If you'd like to post a suggestion or give further feedback, please visit the Minecraft Feedback Site or choose a link below.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

wplxfore

(Unassigned)

Community Consensus

Platform

Normal

Commands, Items, Save Data

25w04a, 25w06a

Retrieved