LookControl 5.46.0
Turns the mob's head (head yaw and pitch) towards a point. The look target must be set again every tick (by the goal that wants it); otherwise the head turns back to face forward. The body follows the head when the head turns too far.
Methods
__construct()
php
public function __construct(\pocketmine\entity\Mob $mob)hasWanted()
php
public function hasWanted() : boolsetLookAt()
php
public function setLookAt(float $x, float $y, float $z, float $yawSpeed = 10.0, float $pitchSpeed = 40.0) : voidsetLookAtEntity()
php
public function setLookAtEntity(\pocketmine\entity\Entity $entity, float $yawSpeed = 10.0, float $pitchSpeed = 40.0) : voidtick()
php
public function tick() : void