Skip to content

WitherSummonPattern 5.46.0 ​

final class · pocketmine\entity\boss\WitherSummonPattern · source

The structure that summons a wither: a T of four soul sand or soul soil blocks with three wither skeleton skulls on top of its arms, both bottom corners empty. Like Bedrock it may be built upright, upside down or lying on its side (any "up" direction), facing any way. It is checked when a wither skeleton skull is placed (any of the three).

In pattern coordinates (r along the arms, u towards the skulls), with the stem at the origin: <pre> u=2 S S S S = wither skeleton skull u=1 # # # # = soul sand / soul soil u=0 . # . . = air -1 0 1 r </pre>

Methods ​

find() ​

php
public static function find(\pocketmine\world\World $world, \pocketmine\math\Vector3 $skullPos) : ?self

Looks for a complete pattern that includes the skull at the given position.

getBody() ​

php
public function getBody() : array

getSkulls() ​

php
public function getSkulls() : array

getSpawnPosition() ​

php
public function getSpawnPosition() : \pocketmine\math\Vector3

Where the wither appears: on the stem for an upright T, otherwise in the middle of the arms.

isBodyBlock() ​

php
public static function isBodyBlock(\pocketmine\block\Block $block) : bool

isSkull() ​

php
public static function isSkull(\pocketmine\block\Block $block) : bool

trySummon() ​

php
public static function trySummon(\pocketmine\world\World $world, \pocketmine\math\Vector3 $skullPos) : ?\pocketmine\entity\boss\Wither

Removes the structure (with break particles) and summons a wither in its place. Returns the wither, or null if there is no complete pattern including the given skull or the difficulty is peaceful.

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