How to detect when an entity attacks a player, which player was attacked and which entity/ type of entity attacked

Started by Ufi on

Topic category: Help with modding (Java Edition)

Last seen on 15:11, 23. Nov 2021
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to detect when an entity attacks a player, which player was attacked and which entity/ type of entity attacked

In the mod that i'm making you have a number healt bar and i want to figure out when and which entity attacks you so i can then damage you