minecraft:behavior.jump_to_block for you with a switch.Get GodCraftOverview
minecraft:behavior.jump_to_block 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 hop to a random nearby block, like a frog jumping onto lily pads.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
search_width | integer | 8 | Width in blocks of the search box around the mob, from 1 to 15.Range: 1 to 15 |
search_height | integer | 10 | Height in blocks of the search box around the mob, from 1 to 15.Range: 1 to 15 |
minimum_path_length | integer | 5 | A block is only picked if the walking path to it is at least this long. |
minimum_distance | integer | 2 | A block is only picked if it is at least this far away. |
scale_factor | number | 0.7 | Size multiplier for the mob's hitbox while it jumps. |
max_velocity | number | 1.5 | The fastest the mob can jump. |
cooldown_range | FloatRange | {"max":20,"min":10} | Random wait range in seconds between jump tries. |
preferred_blocks | Item Descriptor[] | none | Blocks the mob likes to land on. |
preferred_blocks_chance | number | 1 | Chance, from 0.0 to 1.0, of choosing a preferred block when one is in range.Range: 0 to 1 |
forbidden_blocks | Item Descriptor[] | none | Blocks the mob will never jump onto. |
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_to_block": {
"search_width": 8,
"search_height": 10,
"minimum_path_length": 5,
"minimum_distance": 2,
"scale_factor": 0.7,
"max_velocity": 1.5,
"cooldown_range": {
"max": 20,
"min": 10
},
"preferred_blocks": []
}
}