How to get the amount of damage received (not the damage dealt)

Started by tuonkhung on Tue, 06/28/2022 - 02:27

Topic category: Help with modding (Java Edition)

Last seen on 09:03, 13. Jul 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to get the amount of damage received (not the damage dealt)
Tue, 06/28/2022 - 02:27

Hello there,

I'm just wondering can you get the amount of damage received. I know that there's a "amount" dependency but it can only give me the amount of damage dealt. For example, a vindicator will deal 13 damage; if I use this dependency and send it to chat, it will give me 13 as an output, but the thing is the damage you received is different due to having armor on or having resistance effect, and yet it still shows that the damage dealt is 13. So is there anyway to get the damage received because it seems that dependency doesn't work properly on enemy that has armor.