How to make an enchantment that deals percentage damage.

Started by AliveWater on

Topic category: Help with modding (Java Edition)

Last seen on 21:33, 27. Sep 2024
Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make an enchantment that deals percentage damage.

So I'm making a custom enchant (like a lot of custom enchantments) that are supposed to deal percentage damage. As in +50% damage to a specific type of mob. However I can't figure out how to make the enchant +50% of the sword damage to the mob (NOT 50% OF THE MOB'S HEALTH!). I can detect what mobs are being hit but can't get the damage itself to work. Does anyone know how to do this?