Before we had the following attack condition to attack players:
Code (YAML):
distance
: 10
With the advanced distance attack condition, you have more control over this setting, for example:
- Let the mob only attack sprinting players.
- Allow mobs to fight each other, for example, chickens VS cows.
Code (YAML):
distance:
_
: 20
player
:
# Only if the below is true, the mob will attack a player
sneaking
: false
walking
: false
sprinting
: true
# Only attack players that are sprinting
cow
:
{
}
# Any cow will be attacked if you add the '{}'
chicken:
baby
: true
# Only attack baby chickens
wolf:
tamed
: false
# Don't attack tamed wolves.
What if you also wanted to attack close players? You can't have the same name in the config twice, but you may add any text within { } to make it unique, for example:
Code (YAML):
distance{your_unique_text}:
_
: 5
player
:
{
}
And lastly, '
group-aggro-distance' will now only work for mobs of the same type