Skip to content

CamelHusk 5.46.0 ​

class · pocketmine\entity\animal\CamelHusk · source

Extends Mob
Implements Undead

Camel husk (Bedrock values, camel_husk.json): an undead camel of the desert, 32 health, 1.7x2.375 (0.945 tall when sitting), movement 0.09 (strolls at 2x), takes 4 less fall damage. Tempted by rabbit's feet, which also heal it (2 health). Never attacks. Sits down from time to time (1 in 1000 per tick). Loot: 2-3 rotten flesh (+0-1 per Looting level), and its saddle. Experience 1-3.

Riding (see CamelTrait): two seats, for players, parched and camel husk riders (Husk::isCamelHuskRider()); a saddle (shears take it off) lets the front player steer it and dash. Naturally spawned camel husks come with a husk rider holding an iron spear in front and a parched behind (spawn_with_rider, see \pocketmine\entity\riding\Jockeys::spawnCamelHuskRiders()). While a hostile rider is on it, it can't be saddled nor tempted, and it carries its riders to their target at 4x (behavior.mount_pathing).

Methods ​

attack() ​

php
public function attack(\pocketmine\event\entity\EntityDamageEvent $source) : void

calculateFallDamage() protected ​

php
protected function calculateFallDamage(float $fallDistance) : float

canBeRiddenBy() ​

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

canBreathe() ​

php
public function canBreathe() : bool

entityBaseTick() protected ​

php
protected function entityBaseTick(int $tickDiff = 1) : bool

getDrops() ​

php
public function getDrops() : array

getInitialSizeInfo() protected ​

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

getItemInteractButtonText() protected ​

php
protected function getItemInteractButtonText(\pocketmine\player\Player $player, \pocketmine\item\Item $item) : ?string

getName() ​

php
public function getName() : string

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

getPickedItem() ​

php
public function getPickedItem() : ?\pocketmine\item\Item

getRideableSeats() ​

php
public function getRideableSeats() : array

getXpDropAmount() ​

php
public function getXpDropAmount() : int

handleRiderInput() ​

php
public function handleRiderInput(\pocketmine\player\Player $rider, \pocketmine\entity\riding\RiderInput $input) : void

hasHostileRider() ​

php
public function hasHostileRider() : bool

Whether a mob (a husk or parched rider) rides it: vanilla camel_husk_with_hostile_rider, which takes away its saddle slot and tempting until all riders got off.

initEntity() protected ​

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

onInteractWithItem() protected ​

php
protected function onInteractWithItem(\pocketmine\player\Player $player, \pocketmine\item\Item $item) : bool

onPassengerAdded() protected ​

php
protected function onPassengerAdded(\pocketmine\entity\Entity $passenger) : void

registerGoals() protected ​

php
protected function registerGoals() : void

saveNBT() ​

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

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.