跳转至

Swim With Entity

文档版本:1.21.0.24

Allows the entity follow another entity. Both entities must be swimming and in water.

架构

swim_with_entity:
{
  priority "priority"
  speed_multiplier "speed_multiplier"
  number "success_rate" : opt
  number "chance_to_stop" : opt
  number "state_check_interval" : opt
  number "catch_up_threshold" : opt
  number "match_direction_threshold" : opt
  number "catch_up_multiplier" : opt
  number "search_range" : opt
  number "stop_distance" : opt
  entity_types "entity_types"
}
prioritypriority
priority:
integer
speed_multiplierspeed_multiplier
speed_multiplier:
number
success_ratenumber
Percent chance to start following another entity, if not already doing so. 1.0 = 100%
chance_to_stopnumber
Percent chance to stop following the current entity, if they're riding another entity or they're not swimming. 1.0 = 100%
state_check_intervalnumber
Time (in seconds) between checks to determine if this entity should catch up to the entity being followed or match the direction of the entity being followed.
catch_up_thresholdnumber
Distance, from the entity being followed, at which this entity will speed up to reach that entity.
match_direction_thresholdnumber
Distance, from the entity being followed, at which this entity will try to match that entity's direction.
catch_up_multipliernumber
The multiplier this entity's speed is modified by when matching another entity's direction.
search_rangenumber
Radius around this entity to search for another entity to follow.
stop_distancenumber
Distance, from the entity being followed, at which this entity will stop following that entity.
entity_typesentity_types
Filters which determine what entites are valid to follow.
entity_types:
array
{
  object "<any array element>" : opt
  {
    filters "filters"
    number "cooldown" : opt
    number "max_dist" : opt
    number "max_height" : opt
    number "max_flee" : opt
    number "priority" : opt
    number "within_default" : opt
    boolean "check_if_outnumbered" : opt
    boolean "must_see" : opt
    number "must_see_forget_duration" : opt
    boolean "reevaluate_description" : opt
    number "sprint_speed_multiplier" : opt
    number "walk_speed_multiplier" : opt
  }
}
<any array element>object
The entity type.
<any array element>
filtersfilters
一个过滤器组
cooldownnumber
The amount of time in seconds that the mob has to wait before selecting a target of the same type again
max_distnumber
Maximum distance this mob can be away to be a valid choice.
max_heightnumber
UNDOCUMENTED.
max_fleenumber
UNDOCUMENTED.
prioritynumber
UNDOCUMENTED.
within_defaultnumber
UNDOCUMENTED.
check_if_outnumberedboolean
UNDOCUMENTED.
must_seeboolean
If true, the mob has to be visible to be a valid choice.
must_see_forget_durationnumber
Determines the amount of time in seconds that this mob will look for a target before forgetting about it and looking for a new one when the target isn't visible any more.
reevaluate_descriptionboolean
If true, the mob will stop being targeted if it stops meeting any conditions.
sprint_speed_multipliernumber
Multiplier for the running speed. A value of 1.0 means the speed is unchanged
walk_speed_multipliernumber
Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
entity_types:
{
  filters "filters"
  number "cooldown" : opt
  number "max_dist" : opt
  number "max_height" : opt
  number "max_flee" : opt
  number "priority" : opt
  number "within_default" : opt
  boolean "check_if_outnumbered" : opt
  boolean "must_see" : opt
  number "must_see_forget_duration" : opt
  boolean "reevaluate_description" : opt
  number "sprint_speed_multiplier" : opt
  number "walk_speed_multiplier" : opt
}