Skip to content

PanicGoal 5.46.0 ​

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

Extends Goal

Runs away at a higher speed after being hurt or while burning (vanilla behavior.panic).

Properties ​

$mob ​

php
public \pocketmine\entity\Mob $mob

$onlyWhen ​

php
public ?\Closure $onlyWhen

$speedMultiplier ​

php
public float $speedMultiplier

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Mob $mob, float $speedMultiplier, ?\Closure $onlyWhen = null)

canContinue() ​

php
public function canContinue() : bool

canStart() ​

php
public function canStart() : bool

getFlags() ​

php
public function getFlags() : int

shouldPanic() protected ​

php
protected function shouldPanic() : bool

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.