Skip to content

PickupItemsGoal 5.47.0 ​

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

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.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. Not affiliated with the PMMP team or Mojang.