Skip to content

HopGoal 5.46.0 ​

class · pocketmine\entity\ai\hostile\goal\HopGoal · source

Extends Goal

AI of hopping mobs (vanilla slime_attack, slime_random_direction, slime_keep_on_jumping): hop towards the attack target (or a luring point, e.g. a player holding the food of a sulfur cube), otherwise hop in a random direction changed every 2-5 seconds.

Properties ​

$control ​

php
public \pocketmine\entity\ai\hostile\HopControl $control

$lure ​

php
public ?\Closure $lure

$mob ​

php
public \pocketmine\entity\Mob $mob

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Mob $mob, \pocketmine\entity\ai\hostile\HopControl $control, ?\Closure $lure = null)

canContinue() ​

php
public function canContinue() : bool

canStart() ​

php
public function canStart() : bool

getFlags() ​

php
public function getFlags() : int

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.