minecraft:behavior.float

Allows the mob to stay afloat while swimming. Passengers will be kicked out the moment the mob's head goes underwater, which may not happen for tall mobs.

Properties

PropertyTypeDefaultWhat it does
sink_with_passengersBooleanfalseIf true, the mob will keep sinking as long as it has passengers.
chance_per_tick_to_floatDecimal0.8The chance per tick to cause an upward impulse.
time_under_water_to_dismount_passengersDecimal0Time in seconds that a floating vehicles head can be underwater before it causes its passengers to dismount.
priorityIntegermin 00
control_flagsList of text[]

Example from the game files

This is how vanilla Camel uses it in Minecraft Bedrock 1.26.60.5:

{
  "minecraft:behavior.float": {
    "priority": 0,
    "chance_per_tick_to_float": 1.0,
    "time_under_water_to_dismount_passengers": 2.0
  }
}

Used by 49

Vanilla entities with minecraft:behavior.float in their definition:

Related components