SleepInBedGoal 5.46.0
Extends VillagerGoal
Walks to the claimed bed at night and sleeps in it until morning (vanilla behavior.sleep, priority 3, speed 0.6, timeout cooldown 10 seconds). The villager wakes up when its schedule moves on, when it is hurt or when its bed is broken or used by a player. A villager that can't reach its bed before giving up releases it and looks for another one.
Constants
SPEED
php
public const SPEED = 0.6Methods
canContinue()
php
public function canContinue() : boolcanStart()
php
public function canStart() : boolgetFlags()
php
public function getFlags() : intstart()
php
public function start() : voidstop()
php
public function stop() : voidtick()
php
public function tick() : void