When you create an enchantment that is intended to work on multiple pieces of armor (and stack, similar to how enchantments like Protection work), which uses attributes, the effects of the attributes are unable to stack because they have the same UUID. I believe this is a separate issue from other posts revolving around attributes on armor not stacking because this issue cannot be fixed without creating a separate enchantment for each armor piece, which doesn't seem to be "working as intended".
Linked issues
Attachments
Comments 4
As Jiingy requested, here are the steps to reproduce the issue.
Step 1: Be on Minecraft Java edition Snapshot 24w18a or higher.
Step 2: Make a datapack with an enchantments folder (I won't go into detail how to create a datapack in these instructions, but you can find tutorials/documentation online.)
Step 3: Create a custom enchantment that uses attributes, and is meant to work on multiple pieces of armor. You can use the one I have attached as an example.
Step 4: Enchant multiple pieces of armor with the enchantment
Step 5: When you put them on, their effects don't stack. This is because all the attributes on the enchantment have the same UUID.
I believe this is not intended because the effects of enchanted items should be able to stack, regardless of the system they use to affect the player.
I did not include Min/Max cost in my custom enchantment's file because they shouldn't be needed for demonstration purposes, as this is not about actually enchanting the gear.
If you want me to upload a full datapack file rather than just an enchantment json, I can do that.
Thank you.
[media]Ok, so I've realized that this is a duplicate issue. Someone has already made a post about this, and it will eventually be fixed. I'm not really sure what to do with this post now, as I can't find a way to delete it, but for anyone who finds this, look at issue 271573 instead.
Thank you for your report!
We're tracking this issue in MC-271573, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.
Could you provide any necessary commands or steps to reproduce the issue you've observed?