minecraft:buoyant
Enables an entity to float on the specified liquid blocks.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
base_buoyancy | Decimal | 1 | Base buoyancy used to calculate how much will a entity float. |
apply_gravity | Boolean | true | Applies gravity each tick. Causes "movement_type" to be more impactful, but also gravity to be applied more intensely outside liquids. |
movement_type | Textnone, waves, bobbing | "waves" | Type of vertical movement applied to the entity: "waves", simulates wave movement based on the entity speed. "bobbing", simulates waves going through. "none", simulates waves going through. |
big_wave_probability | Decimal | 0.03 | Probability for a big wave hitting the entity. Only used if "movement_type" is "waves". |
big_wave_speed | Decimal | 10 | Multiplier for the speed to make a big wave. Triggered depending on "big_wave_probability". |
liquid_blocks | List of object or text | [] | List of blocks this entity can float on. Must be a liquid block. |
drag_down_on_buoyancy_removed | Decimal | 0 | How much an entity will be dragged down when the component is removed. |
can_auto_step_from_liquid | Boolean | false | Whether the entity can move out of a liquid block to a neighboring solid block if pushed against it. |
Example from the game files
This is how vanilla Donkey uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:buoyant": {
"base_buoyancy": 1.0,
"apply_gravity": false,
"can_auto_step_from_liquid": true,
"movement_type": "bobbing",
"liquid_blocks": [
"minecraft:water",
"minecraft:flowing_water",
"minecraft:lava",
"minecraft:flowing_lava"
]
}
}Used by 8
Vanilla entities with minecraft:buoyant in their definition:
Related components
healthmovementexperience_rewardattackscalefollow_rangeunderwater_movementknockback_resistanceuses_legacy_frictionvariable_max_auto_stepattack_cooldownflying_speedwater_movementattack_damageblock_movement_slowdown_immunitygroup_sizemovement_sound_distance_offsetstrengthair_drag_modifierbouncinessfriction_modifierlava_movementplayer.exhaustionplayer.experience