minecraft:anger_level
Allows this entity to track anger towards a set of nuisances.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
anger_decrement_interval | Decimal | 1 | Anger level will decay over time. Defines how often anger towards all nuisances will be decreased by one. |
angry_boost | Integer | 20 | Anger boost applied to angry threshold when mob gets angry. |
angry_threshold | Integer | 80 | Threshold that define when the mob is considered angry at a nuisance. |
default_annoyingness | Integermin 0 | 0 | The default amount of annoyingness for any given nuisance. Specifies how much to raise anger level on each provocation. |
max_anger | Integer | 100 | The maximum anger level that can be reached. Applies to any nuisance. |
nuisance_filter | Object or List of object | {"AND": null, "NOT": null, "OR": null, "all": null, "all_… | Filter that is applied to determine if a mob can be a nuisance. |
test | Text | — | The name of the test to apply. |
subject | Boolean or Integer or Decimal or Text | — | The subject of this filter test. |
operator | Boolean or Integer or Decimal or Text | — | The comparison to apply with 'value'. |
domain | Boolean or Integer or Decimal or Text | — | The domain the test should be performed in. |
value | Boolean or Integer or Decimal or Text | — | The value being compared with the test. |
on_increase_sounds | List of object | [] | Sounds to play when the entity is getting provoked. Evaluated in order. First matching condition wins. |
sound required | Text | — | The sound to play. |
condition required | Text or Object or Decimal | — | A Molang expression describing under which conditions to play this sound, given that the entity was provoked. |
default_projectile_annoyingness | Integermin 0 | 0 | The default amount of annoyingness for any given nuisance that is a projectile. Specifies how much to raise anger level on each provocation. |
remove_targets_below_angry_threshold | Boolean | true | Defines if the mob should remove target if it falls below 'angry' threshold. |
Example from the game files
This is how vanilla Warden uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:anger_level": {
"angry_threshold": 80,
"angry_boost": 20,
"anger_decrement_interval": 1.0,
"default_annoyingness": 35,
"default_projectile_annoyingness": 10,
"max_anger": 150,
"on_increase_sounds": [
{
"condition": "query.anger_level(this) >= 40",
"sound": "listening_angry"
},
{
"condition": "query.anger_level(this) >= 0",
"sound": "listening"
}
],
"nuisance_filter": {
"all_of": [
{
"operator": "not",
"test": "is_family",
"subject": "other",
"value": "warden"
},
{
"operator": "not",
"test": "is_family",
"subject": "other",
"value": "inanimate"
}
]
},
"remove_targets_below_angry_threshold": true
}
}Used by 1
Vanilla entities with minecraft:anger_level in their definition: