Skip to content

ShareFoodGoal 5.46.0 ​

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

Extends VillagerGoal

A villager with a surplus of food (6 bread, or 24 carrots, potatoes or beetroots) walks to a villager that needs some and throws it half of the stack (vanilla behavior.share_items, priority 10, speed 0.5, max_dist 3). The other villager picks it up.

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.