minecraft:behavior.circle_around_anchor for you with a switch.Get GodCraftOverview
minecraft:behavior.circle_around_anchor is an entity component: it goes in the components object of a custom mob, or in one of its component groups. AI goal that makes the mob fly in circles around a point near its spot or its target, like a phantom.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
radius_change | number | 1 | Blocks added to the circle size when a size change happens. |
radius_adjustment_chance | number | 0.004 | Chance each time to change the circle size. 1 means 100%. |
height_adjustment_chance | number | 0.002857 | Chance each time to raise or lower the circle height. 1 means 100%. |
goal_radius | number | 0.5 | How close the mob must get to the point to count as there, which stops jittering. |
speed_multiplier | number | 1 | Speed multiplier while circling. |
angle_change | number | 15 | Degrees the mob turns each time it picks its next point. |
radius_range | FloatRange | {"max":15,"min":5} | Smallest and largest circle size allowed. |
height_offset_range | FloatRange | {"max":0,"min":0} | Lowest and highest height above or below the point allowed. |
height_above_target_range | FloatRange | {"max":0,"min":0} | How many blocks above a target the next point can be, used only while chasing a target. |
priority | integer | 0 | Lower numbers run first: when two goals compete, the one with the smaller priority wins.Range: 0 to … |
control_flags | Goal's control flags[] | none | Which body parts this goal takes over (move, look, jump), so goals using the same parts cannot run together. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:behavior.circle_around_anchor": {
"radius_change": 1,
"radius_adjustment_chance": 0.004,
"height_adjustment_chance": 0.002857,
"goal_radius": 0.5,
"speed_multiplier": 1,
"angle_change": 15,
"radius_range": {
"max": 15,
"min": 5
},
"height_offset_range": {
"max": 0,
"min": 0
}
}
}