As suggested by players I have implemented the following conditions:
Enderman-like attack condition This is implemented within the advanced distance Attack Condition like:
Code (YAML):
distance:
_: 20
player:
looking: true
# Only attack players that are looking at it (like an Enderman)
Potion stop condition If the player has one of the potion effects below the mob will give up attacking
Code (YAML):
potion:
speed: 1
slow: 2
# Only Slowness II would make the mob give up
Feeding stop condition Interact with the mob using the item in your hand (and optionally consume it).
Code (YAML):
# Right clicking the mob will cause it to give up on attacking interact:
duration: 20
# How long will the mob remember the interaction? (in seconds) material: - stick
# Same as the above, but also consumes the item consume:
duration: 60
material: - bread