Started by
Leptitchoup
on
Topic category: Help with MCreator software
Hello, i am trying to make an enchantement for a mod im currently working on, and i am trying to make an enchantement that deals more damage, however, i don't really know how i can detect if the player has the enchantement and how to deal more damage to the entity
You would want to make a procedure with the global trigger 'before entity is hurt.' Then, check if the item in the main hand of the source entity, (The one attacking), has your custom enchantment.
If it does, use the 'damage entity' function on the event/target entity, (the one being attacked), to deal your desired amount of damage. (You probably want this to be magic damage, as this will ignore armor, and would match similar enchantments, such as sharpness.) You could also check what level of your custom enchantment the item has, and change the amount of damage accordingly.
alr, ty!