minecraft:behavior.random_hover
Allows the mob to hover around randomly, close to the surface.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
speed_multiplier | Decimal | 1 | Movement speed multiplier of the mob when using this AI Goal |
interval | Integer | 120 | A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal |
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 |
hover_height | Object | {"max": 0, "min": 0} | The height above the surface which the mob will try to maintain |
min | Integer | 0 | |
max | Integer | 0 | |
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.random_hover": {
"priority": 8,
"xz_dist": 8,
"y_dist": 8,
"y_offset": -1,
"interval": 1,
"hover_height": {
"min": 1,
"max": 4
}
}
}Used by 3
Vanilla entities with minecraft:behavior.random_hover 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.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