Skip to content

FollowCaravanGoal 5.47.0 ​

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

Extends Goal

Llama caravans (Bedrock behavior.follow_caravan of llamas off a lead, Java LlamaFollowCaravanGoal): a llama joins the end of a caravan within 9 blocks (4 up or down), or the end of a llama on a lead, as long as a llama on a lead leads it within the caravan's length; it then walks to 2 blocks behind the llama ahead. Beyond 26 blocks it speeds up (x1.2, up to 3x) and gives up after 2 seconds more at full speed.

Looking for a caravan to join scans the llamas around, so it is done every 2 seconds only, by llamas off a lead and not in a caravan.

Constants ​

SEARCH_INTERVAL ​

php
public const SEARCH_INTERVAL = 40

Ticks between two looks for a caravan to join.

Properties ​

$entityCount ​

php
public int $entityCount

$llama ​

php
public \pocketmine\entity\animal\Llama $llama

$speedMultiplier ​

php
public float $speedMultiplier

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\animal\Llama $llama, float $speedMultiplier = 2.1, int $entityCount = 10)

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. Not affiliated with the PMMP team or Mojang.