Sleep¶
文档版本:1.21.50.25
Allows mobs that own a bed to in a village to move to and sleep in it.
架构¶
sleep:
{
priority "priority"
speed_multiplier "speed_multiplier"
boolean "can_sleep_while_riding" : opt
number "cooldown_time" : opt
number "sleep_collider_height" : opt
number "sleep_collider_width" : opt
number "sleep_y_offset" : opt
number "timeout_cooldown" : opt
number "goal_radius" : opt
}
priority
:priority
speed_multiplier
:speed_multiplier
can_sleep_while_riding
:boolean- If true, the mob will be able to use the sleep goal if riding something.
cooldown_time
:number- Time in seconds the mob has to wait before using the goal again.
sleep_collider_height
:number- The height of the mob's collider while sleeping.
sleep_collider_width
:number- The width of the mob's collider while sleeping.
sleep_y_offset
:number- The y offset of the mob's collider while sleeping.
timeout_cooldown
:number- The cooldown time in seconds before the goal can be reused after a internal failure or timeout condition.
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