mojira.dev
MC-303637

Some components have unexpected implicit default value behavior

It was mentioned in the changelog of 1.20.5 that:

Components equal to their default value on the target item will not be stored

Some components uses weird implicit default values, causing the following issues:

  1. Manually specified default values are stored (as opposed to what 1.20.5 changelog says)

  2. The implicit default values don’t pass data component exact matches

I found these components affected:

  • chicken/variant

  • damage_type

  • jukebox_playable

Steps to reproduce:
(jukebox_playable is the most obvious one because it has data component predicate)

  1. Take Music Disc 5 from creative inventory and hold it in mainhand

  2. Run the test command in chat:
    → ✅ The test passes as expected

    /execute if items entity @s weapon *[jukebox_playable~{song:"5"}]
  3. Run the test command in chat:
    → ❌ The test fails

    /execute if items entity @s weapon *[jukebox_playable="5"]
  4. Run the command to get another Music Disc 5 and hold it in mainhand:

    /give @s music_disc_5[jukebox_playable="5"]
  5. Run the command to see stored component value:
    → ❌ jukebox_playable component is stored

    /data get entity @s SelectedItem
  6. Repeat step 2 and 3 with the new music disc
    → ✅ Both pass as expected

Linked issues

Comments 1

Thank you for your report!
We're tracking this issue in MC-299992, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

merak48763

(Unassigned)

Unconfirmed

(Unassigned)

25w43a

Retrieved