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

PropertyTypeDefaultWhat it does
speed_modDecimal1.4Movement speed multiplier of the mob when using this Goal.
search_radiusInteger4The radius (in blocks) around the mob's current position that it will search for a valid air block to move to.
search_heightInteger16The 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_typeText"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".
priorityIntegermin 00
control_flagsList 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