mojira.dev
MC-278728

smithing_transform recipes can't set an item's components back to default

smithing_transform recipes are incapable of setting an item's components back to their default.

Attached is a simple datapack to show this.

How to reproduce:

  1. Combine an end rod and a diamond helmet on a smithing table. The item's model and name are changed to make it into a "wearable end rod".

  2. Combine that with a sponge on a smithing table. This is intended to revert it back to a normal diamond helmet.

  3. See how the name and item model remain the same. The equipment model, however, changes.

The equipment model changes because the datapack doesn't set every variable in the equippable component to its default, so it's technically different even if it's functionally identical to the diamond helmet's default.

If you open the file at "data/smithing_transform_issue/recipe/revert_to_default.json" and change the item_name component's translation key or the item_model component's path to any other value, it works. It specifically happens when the component exactly matches the item's default.

Linked issues

Attachments

Comments 0

No comments.

PrismaticVoid

gegy

Confirmed

Platform

Normal

Data Packs

component, data-pack

1.21.4

25w02a

Retrieved