编辑

Entity Documentation - minecraft:behavior.random_hover

Allows the mob to hover around randomly, close to the surface.

Entity Random Hover Behavior Properties

Name Default Value Type Description Example Values
control_flags [] Control Flags choices
hover_height {"max":0,"min":0} Hover Height item The height above the surface which the mob will try to maintain Allay: [1,4]
interval 120 Integer number A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal Allay: 1
priority 0 Integer number As priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal. Allay: 9
speed_multiplier 1 Decimal number Movement speed multiplier of the mob when using this AI Goal
xz_dist 10 Integer number Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1 Allay: 8
y_dist 7 Integer number Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1 Allay: 8
y_offset 0 Decimal number Height in blocks to add to the selected target position Allay: -1

Control Flags choices

Value Title Description
jump Jump
look Look
move Move

Item IntRange

Specifies an integer range between minimum and maximum values for item properties requiring whole numbers. Used for stack count variations, discrete charge levels, or quantity ranges in loot tables. Ensures values stay within valid bounds for countable item properties.

Item IntRange Properties

JSON path: hover_height

Name Default Value Type Description
max 0 Integer number
min 0 Integer number

Samples

Allay

"minecraft:behavior.random_hover": {
  "hover_height": [
    1,
    4
  ],
  "y_dist": 8,
  "interval": 1,
  "xz_dist": 8,
  "priority": 9,
  "y_offset": -1
}