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 |
|---|---|---|---|---|
| chance_per_tick_to_float | 0.8 | Decimal number | The chance per tick to cause an upward impulse. | Camel: 1 |
| 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. | |
| time_under_water_to_dismount_passengers | 0 | Decimal number | Time in seconds that a floating vehicles head can be underwater before it causes its passengers to dismount. | Camel: 2 |
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,
"chance_per_tick_to_float": 1,
"time_under_water_to_dismount_passengers": 2
}
Cave Spider
"minecraft:behavior.float": {
"priority": 1
}
Pig
"minecraft:behavior.float": {
"priority": 2
}