Skip to content

Wither 5.46.0 ​

class · pocketmine\entity\boss\Wither · source

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 ​

php
public const DASH_DAMAGE = 15.0

Base dash damage (8.5/15/22.5 by difficulty).

DASH_TICKS ​

php
public const DASH_TICKS = 30

DEATH_TICKS ​

php
public const DEATH_TICKS = 40

EXPLOSION_POWER ​

php
public const EXPLOSION_POWER = 7.0

HOVER_HEIGHT ​

php
public const HOVER_HEIGHT = 5.0

HUD_RANGE ​

php
public const HUD_RANGE = 55.0

SHOT_INTERVAL ​

php
public const SHOT_INTERVAL = 10

SPAWN_INVULNERABLE_TICKS ​

php
public const SPAWN_INVULNERABLE_TICKS = 220

TARGET_RANGE ​

php
public const TARGET_RANGE = 70.0

VOLLEY_PAUSE ​

php
public const VOLLEY_PAUSE = 40

Methods ​

attack() ​

php
public function attack(\pocketmine\event\entity\EntityDamageEvent $source) : void

canBreathe() ​

php
public function canBreathe() : bool

canDespawn() ​

php
public function canDespawn() : bool

canFreeze() ​

php
public function canFreeze() : bool

endDeathAnimation() protected ​

php
protected function endDeathAnimation() : void

entityBaseTick() protected ​

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

explode() ​

php
public function explode() : void

getBossBar() ​

php
public function getBossBar() : \pocketmine\entity\boss\BossBar

getDrops() ​

php
public function getDrops() : array

getHeadPosition() ​

php
public function getHeadPosition(int $head) : \pocketmine\math\Vector3

Position of one of the three heads: 0 is the middle one, 1 and 2 the side heads.

getInitialDragMultiplier() protected ​

php
protected function getInitialDragMultiplier() : float

getInitialGravity() protected ​

php
protected function getInitialGravity() : float

getInitialSizeInfo() protected ​

php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfo

getInvulnerableTicks() ​

php
public function getInvulnerableTicks() : int

getName() ​

php
public function getName() : string

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

getXpDropAmount() ​

php
public function getXpDropAmount() : int

hasMovementUpdate() ​

php
public function hasMovementUpdate() : bool

initEntity() protected ​

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

isArmored() ​

php
public function isArmored() : bool

isDashing() ​

php
public function isDashing() : bool

isFireProof() ​

php
public function isFireProof() : bool

isUndead() ​

php
public static function isUndead(?\pocketmine\entity\Entity $entity) : bool

Returns whether the entity is undead (wither, zombie, skeleton or any mob implementing Undead).

isValidTarget() ​

php
public function isValidTarget(?\pocketmine\entity\Living $entity) : bool

maxHealthForDifficulty() ​

php
public static function maxHealthForDifficulty(int $difficulty) : int

onDeath() protected ​

php
protected function onDeath() : void

onDispose() protected ​

php
protected function onDispose() : void

registerGoals() protected ​

php
protected function registerGoals() : void

saveNBT() ​

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

setNameTag() ​

php
public function setNameTag(string $name) : void

shootSkull() ​

php
public function shootSkull(\pocketmine\math\Vector3 $at, bool $dangerous, int $head = 0) : ?\pocketmine\entity\projectile\WitherSkull

Fires a skull from the given head at the position.

syncNetworkData() protected ​

php
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : void

tickAi() protected ​

php
protected function tickAi(int $currentTick) : void

tryChangeMovement() protected ​

php
protected function tryChangeMovement() : void

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