Skip to content

EndExitPortal 5.46.0 ​

final class · pocketmine\world\dimension\EndExitPortal · source

The exit portal (vanilla "end podium") at the centre of the End: a bowl of bedrock around a 5x5 pool of End portal blocks, with a 4 block bedrock pillar in the middle carrying four torches. Before the dragon is killed the pool is empty; afterwards its End portal blocks take players back to the Overworld. The dragon perches on top of the pillar, and the dragon egg appears there.

The shape follows vanilla's EndPodiumFeature: the origin is the centre of the portal layer; within 2.5 blocks of it (counting the vertical distance, block corners to the origin) is portal (or bedrock one layer below), within 3.5 blocks is the bedrock rim.

Constants ​

PILLAR_HEIGHT ​

php
public const PILLAR_HEIGHT = 4

Height of the bedrock pillar above the portal layer (the dragon egg sits on top of it).

X ​

php
public const X = 0

Z ​

php
public const Z = 0

Methods ​

build() ​

php
public static function build(\pocketmine\world\World $world, \pocketmine\math\Vector3 $origin, bool $active) : void

Builds the portal around the given origin (centre of the portal layer). With $active false the portal pool is left empty (air).

findOrigin() ​

php
public static function findOrigin(\pocketmine\world\World $world) : \pocketmine\math\Vector3

Returns where the portal goes when it was never built: on the surface of the island at 0,0 (the highest block of the column plus one), or at the generator's island height if the column is empty or not loaded.

getPillarTop() ​

php
public static function getPillarTop(\pocketmine\math\Vector3 $origin) : \pocketmine\math\Vector3

Position of the dragon egg / where the dragon perches: on top of the pillar.

placeDragonEgg() ​

php
public static function placeDragonEgg(\pocketmine\world\World $world, \pocketmine\math\Vector3 $origin) : void

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