Skip to content

Llama 5.46.0 ​

class · pocketmine\entity\animal\Llama · source

Extends AbstractHorse

Bedrock values (entities/llama.json): 15-30 health, movement 0.25, 0.9x1.87, follow range 40. Spits (1 damage, every 2 seconds) at whoever hurts it and at untamed wolves within 10 blocks; wolves run away from llamas. Tempted and bred (tamed) with hay bales; wheat and hay heal it and make babies grow. Coat VARIANT 0-3 (creamy, white, brown, gray); strength 1-5 (STRENGTH, Java odds). A tamed adult wears a wool carpet (decor, in the saddle slot of its inventory, shown in the body slot) and takes a chest of 3 slots per strength (vanilla additional_slots_per_strength, see AbstractHorse). Caravans (leash following) are not implemented: there are no leads yet. Loot (loot_tables/entities/llama.json): 0-2 leather (+0-1 per Looting level); XP 1-3.

Constants ​

TAG_STRENGTH ​

php
public const TAG_STRENGTH = "Strength"

TAG_VARIANT ​

php
public const TAG_VARIANT = "Variant"

Methods ​

acceptsInEquipSlot() protected ​

php
protected function acceptsInEquipSlot(\pocketmine\item\Item $item) : bool

breedsWith() protected ​

php
protected function breedsWith(\pocketmine\entity\animal\Animal $other) : bool

canBeRiddenBy() ​

php
public function canBeRiddenBy(\pocketmine\entity\Entity $entity) : bool

canHaveChest() ​

php
public function canHaveChest() : bool

canWearSaddle() ​

php
public function canWearSaddle() : bool

createBaby() protected ​

php
protected function createBaby(\pocketmine\entity\animal\Animal $partner, \pocketmine\entity\Location $location) : \pocketmine\entity\animal\Animal

getBodyItem() ​

php
public function getBodyItem() : \pocketmine\item\Item

getCarpet() ​

php
public function getCarpet() : \pocketmine\item\Item

Returns the carpet worn (air if none).

getChestSize() ​

php
public function getChestSize() : int

getCoat() ​

php
public function getCoat() : int

getContainerSlotsPerStrength() protected ​

php
protected function getContainerSlotsPerStrength() : int

getEquipSound() protected ​

php
protected function getEquipSound(int $slot, \pocketmine\item\Item $item) : string

getFood() protected ​

php
protected function getFood(\pocketmine\item\Item $item) : ?array

getInitialSizeInfo() protected ​

php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfo

getName() ​

php
public function getName() : string

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

getRiderSeat() protected ​

php
protected function getRiderSeat() : \pocketmine\entity\riding\RideableSeat

getStrength() ​

php
public function getStrength() : int

initEntity() protected ​

php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : void

isCarpet() ​

php
public static function isCarpet(\pocketmine\item\Item $item) : bool

Whether the item is a wool carpet (llama decor; moss carpets are not).

isTemptItem() protected ​

php
protected function isTemptItem(\pocketmine\item\Item $item) : bool

randomStats() protected ​

php
protected function randomStats() : array

registerGoals() protected ​

php
protected function registerGoals() : void

saveNBT() ​

php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTag

setCarpet() ​

php
public function setCarpet(\pocketmine\item\Item $carpet) : void

setCoat() ​

php
public function setCoat(int $coat) : void

setStrength() ​

php
public function setStrength(int $strength) : void

spitAt() ​

php
public function spitAt(\pocketmine\entity\Living $target, float $distance) : void

syncNetworkData() protected ​

php
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.