minecraft:buoyant

Enables an entity to float on the specified liquid blocks.

Properties

PropertyTypeDefaultWhat it does
base_buoyancyDecimal1Base buoyancy used to calculate how much will a entity float.
apply_gravityBooleantrueApplies gravity each tick. Causes "movement_type" to be more impactful, but also gravity to be applied more intensely outside liquids.
movement_typeTextnone, 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_probabilityDecimal0.03Probability for a big wave hitting the entity. Only used if "movement_type" is "waves".
big_wave_speedDecimal10Multiplier for the speed to make a big wave. Triggered depending on "big_wave_probability".
liquid_blocksList of object or text[]List of blocks this entity can float on. Must be a liquid block.
drag_down_on_buoyancy_removedDecimal0How much an entity will be dragged down when the component is removed.
can_auto_step_from_liquidBooleanfalseWhether 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