1. Wiki
  2. /Entities
  3. /minecraft:behavior.swim_idle

minecraft:behavior.swim_idle

Don't want to write this by hand? GodCraft sets minecraft:behavior.swim_idle for you with a switch.Get GodCraft

Overview

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

FieldTypeDefaultDescription
idle_timenumber5How long, in seconds, the mob stays idle.
success_ratenumber0.1Chance from 0 to 1 that the mob goes idle.
priorityinteger0Decides which goal wins when several want to run: lower numbers run first.Range: 0 to …
control_flagsGoal's control flags[]noneLists 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": []
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more