minecraft:behavior.float_wander
Allows the mob to float around like the Ghast.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
xz_dist | Integer | 10 | Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1 |
y_dist | Integer | 7 | Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1 |
y_offset | Decimal | 0 | Height in blocks to add to the selected target position |
must_reach | Boolean | false | If true, the point has to be reachable to be a valid target |
random_reselect | Boolean | false | If true, the mob will randomly pick a new point while moving to the previously selected one |
use_home_position_restriction | Boolean | true | If true, the mob will respect home position restrictions when choosing new target positions. If false, it will choose target position without considering home restrictions |
float_duration | Object | {"max": 0, "min": 0} | Range of time in seconds the mob will float around before landing and choosing to do something else |
min | Decimal | 0 | |
max | Decimal | 0 | |
float_wander_has_move_control | Boolean | true | If true, the MoveControl flag will be added to the behavior which means that it can no longer be active at the same time as other behaviors with MoveControl. |
surface_xz_dist | Integer | 8 | The horizontal distance in blocks that the goal will check for a surface from a candidate position. Only valid when `navigate_around_surface` is true. |
surface_y_dist | Integer | 8 | The vertical distance in blocks that the goal will check for a surface from a candidate position. Only valid when `navigate_around_surface` is true. |
additional_collision_buffer | Boolean | false | If true, the mob will have an additional buffer zone around it to avoid collisions with blocks when picking a position to wander to. |
navigate_around_surface | Boolean | false | If true, will prioritize finding random positions in the vicinity of surfaces, i.e. blocks that are not Air or Liquid. |
allow_navigating_through_liquids | Boolean | false | If true allows the mob to navigate through liquids on its way to the target position. |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Happy Ghast uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.float_wander": {
"priority": 7,
"must_reach": true,
"random_reselect": true,
"navigate_around_surface": true,
"additional_collision_buffer": true,
"allow_navigating_through_liquids": false,
"use_home_position_restriction": true,
"surface_xz_dist": 16,
"surface_y_dist": 16,
"float_duration": [
2.0,
7.0
]
}
}Used by 3
Vanilla entities with minecraft:behavior.float_wander in their definition:
Related components
behavior.floatbehavior.random_swimbehavior.swim_idlebehavior.swim_wanderbehavior.use_kinetic_weaponbehavior.move_to_waterbehavior.teleport_to_ownerbehavior.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.move_to_liquidbehavior.random_breachbehavior.random_fly