minecraft:behavior.croak
Allows the entity to croak at a random time interval with configurable conditions.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
interval | Object | {"max": 20, "min": 10} | Random range in seconds between runs of this behavior. Can also be a constant. |
min | Decimal | 0 | |
max | Decimal | 0 | |
duration | Object | {"max": 4.5, "min": 4.5} | Random range in seconds after which the croaking stops. Can also be a constant. |
min | Decimal | 0 | |
max | Decimal | 0 | |
filters | Object or List of object | {"AND": null, "NOT": null, "OR": null, "all": null, "all_… | Conditions for the behavior to start and keep running. The interval between runs only starts after passing the filters. |
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 Frog uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.croak": {
"duration": {
"min": 4.5,
"max": 4.5
},
"filters": {
"all_of": [
{
"test": "in_water",
"value": false
},
{
"test": "in_lava",
"value": false
}
]
},
"interval": {
"min": 10,
"max": 20
},
"priority": 9
}
}Used by 1
Vanilla entities with minecraft:behavior.croak in their definition:
Related components
behavior.random_strollbehavior.random_look_aroundbehavior.equip_itembehavior.move_towards_home_restrictionbehavior.timer_flag_1behavior.look_at_entitybehavior.move_towards_dwelling_restrictionbehavior.drink_potionbehavior.jump_to_blockbehavior.squid_divebehavior.squid_idlebehavior.squid_move_away_from_groundbehavior.squid_out_of_waterbehavior.dragondeathbehavior.drink_milkbehavior.emergebehavior.investigate_suspicious_locationbehavior.lay_downbehavior.napbehavior.rise_to_liquid_levelbehavior.rollbehavior.silverfish_merge_with_stonebehavior.silverfish_wake_up_friendsbehavior.sleep