Skip to content

NetherPortalShape 5.46.0 ​

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

The inside of a rectangular obsidian frame, standing on the X or Z axis. The corners of the frame are not needed.

Constants ​

MAX_HEIGHT ​

php
public const MAX_HEIGHT = 21

MAX_WIDTH ​

php
public const MAX_WIDTH = 21

MIN_HEIGHT ​

php
public const MIN_HEIGHT = 3

MIN_WIDTH ​

php
public const MIN_WIDTH = 2

Properties ​

$axis ​

php
public readonly int $axis

$height ​

php
public readonly int $height

$origin ​

php
public readonly \pocketmine\math\Vector3 $origin

$width ​

php
public readonly int $width

Methods ​

__construct() ​

php
public function __construct(\pocketmine\math\Vector3 $origin, int $axis, int $width, int $height)

findIgnitable() ​

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

Finds an empty frame containing the given position, preferring the X axis like vanilla.

findLit() ​

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

Finds the lit portal containing the given portal block.

getArrivalPosition() ​

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

Where an entity coming out of this portal appears: the middle of the bottom row.

getInteriorPositions() ​

php
public function getInteriorPositions() : array

isFrame() ​

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

isIgnitableInterior() ​

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

Blocks that may fill an unlit frame: fire is replaced too, since lighting the frame places fire in it first.

light() ​

php
public function light(\pocketmine\world\World $world) : void

Fills the frame with portal blocks.

tryLight() ​

php
public static function tryLight(\pocketmine\world\World $world, \pocketmine\math\Vector3 $pos) : bool

Lights the empty obsidian frame around the given position, if there is one (used by flint and steel and fire charges before they place fire). Portals can't be lit in the End.

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