mojira.dev
MC-269553

Items with empty enchantments NBT tag do not upgrade as expected

The bug

Items with an empty NBT tag for enchantments (Enchantments:[]) do not upgrade to the new component system as expected. It'd be expected that they would get an enchantment_glint_override component tag, but this does not happen.

Notably, items with the NBT tag (Enchantments:[{}]) do convert as expected, so it'd be expected that the other form would also do so.

How to reproduce

A world containing "phantom enchanted" items is attached to this ticket.

  1. Open the attached world in 1.10.2 (in 1.11 to 1.20.4, the items won't visually appear enchanted due to a bug, but the NBT tag is still there)

  2. Verify that the items look enchanted

  3. Open the attached world in the latest 1.20.5 snapshot

  4. Verify that not only do they not look enchanted, but that the empty enchantment tag is completely gone, and these items are now identical to normal unenchanted items

Expected results

These items would keep their enchantment glint in 1.20.5+ by converting to the new enchantment_glint_override component.

Actual results

They do not.

Linked issues

Attachments

Comments 0

No comments.

muzikbike

gegy

Confirmed

Platform

Important

Commands, Datafixer

data-fixer

24w11a

24w14a

Retrieved