minecraft:behavior.swim_idle for you with a switch.Get GodCraftOverview
minecraft:behavior.swim_idle is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Lets a swimming mob stop and float in place for a short time. The mob must be in water.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
idle_time | number | 5 | How long, in seconds, the mob stays idle. |
success_rate | number | 0.1 | Chance from 0 to 1 that the mob goes idle. |
priority | integer | 0 | Decides which goal wins when several want to run: lower numbers run first.Range: 0 to … |
control_flags | Goal's control flags[] | none | Lists the body parts this goal takes control of (such as move, look or jump), so goals that need the same part don't run together. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:behavior.swim_idle": {
"idle_time": 5,
"success_rate": 0.1,
"priority": 0,
"control_flags": []
}
}