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

minecraft:behavior.rise_to_liquid_level

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

Overview

minecraft:behavior.rise_to_liquid_level is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Keeps the mob floating at a set depth in a liquid, rising when too low and sinking when too high. Striders use it to stand on lava.

Fields

FieldTypeDefaultDescription
liquid_y_offsetnumber0How far below the liquid surface the mob tries to stay. Bigger values sit it lower.
rise_deltanumber0How much the mob moves up each tick when it is under the target height.
sink_deltanumber0How much the mob moves down each tick when it is above the target height.
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.rise_to_liquid_level": {
    "liquid_y_offset": 0,
    "rise_delta": 0,
    "sink_delta": 0,
    "priority": 0,
    "control_flags": []
  }
}

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