VillagerGoal 5.46.0
Extends Goal
Base of the villager schedule goals: walking to a block (bed, job site, bell, crop).
Properties
$villager
php
public \pocketmine\entity\npc\VillagerV2 $villagerMethods
__construct()
php
public function __construct(\pocketmine\entity\npc\VillagerV2 $villager)isNear() protected
php
protected function isNear(\pocketmine\math\Vector3 $block, float $reach) : boolWhether the villager stands within $reach blocks (horizontally, and 2 blocks vertically) of the centre of the block.
walkTo() protected
php
protected function walkTo(\pocketmine\math\Vector3 $block, float $speed, float $reach) : boolKeeps walking towards the block (a new path is requested once the last one ended). Returns true once within $reach of it.
