mojira.dev
MC-305161

enchant_with_levels and enchant_randomly function can set meanless additional_trade_cost component to item

How to Reproduce

  1. Held a Iron Sword.

  2. Run command to apply enchant_with_levels or enchant_randomly function, like this: /item modify entity @p weapon.mainhand {function:enchant_randomly, include_additional_cost_component :true}

Observed Result

This command will set additional_trade_cost component to Iron Sword. To validate it, you can run this command to test: /execute if items entity @s weapon.mainhand *[additional_trade_cost~{}]

Expected Result

additional_trade_cost component should not be set.

As a transient component, it should not exist on any non-transient item, like map_post_processing are only existing output slot. So I believe this is an unexpected behavior, despite it don’t have any affects, additional_trade_cost will be removed when you exit world.

Linked issues

Comments 0

No comments.

wplxfore

(Unassigned)

Unconfirmed

(Unassigned)

26.1 Snapshot 1

Retrieved