Zombie
Extends Monster
Implements Ageable
Bedrock values: 20 health, movement 0.23 (baby 0.35), attack 3 (scaled by difficulty), follow range 35, burns in daylight. 5% of naturally spawned zombies are babies (small, fast, 12 XP, never grow up). Loot: 0-2 rotten flesh (+0-1 per Looting level); when killed by a player, 2.5% (+1% per Looting level) chance of an iron ingot, carrot or potato.
Constants
ATTACK_DAMAGE 5.46.0
public const ATTACK_DAMAGE = 3.0FOLLOW_RANGE 5.46.0
public const FOLLOW_RANGE = 35.0TAG_IS_BABY 5.46.0
public const TAG_IS_BABY = "IsBaby"Methods
burnsInDaylight() 5.46.0
public function burnsInDaylight() : boolgetDrops()
public function getDrops() : arraygetInitialSizeInfo() protected
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetName()
public function getName() : stringgetNetworkTypeId()
public static function getNetworkTypeId() : stringgetPickedItem()
public function getPickedItem() : ?\pocketmine\item\ItemgetXpDropAmount()
public function getXpDropAmount() : intinitEntity() 5.46.0 protected
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidisBaby() 5.46.0
public function isBaby() : boolisVillageTarget() 5.46.0
public static function isVillageTarget(\pocketmine\entity\Living $entity) : boolWhether zombies (and husks, drowned and zombie villagers) hunt the entity besides players: villagers, wandering traders, iron golems and snow golems (Bedrock zombie.json nearest_attackable_target).
registerGoals() 5.46.0 protected
protected function registerGoals() : voidsaveNBT() 5.46.0
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagsetBaby() 5.46.0
public function setBaby(bool $baby) : voidsyncNetworkData() 5.46.0 protected
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : voidvillageTargetGoal() 5.46.0
public static function villageTargetGoal(\pocketmine\entity\Mob $mob) : \pocketmine\entity\ai\goal\NearestAttackableEntityGoalThe goal that makes zombie-like mobs target villagers and golems within 35 blocks. Villagers don't have to be seen (vanilla NearestAttackableTargetGoal(AbstractVillager, false)), so zombies find them behind walls and doors.
