PickupItemsGoal 5.47.0
Extends VillagerGoal
Walks to a wanted item lying a few blocks away (vanilla behavior.pickup_items: priority 4, max_dist 3, speed 0.5). The item is found by the villager's pickup scan (every 10 ticks, see \pocketmine\entity\npc\VillagerV2::getPickupTarget()), which also picks it up once it is within reach.
Constants
SPEED
php
public const SPEED = 0.5Methods
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