Nearest Prioritized Attackable Target¶
文档版本:1.21.50.25
Allows the mob to check for and pursue the nearest valid target.
架构¶
nearest_prioritized_attackable_target:
{
priority "priority"
entity_types "entity_types"
integer "attack_interval" : opt
number "cooldown" : opt
boolean "must_reach" : opt
boolean "must_see" : opt
number "must_see_forget_duration" : opt
number "persist_time" : opt
boolean "reselect_targets" : opt
boolean "reevaluate_description" : opt
integer "scan_interval" : opt
boolean "set_persistent" : opt
number "target_search_height" : opt
number "within_radius" : opt
}
priority:priority
entity_types:entity_types- List of entity types that this mob considers valid targets
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>filters:filters- 一个过滤器组。
cooldown:number- The amount of time in seconds that the mob has to wait before selecting a target of the same type again
max_dist:number- Maximum distance this mob can be away to be a valid choice.
max_height:number- UNDOCUMENTED.
max_flee:number- UNDOCUMENTED.
priority:number- UNDOCUMENTED.
within_default:number- UNDOCUMENTED.
check_if_outnumbered:boolean- UNDOCUMENTED.
must_see:boolean- If true, the mob has to be visible to be a valid choice.
must_see_forget_duration:number- 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_description:boolean- If true, the mob will stop being targeted if it stops meeting any conditions.
sprint_speed_multiplier:number- Multiplier for the running speed. A value of 1.0 means the speed is unchanged
walk_speed_multiplier:number- 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
}
attack_interval:integer- Time in seconds before selecting a target.
cooldown:number- The amount of time in seconds that the mob has to wait before selecting a target of the same type again
must_reach:boolean- If true, only entities that this mob can path to can be selected as targets.
must_see:boolean- If true, only entities in this mob's viewing range can be selected as targets.
must_see_forget_duration:number- 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.
persist_time:number- Time in seconds for a valid target to stay targeted when it becomes and invalid target.
reselect_targets:boolean- If true, the target will change to the current closest entity whenever a different entity is closer.
reevaluate_description:boolean- If true, the mob will stop being targeted if it stops meeting any conditions.
scan_interval:integer- How many ticks to wait between scanning for a target.
set_persistent:boolean- Allows the actor to be set to persist upon targeting a player.
target_search_height:number- Height in blocks to search for a target mob. -1.0f means the height does not matter.
within_radius:number- Distance in blocks that the target can be within to launch an attack.