Skip to content

WorkAtJobSiteGoal 5.46.0 ​

class · pocketmine\entity\ai\villager\WorkAtJobSiteGoal · source

Extends VillagerGoal

Walks to the claimed job site during working hours and works there (vanilla behavior.work / work_composter: speed 0.5, active_time 250 ticks, goal_cooldown 200 ticks). Arriving at the job site restocks the trades (on_arrival resupply_trades, see \pocketmine\entity\npc\VillagerV2::onArriveAtWork()). Like vanilla, villagers stop working in the rain and go home (see \pocketmine\entity\npc\VillagerSchedule).

Constants ​

SPEED ​

php
public const SPEED = 0.5

Methods ​

canContinue() ​

php
public function canContinue() : bool

canStart() ​

php
public function canStart() : bool

getFlags() ​

php
public function getFlags() : int

start() ​

php
public function start() : void

stop() ​

php
public function stop() : void

tick() ​

php
public function tick() : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.