mojira.dev
MC-273343

Enchantments apply in random order

How to Reproduce

  1. Load the datapack from attachment

  2. Enchant a diamond sword with Sharpness V and sharpness2 III

    /enchant @s sharpness 5
    /enchant @s sharpness2 3
  3. Attack mobs with full cooldown

Expected Behaviour

The diamond sword always deals the same damage to mobs

7 * 2 + 3 = 17 or (7 + 3) * 2 = 20)

Observed Behaviour

It can oneshot creepers or not depends reopening the world

Linked issues

Attachments

Comments 7

Would MC-272540 describe your issue?

This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.

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

No, I'm saying reload enchantments (even nothing changed) shuffle the order they applied, based on reloaded properly.

It was the hard reload that will shuffle the order, which means the order can be different after each single player world reopen or server restart.

I installed the provided datapack and tried to enchant my sword with "sharpness2" but no such enchantment existed. Can you verify the integrity of the datapack?

It's fine fore me, did you rejoin the world?

You can customize the order of enchantments via the #minecraft:tooltip_order enchantment tag. If you don't add a custom enchantment to that tag, it'll put the enchantment in an arbitrary position when loading the datapack because you didn't specify an order.

Edit: I misunderstood this bug report; I don't think tooltip order affects the order in which enchantments are applied, but maybe it does? If not, does the order in the data component change upon reload as well?

Confirmed; tooltip order does not affect the order in which enchantments are applied; the order in the data component does not change upon reload as well.

ccJerrycc

(Unassigned)

Confirmed

Platform

Normal

Data Packs, Enchantments

enchantment

1.21

Retrieved