Skip to content

RandomStrollGoal 5.46.0 ​

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

Extends Goal

Walks to a random spot nearby from time to time (vanilla behavior.random_stroll).

Properties ​

$horizontalRange ​

php
public int $horizontalRange

$interval ​

php
public int $interval

$mob ​

php
public \pocketmine\entity\Mob $mob

$speedMultiplier ​

php
public float $speedMultiplier

$verticalRange ​

php
public int $verticalRange

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Mob $mob, float $speedMultiplier, int $interval = 120, int $horizontalRange = 10, int $verticalRange = 7)

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.