Go Home¶
文档版本:1.21.50.25
Allows the mob to move back to the position they were spawned.
架构¶
go_home:
{
priority "priority"
speed_multiplier "speed_multiplier"
number "goal_radius" : opt
integer "interval" : opt
trigger "on_home"
array "on_failed" : opt
{
event "<any array element>"
}
number "calculate_new_path_radius" : opt
}
priority
:priority
speed_multiplier
:speed_multiplier
goal_radius
:number- Distance in blocks within the mob considers it has reached the goal. This is the
wiggle room
to stop the AI from bouncing back and forth trying to reach a specific spot
interval
:integer- A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal
on_home
:trigger- Event(s) to run when this mob gets home.
event
:string- The event to run when the conditions for this trigger are met.
filters
:filters- 一个过滤器组。The list of conditions for this trigger to execute.
target
:subject- The target of the event.
trigger:
array
{
object "<any array element>" : opt
{
string "event" : opt
filters "filters"
subject "target"
}
}
<any array element>
:object
<any array element>
on_failed
:array- Event(s) to run when this goal fails.
on_failed
<any array element>
:event
event
:string- The event to fire.
target
:string- The target of the event.
calculate_new_path_radius
:number- Distance in blocks that the mob is considered close enough to the end of the current path. A new path will then be calculated to continue toward home.