VillagerSchedule 5.46.0
The daily schedules of villager_v2.json ("minecraft:scheduler", hourly_clock_time = time of day, 0 = 6:00):
- work_schedule (employed adults; farmers, fishermen and librarians have their own work goals): work 0-8000, gather 8000-10000, work 10000-11000, home 11000-12000, sleep 12000-24000.
- basic_schedule (unemployed adults): the same with wander instead of work.
- jobless_schedule (nitwits): sleep 0-2000, wander 2000-13000, home 13000-14000, sleep 14000-24000.
- child_schedule (babies): play 0-11000, home 11000-12000, sleep 12000-24000.
Vanilla switches with a random delay of up to 10 seconds (max_delay_secs); here the switch is immediate.
Methods
getActivity()
php
public static function getActivity(int $timeOfDay, int $profession, bool $baby, bool $raining = false) : \pocketmine\entity\npc\VillagerActivityActivity of a villager at the given time of day. In the rain villagers go home instead of working, gathering, wandering or playing (they shelter at their bed).
