跳转至

Jump Around Target

文档版本:1.21.50.25

Allows an entity to jump around a target.

架构

jump_around_target:
{
  priority "priority"
  boolean "check_collision" : opt
   "entity_bounding_box_scale" : opt
  array "jump_angles" : opt
  {
    number "<any array element>" : opt
  }
  number "jump_cooldown_duration" : opt
  number "jump_cooldown_when_hurt_duration" : opt
  vector_of_2_items "landing_distance_from_target"
  integer "landing_position_spread_degrees" : opt
  number "last_hurt_duration" : opt
  integer "line_of_sight_obstruction_height_ignore" : opt
  number "max_jump_velocity" : opt
  number "prepare_jump_duration" : opt
  integer "required_vertical_space" : opt
  integer "snap_to_surface_block_range" : opt
  vector_of_2_items "valid_distance_to_target"
  filters "filters"
}
prioritypriority
priority:
integer
check_collisionboolean
Enables collision checks when calculating the jump. Setting check_collision to true may affect performance and should be used with care.
entity_bounding_box_scale
Scaling temporarily applied to the entity's AABB bounds when jumping. A smaller bounding box reduces the risk of collisions during the jump. When check_collision is true it also increases the chance of being able to jump when close to obstacles.
jump_anglesarray
The jump angles in float degrees that are allowed when performing the jump. The order in which the angles are chosen is randomized.
jump_angles
<any array element>number
jump_cooldown_durationnumber
The time in seconds to spend in cooldown before this goal can be used again.
jump_cooldown_when_hurt_durationnumber
The time in seconds to spend in cooldown after being hurt before this goal can be used again.
landing_distance_from_targetvector_of_2_items
The range deciding how close to and how far away from the target the landing position can be when jumping.
vector_of_2_items:
array
{
  number "0..0" : opt
  number "1..1" : opt
}
0..0number
The X component.
1..1number
The Y component.
landing_position_spread_degreesinteger
This angle (in degrees) is used for controlling the spread when picking a landing position behind the target. A zero spread angle means the landing position will be straight behind the target with no variance. A 90 degree spread angle means the landing position can be up to 45 degrees to the left and to the right of the position straight behind the target's view direction.
last_hurt_durationnumber
If the entity was hurt within these last seconds, the jump_cooldown_when_hurt_duration will be used instead of jump_cooldown_duration.
line_of_sight_obstruction_height_ignoreinteger
If the entity's line of sight towards its target is obstructed by an obstacle with a height below this number, the obstacle will be ignored, and the goal will try to find a valid landing position.
max_jump_velocitynumber
Maximum velocity a jump can be performed at.
prepare_jump_durationnumber
The time in seconds to spend preparing for the jump.
required_vertical_spaceinteger
The number of blocks above the entity's head that has to be air for this goal to be usable.
snap_to_surface_block_rangeinteger
The number of blocks above and below from the jump target position that will be checked to find a surface to land on.
valid_distance_to_targetvector_of_2_items
Target needs to be within this range for the jump to happen.
filtersfilters
一个过滤器组。Conditions that need to be met for the behavior to start.