Skip to content

OwnerHurtByTargetGoal 5.46.0 ​

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

Extends Goal

A tamed animal attacks whoever hurt its owner (vanilla behavior.owner_hurt_by_target), or, with $ownerAttacks, what its owner attacked (behavior.owner_hurt_target).

Properties ​

$animal ​

php
public \pocketmine\entity\animal\TameableAnimal $animal

$ownerAttacks ​

php
public bool $ownerAttacks

$range ​

php
public float $range

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\animal\TameableAnimal $animal, bool $ownerAttacks = false, float $range = 32.0)

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.