minecraft:anger_level

Allows this entity to track anger towards a set of nuisances.

Properties

PropertyTypeDefaultWhat it does
anger_decrement_intervalDecimal1Anger level will decay over time. Defines how often anger towards all nuisances will be decreased by one.
angry_boostInteger20Anger boost applied to angry threshold when mob gets angry.
angry_thresholdInteger80Threshold that define when the mob is considered angry at a nuisance.
default_annoyingnessIntegermin 00The default amount of annoyingness for any given nuisance. Specifies how much to raise anger level on each provocation.
max_angerInteger100The maximum anger level that can be reached. Applies to any nuisance.
nuisance_filterObject 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.
testText—The name of the test to apply.
subjectBoolean or Integer or Decimal or Text—The subject of this filter test.
operatorBoolean or Integer or Decimal or Text—The comparison to apply with 'value'.
domainBoolean or Integer or Decimal or Text—The domain the test should be performed in.
valueBoolean or Integer or Decimal or Text—The value being compared with the test.
on_increase_soundsList of object[]Sounds to play when the entity is getting provoked. Evaluated in order. First matching condition wins.
sound requiredText—The sound to play.
condition requiredText or Object or Decimal—A Molang expression describing under which conditions to play this sound, given that the entity was provoked.
default_projectile_annoyingnessIntegermin 00The 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_thresholdBooleantrueDefines 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:

Related components