ZombifiesOutsideNetherTrait 5.46.0
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() : intgetZombificationTicks()
php
public static function getZombificationTicks() : intisImmuneToZombification()
php
public function isImmuneToZombification() : boolisZombifying()
php
public function isZombifying() : boolWhether 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) : voidsaveZombificationImmunity() protected
php
protected function saveZombificationImmunity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidsetImmuneToZombification()
php
public function setImmuneToZombification(bool $immune) : voidtickZombification() protected
php
protected function tickZombification(int $tickDiff) : voidzombify() protected
php
abstract protected function zombify() : voidReplaces the mob with its zombified version.
