minecraft:behavior.move_to_liquid
Allows the mob to move into a liquid when on land.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
material_type | TextAny, Water, Lava | "any" | The material type of the liquid block to find. Valid values are "Any", "Water", and "Lava". |
search_range | Integer | 0 | The distance in blocks it will look for the liquid block to move towards |
search_height | Integer | 1 | Height in blocks the mob will look for the liquid block to move towards |
goal_radius | Decimal | 0.5 | Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot. |
search_count | Integermin 0 | 10 | The number of randomly selected blocks each tick that the mob will check within its search range and height for a valid block to move to. A value of 0 will have the mob check every block within range in one tick. |
speed_multiplier | Decimalmin 0 | 1 | Movement speed multiplier of the mob when using this goal. |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Strider uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.move_to_liquid": {
"priority": 7,
"search_range": 16,
"search_height": 10,
"goal_radius": 0.9,
"material_type": "Lava",
"search_count": 30
}
}Used by 1
Vanilla entities with minecraft:behavior.move_to_liquid in their definition:
Related components
behavior.floatbehavior.random_swimbehavior.swim_idlebehavior.swim_wanderbehavior.use_kinetic_weaponbehavior.move_to_waterbehavior.teleport_to_ownerbehavior.float_wanderbehavior.go_homebehavior.random_hoverbehavior.slime_floatbehavior.slime_keep_on_jumpingbehavior.slime_random_directionbehavior.move_to_landbehavior.move_to_random_blockbehavior.circle_around_anchorbehavior.dragonholdingpatternbehavior.dragonlandingbehavior.dragontakeoffbehavior.explore_outskirtsbehavior.find_underwater_treasurebehavior.move_to_blockbehavior.random_breachbehavior.random_fly