mojira.dev
MC-271573

Attribute Enchantments Don't Behave Properly on Armor

If you have a custom enchantment, that say gives you extra health (or any other attribute), there are two weird bugs that I've found can occur:

  1. The attribute only gets applied for one piece of armor

  2. When taking off armor pieces, the attribute modifiers can be removed completely even while still wearing armor

See attached datapack.

How to recreate:

  1. Go into a normal world with the installed datapack.

  2. Get any two pieces of trimmable armor

  3. Enchant them with their respective "health" enchantments found in the datapack

  4. Put on both pieces of armor and observe how only one effect is applied

  5. Remove one piece of armor and observe how no effects are applied

Linked issues

Attachments

Comments 3

I can confirm the behavior described using the attached datapack in 24w19b. The attached datapack uses separate enchantments for each armor piece but the same UUID for all attribute modifiers. So this behavior is probably WAI.

Can confirm in 24w20a. This is due attribute slots being unavailable in custom enchantments. Since the UUID of the attribute is the same, only 1 gets applied when multiple armor pieces are worn.

JayMan146

slicedlime

Community Consensus

Platform

Important

Enchantments

24w18a, 24w19b

24w21a

Retrieved