minecraft:behavior.float_wander

Allows the mob to float around like the Ghast.

Properties

PropertyTypeDefaultWhat it does
xz_distInteger10Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1
y_distInteger7Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1
y_offsetDecimal0Height in blocks to add to the selected target position
must_reachBooleanfalseIf true, the point has to be reachable to be a valid target
random_reselectBooleanfalseIf true, the mob will randomly pick a new point while moving to the previously selected one
use_home_position_restrictionBooleantrueIf 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_durationObject{"max": 0, "min": 0}Range of time in seconds the mob will float around before landing and choosing to do something else
minDecimal0
maxDecimal0
float_wander_has_move_controlBooleantrueIf 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_distInteger8The 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_distInteger8The 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_bufferBooleanfalseIf 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_surfaceBooleanfalseIf true, will prioritize finding random positions in the vicinity of surfaces, i.e. blocks that are not Air or Liquid.
allow_navigating_through_liquidsBooleanfalseIf true allows the mob to navigate through liquids on its way to the target position.
priorityIntegermin 00
control_flagsList 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