Skip to content

Husk 5.46.0 ​

class · pocketmine\entity\monster\Husk · source

Extends Zombie

Bedrock values (husk.json): a zombie that doesn't burn in daylight and gives Hunger for 30 seconds with its hits. After 30 seconds underwater it starts converting and becomes a zombie 15 seconds later. Loot as zombies.

Camel husk riders (spawn_as_rider, family "husk_rider"): the husks spawned riding a camel husk hold an iron spear (zombie_rider_equipment; dropped like spawned equipment) and drop loot_tables/entities/husk_rider.json. Only they (and players and parched) may ride camel husks.

Constants ​

CONVERSION_TICKS ​

php
public const CONVERSION_TICKS = 300

HUNGER_TICKS ​

php
public const HUNGER_TICKS = 600

TAG_CAMEL_HUSK_RIDER ​

php
public const TAG_CAMEL_HUSK_RIDER = "CamelHuskRider"

TAG_CONVERSION_TICKS ​

php
public const TAG_CONVERSION_TICKS = "ConversionTicks"

TAG_UNDERWATER_TICKS ​

php
public const TAG_UNDERWATER_TICKS = "UnderwaterTicks"

UNDERWATER_TICKS_BEFORE_CONVERSION ​

php
public const UNDERWATER_TICKS_BEFORE_CONVERSION = 600

Methods ​

attackMelee() ​

php
public function attackMelee(\pocketmine\entity\Living $target, float $baseDamage) : bool

burnsInDaylight() ​

php
public function burnsInDaylight() : bool

canBreathe() ​

php
public function canBreathe() : bool

entityBaseTick() protected ​

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

getDrops() ​

php
public function getDrops() : array

getName() ​

php
public function getName() : string

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

getPickedItem() ​

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

initEntity() protected ​

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

isCamelHuskRider() ​

php
public function isCamelHuskRider() : bool

Whether this husk is a camel husk rider (vanilla family "husk_rider"), which may ride camel husks.

isConverting() ​

php
public function isConverting() : bool

saveNBT() ​

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

setCamelHuskRider() ​

php
public function setCamelHuskRider(bool $rider) : void

Makes this husk a camel husk rider (vanilla spawn_as_rider: an adult with an iron spear), or a normal husk.

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.