How to retrieve effective damage value from the "before entity is hurt" trigger

Started by SnailsAttack on Mon, 12/28/2020 - 09:31

Topic category: Help with MCreator software

Last seen on 15:36, 22. Jan 2021
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to retrieve effective damage value from the "before entity is hurt" trigger
Mon, 12/28/2020 - 09:31

I'm trying to make my own totem of undying kind of item. The "entity attacked" and "before entity is hurt" procedures both provide a dependency called "amount" which represents the raw damage value dealt to the dependent entity, but I need the damage value which is calculated after considerations such as armor, armor toughness, armor enchantments, potion effects, etc. Am I going to have to calculate the effective damage myself or is there something I'm missing?