minecraft:behavior.play_dead
Allows this entity to pretend to be dead to avoid being targeted by attackers.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
duration | Decimal | 1 | The amount of time the mob will remain playing dead (in seconds). |
random_start_chance | Decimal | 1 | The likelihood of this goal starting upon taking damage. |
force_below_health | Integer | 0 | The amount of health at which damage will cause the mob to play dead. |
random_damage_range | Object | {"max": 0, "min": 0} | The range of damage that may cause the goal to start depending on randomness. Damage taken below the min will never cause the goal to start. Damage taken above the max will always cause the goal to start. |
min | Integer | 0 | |
max | Integer | 0 | |
damage_sources | List of text | [] | The list of Entity Damage Sources that will cause this mob to play dead. |
apply_regeneration | Boolean | false | Whether the mob will receive the regeneration effect while playing dead. |
filters | Object or List of object | {"AND": null, "NOT": null, "OR": null, "all": null, "all_… | The list of other triggers that are required for the mob to activate play dead |
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. |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Axolotl uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.play_dead": {
"priority": 0,
"duration": 10,
"force_below_health": 8,
"random_start_chance": 0.33,
"random_damage_range": {
"min": 0,
"max": 2
},
"damage_sources": [
"contact",
"entity_attack",
"entity_explosion",
"magic",
"projectile",
"thorns",
"wither"
],
"apply_regeneration": true,
"filters": {
"test": "in_water",
"operator": "==",
"value": true
}
}
}Used by 1
Vanilla entities with minecraft:behavior.play_dead in their definition:
Related components
behavior.look_at_playerbehavior.temptbehavior.breedbehavior.mount_pathingbehavior.follow_parentbehavior.player_ride_tamedbehavior.find_mountbehavior.celebratebehavior.follow_ownerbehavior.stay_while_sittingbehavior.look_at_trading_playerbehavior.random_look_around_and_sitbehavior.take_flowerbehavior.trade_with_playerbehavior.celebrate_survivebehavior.controlled_by_playerbehavior.follow_caravanbehavior.follow_mobbehavior.make_lovebehavior.ocelot_sit_on_blockbehavior.playbehavior.receive_lovebehavior.share_itemsbehavior.trade_interest