Trying to make an enchantement that does more damage

Started by Leptitchoup on

Topic category: Help with MCreator software

Last seen on 23:43, 17. Mar 2024
Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Trying to make an enchantement that does more damage

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

Last seen on 11:41, 17. May 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You would want to make a…
Sun, 10/29/2023 - 16:05

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. 

Last seen on 23:43, 17. Mar 2024
Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
alr, ty!
Sun, 10/29/2023 - 18:59

alr, ty!