minecraft:buoyant for you with a switch.Get GodCraftOverview
minecraft:buoyant is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Makes the entity float on top of liquids such as water, the way boats do. You can also make it rock on waves.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
apply_gravity | Boolean | "true" | Pulls the entity down every tick, which makes wave motion stronger but also makes it fall harder out of liquid. |
base_buoyancy | Decimal | "1.0" | How strongly the entity floats up; higher values float higher. |
big_wave_probability | Decimal | "0.03" | Chance of a big wave hitting the entity, only used with the "waves" movement type. |
big_wave_speed | Decimal | "10.0" | Speed multiplier for big waves. |
can_auto_step_from_liquid | Boolean | "false" | Lets the entity climb out of the liquid onto a solid block next to it when pushed against it. |
drag_down_on_buoyancy_removed | Decimal | "0.0" | How hard the entity is pulled down when this component is taken away. |
liquid_blocks | List | none | Liquid blocks the entity can float on. |
movement_type | String | "waves" | The kind of up and down motion: "waves", "bobbing" or "none". |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:buoyant": {
"apply_gravity": "true",
"base_buoyancy": "1.0",
"big_wave_probability": "0.03",
"big_wave_speed": "10.0",
"can_auto_step_from_liquid": "false",
"drag_down_on_buoyancy_removed": "0.0",
"liquid_blocks": {},
"movement_type": "waves"
}
}