FollowCaravanGoal 5.47.0
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 = 40Ticks 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 $speedMultiplierMethods
__construct()
php
public function __construct(\pocketmine\entity\animal\Llama $llama, float $speedMultiplier = 2.1, int $entityCount = 10)canContinue()
php
public function canContinue() : boolcanStart()
php
public function canStart() : boolgetFlags()
php
public function getFlags() : intstart()
php
public function start() : voidstop()
php
public function stop() : voidtick()
php
public function tick() : void