Skip to content

PoolElement 5.46.0 ​

abstract class · pocketmine\world\generator\vanilla\structure\jigsaw\PoolElement · source

An element of a template pool (vanilla's StructurePoolElement).

Constants ​

PROJECTION_RIGID ​

php
public const PROJECTION_RIGID = 0

PROJECTION_TERRAIN_MATCHING ​

php
public const PROJECTION_TERRAIN_MATCHING = 1

Properties ​

$projection ​

php
public readonly int $projection

Methods ​

__construct() ​

php
public function __construct(int $projection)

describe() ​

php
abstract public function describe() : string

A short description for debugging.

getBoundingBox() ​

php
abstract public function getBoundingBox(\pocketmine\world\generator\vanilla\structure\template\StructureTemplates $templates, int $x, int $y, int $z, int $rotation) : \pocketmine\world\generator\vanilla\structure\BoundingBox

getGroundLevelDelta() ​

php
public function getGroundLevelDelta() : int

getJigsaws() ​

php
abstract public function getJigsaws(\pocketmine\world\generator\vanilla\structure\template\StructureTemplates $templates, int $x, int $y, int $z, int $rotation) : array

The jigsaw blocks of the element placed at a position with a rotation, in template order.

getLiquidOverride() ​

php
public function getLiquidOverride() : ?bool

The element's own liquid settings, if it overrides the structure's (null: use the structure's).

getShuffledJigsaws() ​

php
public function getShuffledJigsaws(\pocketmine\world\generator\vanilla\structure\template\StructureTemplates $templates, int $x, int $y, int $z, int $rotation, \pocketmine\world\generator\vanilla\random\LegacyRandom|\pocketmine\world\generator\vanilla\feature\FeatureRandom $random) : array

getShuffledJigsawBlocks(): shuffled, then sorted by selection priority (stable, highest first).

isEmpty() ​

php
public function isEmpty() : bool

Whether this is the empty element (EmptyPoolElement.INSTANCE).

place() ​

php
abstract public function place(\pocketmine\world\generator\vanilla\structure\StructurePlaceContext $c, int $x, int $y, int $z, array $pivot, int $rotation, \pocketmine\world\generator\vanilla\structure\BoundingBox $box, bool $applyWaterlogging, bool $keepJigsaws) : bool

Places the element (clipped to the box). $applyWaterlogging: the liquid settings (LiquidSettings).

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