#Add an enchantment to a custom item
16 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
Add an enchantment to a custom item
You could just modify the recipe
If that's sufficient
Or do you need to make the item always have this enchantment?
At first I wanted the item to have a thorns attribute but I failed miserably in making it work, I thought about the possibility of adding the thorns enchantment to the item, and then removing the enchantment's glow and renaming the tooltip so that it looks like an attribute like any other, I want this enchantment/attribute to work all the time on the chaimail item
Here's how I tried to register the attribute and its modifiers, if you have an idea on how to make this work, through registering a new custom attribute, or doing it through the enchantment itself
There are 3 different scripts, 1 to register the attribute, another to add functionality through the hurt event whenever an entity attacks the player, and the other adds the modified attribute to the item and the tooltip
I've never tried making a custom attribute but why are you treating the chest plate like a helmet?
At first it seems to have worked, it correctly registered the attribute in the game, but the hurt event seems to do nothing, it does not return the damage to the entities.
Oh that was my mistake, I missed that one, let me fix it, I think the mistake might be this
It really didn't work, the problem is that it doesn't recognize the attribute, I'll try the approach of enchanting directly on the item itself.
How do I make the item always have this enchantment?