IronGolemMoveThroughVillageGoal 5.47.0
Extends Goal
At night an iron golem in a village patrols it, walking from one point of interest (bed, bell, job site) to the nearest one it didn't visit lately (vanilla behavior.move_through_village: only_at_night, speed 0.6, priority 3; Java MoveThroughVillageGoal remembers the last 15 places).
The village comes from IronGolem::getVillage(), refreshed every few seconds; the goal itself tries at most once every two seconds.
Constants
SPEED
php
public const SPEED = 0.6Methods
__construct()
php
public function __construct(\pocketmine\entity\golem\IronGolem $golem)canContinue()
php
public function canContinue() : boolcanStart()
php
public function canStart() : boolgetFlags()
php
public function getFlags() : intisNight()
php
public static function isNight(\pocketmine\world\World $world) : boolpickTarget()
php
public function pickTarget(\pocketmine\world\raid\Village $village, \pocketmine\math\Vector3 $from) : ?\pocketmine\math\Vector3Returns the nearest point of interest of the village not visited lately (forgetting them all once every one was visited).
start()
php
public function start() : voidstop()
php
public function stop() : void