Match the correct entity when hitting or being hit
-
Embed the library into your data pack by copying over the
argon
,load
andminecraft
namespaces- Be sure to merge where necessary (You most likely need to merge the
load.json
file)
- Be sure to merge where necessary (You most likely need to merge the
-
Add a function that should be called to one (or multiple) of the following function tags
#argon:entity_hurt_player
#argon:player_hurt_entity
#argon:player_killed_entity
#argon:entity_hurt_player
@s
is the player that has been hit- Using
execute on attacker
you can execute something as the entity that has hit the player
#argon:player_hurt_entity
@s
is the entity that has been hit- Using
execute on attacker
you can execute something as the player that has hit the entity
#argon:player_killed_entity
@s
is the player that has killed the entity- The entity can't be reached form this function since it has been killed
Check me out on other platforms: