minecraft:on_friendly_anger
Adds a trigger that will run when a nearby entity of the same type as this entity becomes Angry.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
event | Text | "" | |
target | Textself, other, player, target, parent, baby, block, damager, holder, item | "self" | |
filters | Object or List of object | {"AND": null, "NOT": null, "OR": null, "all": null, "all_… | Filters allow data objects to specify test criteria which allows their use. Filters can be defined by a single object of type (Filter Test), an array of tests, collection groups, or a combination of these objects. |
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. |
Example from the game files
This is how vanilla Trader Llama uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:on_friendly_anger": {
"event": "minecraft:defend_wandering_trader",
"target": "self"
}
}Used by 3
Vanilla entities with minecraft:on_friendly_anger in their definition:
Related components
damage_sensorinteractenvironment_sensoron_target_acquiredtimeron_target_escapegame_event_movement_trackingentity_sensorrail_sensortarget_nearby_sensorbody_rotation_blockedon_hurtblock_sensorinside_block_notifierlooked_aton_hurt_by_playerschedulervibration_listenerbody_rotation_always_follows_headon_deathon_equipment_changedon_start_landingon_start_takeoffon_wake_with_owner