minecraft:behavior.move_around_target

Allows an entity to move around a target.If the entity is too close(i.e.closer than destination range min and height difference limit) it will try to move away from its target.If the entity is too far away from its target it will try to move closer to a random position within the destination range.A randomized amount of those positions will be behind the target, and the spread can be tweaked with 'destination_pos_spread_degrees'.

Properties

PropertyTypeDefaultWhat it does
destination_position_rangeObject{"max": 8, "min": 4}The range of distances from the target entity within which the goal should look for a position to move the owner entity to.
minDecimal0
maxDecimal0
movement_speedDecimal0.6The speed with which the entity should move to its target position.
destination_pos_spread_degreesDecimal90This angle (in degrees) is used for controlling the spread when picking a destination position behind the target. A zero spread angle means the destination position will be straight behind the target with no variance. A 90 degree spread angle means the destination position can be up to 45 degrees to the left and to the right of the position straight behind the target's view direction.
filtersObject or List of object{"AND": null, "NOT": null, "OR": null, "all": null, "all_…Conditions that need to be met for the behavior to start.
testText—The name of the test to apply.
subjectBoolean or Integer or Decimal or Text—The subject of this filter test.
operatorBoolean or Integer or Decimal or Text—The comparison to apply with 'value'.
domainBoolean or Integer or Decimal or Text—The domain the test should be performed in.
valueBoolean or Integer or Decimal or Text—The value being compared with the test.
height_difference_limitDecimalmin 010Distance in height (in blocks) between the owner entity and the target has to be less than this value when owner checks if it is too close and should move away from the target. This value needs to be bigger than zero for the move away logic to trigger.
horizontal_search_distanceIntegermin 05Horizontal search distance (in blocks) when searching for a position to move away from target.
vertical_search_distanceIntegermin 05Vertical search distance (in blocks) when searching for a position to move away from target.
priorityIntegermin 00
control_flagsList of text[]

Example from the game files

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

{
  "minecraft:behavior.move_around_target": {
    "destination_pos_spread_degrees": 360,
    "destination_position_range": {
      "min": 4.0,
      "max": 8.0
    },
    "priority": 3,
    "filters": {
      "all_of": [
        {
          "test": "on_ground",
          "value": true
        },
        {
          "operator": "<=",
          "test": "target_distance",
          "subject": "self",
          "value": 24.0
        }
      ]
    },
    "height_difference_limit": 0,
    "movement_speed": 1.2
  }
}

Used by 1

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

Related components