minecraft:behavior.swim_up_for_breath
Allows the mob to try to move to air once it is close to running out of its total breathable supply. Requires "minecraft:breathable".
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
speed_mod | Decimal | 1.4 | Movement speed multiplier of the mob when using this Goal. |
search_radius | Integer | 4 | The radius (in blocks) around the mob's current position that it will search for a valid air block to move to. |
search_height | Integer | 16 | The height (in blocks) above the mob's current position that it will search for a valid air block to move to. If a valid block cannot be found, the mob will move to the position this many blocks above it. |
material_type | Text | "water" | The material the mob is traveling in. An air block will only be considered valid to move to with a block of this material below it. Options are: "water", "lava", or "any". |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Dolphin uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.swim_up_for_breath": {
"priority": 1
}
}Used by 1
Vanilla entities with minecraft:behavior.swim_up_for_breath 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.croakbehavior.dragondeathbehavior.drink_milkbehavior.emergebehavior.investigate_suspicious_locationbehavior.lay_downbehavior.napbehavior.rise_to_liquid_levelbehavior.rollbehavior.silverfish_merge_with_stonebehavior.silverfish_wake_up_friends