1. Wiki
  2. /Entities
  3. /minecraft:behavior.jump_to_block

minecraft:behavior.jump_to_block

Don't want to write this by hand? GodCraft sets minecraft:behavior.jump_to_block for you with a switch.Get GodCraft

Overview

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

FieldTypeDefaultDescription
search_widthinteger8Width in blocks of the search box around the mob, from 1 to 15.Range: 1 to 15
search_heightinteger10Height in blocks of the search box around the mob, from 1 to 15.Range: 1 to 15
minimum_path_lengthinteger5A block is only picked if the walking path to it is at least this long.
minimum_distanceinteger2A block is only picked if it is at least this far away.
scale_factornumber0.7Size multiplier for the mob's hitbox while it jumps.
max_velocitynumber1.5The fastest the mob can jump.
cooldown_rangeFloatRange{"max":20,"min":10}Random wait range in seconds between jump tries.
preferred_blocksItem Descriptor[]noneBlocks the mob likes to land on.
preferred_blocks_chancenumber1Chance, from 0.0 to 1.0, of choosing a preferred block when one is in range.Range: 0 to 1
forbidden_blocksItem Descriptor[]noneBlocks the mob will never jump onto.
priorityinteger0Lower numbers run first: when two goals compete, the one with the smaller priority wins.Range: 0 to …
control_flagsGoal's control flags[]noneWhich 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": []
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more