How to check who is the attacker when an entity is hurt? (+ player_persistant_variables)

Started by Feh_A. on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to check who is the attacker when an entity is hurt? (+ player_persistant_variables)

I want to make that when any entity is attacked, it will check if the ATTACKER is a player, and with that, it will get a player_persistant_variable value from that player and do something with it. I know how to call a procedure when an Entity is attacked, but I just don't know how to check if the ATTACKER is a player

Joined Oct 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm using MCreator 2024.3 -…
Sat, 10/26/2024 - 20:10

I'm using MCreator 2024.3 - 1.21.1 NeoForge Workspace

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
use source entity  
Sat, 10/26/2024 - 21:18

use source entity