Entity Documentation - 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.

Float Behavior Properties

Name Default Value Type Description Example Values
priority not set Integer number As priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal. Allay: 7, Bee: 19, Cave Spider: 1
sink_with_passengers false Boolean true/false If true, the mob will keep sinking as long as it has passengers. Camel: true

Samples

Allay

"minecraft:behavior.float": {
  "priority": 7
}

Armadillo

"minecraft:behavior.float": {
  "priority": 0
}

Bee

"minecraft:behavior.float": {
  "priority": 19
}

Camel

"minecraft:behavior.float": {
  "priority": 0,
  "sink_with_passengers": true
}

Cave Spider

"minecraft:behavior.float": {
  "priority": 1
}

Pig

"minecraft:behavior.float": {
  "priority": 2
}