minecraft:behavior.random_fly

Allows a mob to randomly fly around.

Properties

PropertyTypeDefaultWhat it does
can_land_on_treesBooleantrueIf true, the mob can stop flying and land on a tree instead of the ground
speed_multiplierDecimal1Movement speed multiplier of the mob when using this AI Goal
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
priorityIntegermin 00
control_flagsList of text[]

Example from the game files

This is how vanilla Parrot uses it in Minecraft Bedrock 1.26.60.5:

{
  "minecraft:behavior.random_fly": {
    "priority": 3,
    "avoid_damage_blocks": true,
    "can_land_on_trees": true,
    "y_offset": 0,
    "speed_multiplier": 1.0,
    "xz_dist": 15,
    "y_dist": 1
  }
}

Used by 1

Vanilla entities with minecraft:behavior.random_fly in their definition:

Related components