Skip to content

TemptGoal 5.46.0 ​

class · pocketmine\entity\ai\goal\TemptGoal · source

Extends Goal

Follows a player holding a food item the mob likes (vanilla behavior.tempt).

Properties ​

$isTemptItem ​

php
public \Closure $isTemptItem

$mob ​

php
public \pocketmine\entity\Mob $mob

$speedMultiplier ​

php
public float $speedMultiplier

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Mob $mob, float $speedMultiplier, \Closure $isTemptItem)

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.