Skip to content

StructurePiece 5.46.0 ​

abstract class · pocketmine\world\generator\vanilla\structure\piece\StructurePiece · source

A piece of a structure start (vanilla's StructurePiece): a bounding box and the code that places the piece's blocks inside the box of the chunk being populated.

Properties ​

$box ​

php
public \pocketmine\world\generator\vanilla\structure\BoundingBox $box

$genDepth ​

php
public int $genDepth

Methods ​

__construct() ​

php
public function __construct(\pocketmine\world\generator\vanilla\structure\BoundingBox $box, int $genDepth = 0)

getGroundLevelDelta() ​

php
public function getGroundLevelDelta() : int

Height above the piece's minimum y of the ground the piece stands on (jigsaw pieces' ground level delta).

isRigid() ​

php
public function isRigid() : bool

Whether the terrain is adapted to this piece (beardifier): jigsaw pieces with terrain matching projection are not.

move() ​

php
public function move(int $dx, int $dy, int $dz) : void

postProcess() ​

php
abstract public function postProcess(\pocketmine\world\generator\vanilla\structure\StructurePlaceContext $c, \pocketmine\world\generator\vanilla\structure\BoundingBox $chunkBox, int $chunkX, int $chunkZ, array $pivot) : void

StructurePiece.postProcess(): places the part of the piece inside the chunk box.

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