minecraft:behavior.jump_around_target for you with a switch.Get GodCraftOverview
minecraft:behavior.jump_around_target 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 leap over or around its target to land behind it, like a breeze.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
filters | Filter Group | {"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null} | Conditions that must pass before the mob jumps. |
jump_cooldown_duration | number | 0.5 | Seconds to wait before jumping again. |
jump_cooldown_when_hurt_duration | number | 0.1 | Seconds to wait before jumping again if the mob was hurt recently. |
last_hurt_duration | number | 2 | If the mob was hurt within this many seconds, the hurt cooldown is used instead. |
prepare_jump_duration | number | 0.5 | Seconds the mob crouches before jumping. |
max_jump_velocity | number | 1.4 | The fastest speed a jump can start with. |
check_collision | boolean | false | If true, blocks in the jump path are checked. This costs more performance, so use it with care. |
entity_bounding_box_scale | number | 0.7 | Shrinks or grows the mob's hitbox during the jump. Smaller values help it avoid hitting blocks. |
line_of_sight_obstruction_height_ignore | integer | 4 | Obstacles lower than this many blocks are ignored when checking if the mob can see its target. |
valid_distance_to_target | FloatRange | {"max":20,"min":4} | Closest and farthest the target can be for a jump. |
landing_position_spread_degrees | integer | 90 | How wide, in degrees, the landing spot behind the target can vary. 0 lands straight behind it. |
landing_distance_from_target | FloatRange | {"max":8,"min":4} | Closest and farthest the landing spot can be from the target. |
required_vertical_space | integer | 4 | How many air blocks are needed above the mob's head to jump. |
snap_to_surface_block_range | integer | 10 | How many blocks above and below the landing spot are checked to find ground. |
jump_angles | number[] | [40,55,60,75,80] | Jump angles in degrees the mob can use, picked in random order. |
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.jump_around_target": {
"filters": {
"AND": null,
"NOT": null,
"OR": null,
"all": null,
"all_of": null,
"any": null,
"any_of": null,
"none_of": null
},
"jump_cooldown_duration": 0.5,
"jump_cooldown_when_hurt_duration": 0.1,
"last_hurt_duration": 2,
"prepare_jump_duration": 0.5,
"max_jump_velocity": 1.4,
"check_collision": false,
"entity_bounding_box_scale": 0.7
}
}