Skip to content

ZombifiesOutsideNetherTrait 5.46.0 ​

trait · pocketmine\entity\monster\ZombifiesOutsideNetherTrait · source

Piglins, piglin brutes and hoglins turn into their zombified version after 15 seconds outside the Nether (vanilla zombification_sensor + 15 s timer); going back to the Nether resets the timer. Mobs flagged immune (Java NBT IsImmuneToZombification, e.g. set by map makers) never zombify.

The using class calls ZombifiesOutsideNetherTrait::tickZombification() every tick, loads and saves the immunity flag and implements ZombifiesOutsideNetherTrait::zombify().

Methods ​

getOutsideNetherTicks() ​

php
public function getOutsideNetherTicks() : int

getZombificationTicks() ​

php
public static function getZombificationTicks() : int

isImmuneToZombification() ​

php
public function isImmuneToZombification() : bool

isZombifying() ​

php
public function isZombifying() : bool

Whether the mob is shaking because it is about to zombify (client: query.is_shaking).

loadZombificationImmunity() protected ​

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

saveZombificationImmunity() protected ​

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

setImmuneToZombification() ​

php
public function setImmuneToZombification(bool $immune) : void

tickZombification() protected ​

php
protected function tickZombification(int $tickDiff) : void

zombify() protected ​

php
abstract protected function zombify() : void

Replaces the mob with its zombified version.

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