Work¶
文档版本:1.21.50.25
Allows the NPC to use the POI.
架构¶
work:
{
priority "priority"
speed_multiplier "speed_multiplier"
integer "active_time" : opt
boolean "can_work_in_rain" : opt
integer "goal_cooldown" : opt
trigger "on_arrival"
integer "sound_delay_max" : opt
integer "sound_delay_min" : opt
integer "work_in_rain_tolerance" : opt
}
priority
:priority
speed_multiplier
:speed_multiplier
active_time
:integer- The amount of ticks the NPC will stay in their the work location.
can_work_in_rain
:boolean- If true, this entity can work when their jobsite POI is being rained on.
goal_cooldown
:integer- The amount of ticks the goal will be on cooldown before it can be used again.
on_arrival
:trigger- Event to run when the mob reaches their jobsite.
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>
sound_delay_max
:integer- The max interval in which a sound will play.
sound_delay_min
:integer- The min interval in which a sound will play.
work_in_rain_tolerance
:integer- If "can_work_in_rain" is false, this is the maximum number of ticks left in the goal where rain will not interrupt the goal