Skip to content

HurtByTargetGoal 5.46.0 ​

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

Extends Goal

Targets whoever hurt the mob (vanilla behavior.hurt_by_target).

Properties ​

$ignoredAttackers ​

php
public array $ignoredAttackers

$mob ​

php
public \pocketmine\entity\Mob $mob

$range ​

php
public float $range

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Mob $mob, float $range = 32.0, array $ignoredAttackers = [])

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

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.