Skip to content

LookAtPlayerGoal 5.46.0 ​

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

Extends Goal

Looks at a nearby player for a few seconds (vanilla behavior.look_at_player).

Properties ​

$mob ​

php
public \pocketmine\entity\Mob $mob

$probability ​

php
public float $probability

$range ​

php
public float $range

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Mob $mob, float $range = 6.0, float $probability = 0.02)

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.