Enchantment to damage attackers items.
I’m making my first data pack with a couple of enchantments, I’ve already made two (a variation of Protection against mace attacks and Wind Burst IV) but I’m running into problems with a shield enchantment where attackers who fall on the shield carrier lose a bunch of item durability, and I’m currently stuck on how to decrease item durability by a certain amount instead of setting it to a specific value.
Other problems that I’m less concerned about are have to make one set of advancements and functions for every level of the enchantment (Higher level enchantments should damage the attacker’s weapon more) and weapons with 0 durability not breaking.
Can anyone help me with the very unpolished item components system?
Main Problem: make an enchantment damage attacker’s weapon.
Specific issue: Subtract durability instead of setting it.
Continue to help post