Wither 5.46.0
Extends Monster
Implements Undead
Bedrock values (Mojang bedrock-samples behavior_pack/entities/wither.json and the Minecraft Wiki): health 300/450/600 (easy/normal/hard), 1x3 hitbox, flies, fire immune, takes no damage from undead mobs, boss bar within 55 blocks, drops a Nether star (which never despawns) and always 50 XP.
Summoned (or spawned from an egg) it is invulnerable for 11 seconds while its health fills up, then explodes (power 7). It hovers about 5 blocks above its target (players, then any living mob that isn't undead within 70 blocks) and fires volleys of three black skulls and a blue one from its heads, moving to a new spot between volleys. Below half health it explodes once, gets its armour (immune to arrows and tridents) and dashes at its target after every second volley, breaking blocks (not obsidian). When hurt it breaks the blocks around it a second later. Dying, it explodes again (power 7) before dropping its loot.
Constants
DASH_DAMAGE
public const DASH_DAMAGE = 15.0Base dash damage (8.5/15/22.5 by difficulty).
DASH_TICKS
public const DASH_TICKS = 30DEATH_TICKS
public const DEATH_TICKS = 40EXPLOSION_POWER
public const EXPLOSION_POWER = 7.0HOVER_HEIGHT
public const HOVER_HEIGHT = 5.0HUD_RANGE
public const HUD_RANGE = 55.0SHOT_INTERVAL
public const SHOT_INTERVAL = 10SPAWN_INVULNERABLE_TICKS
public const SPAWN_INVULNERABLE_TICKS = 220TARGET_RANGE
public const TARGET_RANGE = 70.0VOLLEY_PAUSE
public const VOLLEY_PAUSE = 40Methods
attack()
public function attack(\pocketmine\event\entity\EntityDamageEvent $source) : voidcanBreathe()
public function canBreathe() : boolcanDespawn()
public function canDespawn() : boolcanFreeze()
public function canFreeze() : boolendDeathAnimation() protected
protected function endDeathAnimation() : voidentityBaseTick() protected
protected function entityBaseTick(int $tickDiff = 1) : boolexplode()
public function explode() : voidgetBossBar()
public function getBossBar() : \pocketmine\entity\boss\BossBargetDrops()
public function getDrops() : arraygetHeadPosition()
public function getHeadPosition(int $head) : \pocketmine\math\Vector3Position of one of the three heads: 0 is the middle one, 1 and 2 the side heads.
getInitialDragMultiplier() protected
protected function getInitialDragMultiplier() : floatgetInitialGravity() protected
protected function getInitialGravity() : floatgetInitialSizeInfo() protected
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetInvulnerableTicks()
public function getInvulnerableTicks() : intgetName()
public function getName() : stringgetNetworkTypeId()
public static function getNetworkTypeId() : stringgetXpDropAmount()
public function getXpDropAmount() : inthasMovementUpdate()
public function hasMovementUpdate() : boolinitEntity() protected
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidisArmored()
public function isArmored() : boolisDashing()
public function isDashing() : boolisFireProof()
public function isFireProof() : boolisUndead()
public static function isUndead(?\pocketmine\entity\Entity $entity) : boolReturns whether the entity is undead (wither, zombie, skeleton or any mob implementing Undead).
isValidTarget()
public function isValidTarget(?\pocketmine\entity\Living $entity) : boolmaxHealthForDifficulty()
public static function maxHealthForDifficulty(int $difficulty) : intonDeath() protected
protected function onDeath() : voidonDispose() protected
protected function onDispose() : voidregisterGoals() protected
protected function registerGoals() : voidsaveNBT()
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagsetNameTag()
public function setNameTag(string $name) : voidshootSkull()
public function shootSkull(\pocketmine\math\Vector3 $at, bool $dangerous, int $head = 0) : ?\pocketmine\entity\projectile\WitherSkullFires a skull from the given head at the position.
syncNetworkData() protected
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : voidtickAi() protected
protected function tickAi(int $currentTick) : voidtryChangeMovement() protected
protected function tryChangeMovement() : void