Skip to content

CroakGoal 5.47.0 ​

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

Extends Goal

Stands still and croaks from time to time (vanilla behavior.croak, frogs: every 10-20 seconds for 4.5 seconds, not in water or lava, CROAKING flag). The mob stands still while it croaks (it stops goals of a lower priority, like strolling).

Properties ​

$durationTicks ​

php
public int $durationTicks

$maxIntervalTicks ​

php
public int $maxIntervalTicks

$minIntervalTicks ​

php
public int $minIntervalTicks

$mob ​

php
public \pocketmine\entity\Mob $mob

$onCroakingChanged ​

php
public \Closure $onCroakingChanged

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Mob $mob, \Closure $onCroakingChanged, int $minIntervalTicks = 200, int $maxIntervalTicks = 400, int $durationTicks = 90)

canContinue() ​

php
public function canContinue() : bool

canStart() ​

php
public function canStart() : bool

getFlags() ​

php
public function getFlags() : int

resetInterval() ​

php
public function resetInterval() : void

Makes the mob croak at the next goal evaluation it can (tests, plugins).

start() ​

php
public function start() : void

stop() ​

php
public function stop() : void

VanillaMine is a fork of PocketMine-MP. Not affiliated with the PMMP team or Mojang.