Skip to content

StructurePiecesBuilder 5.46.0 ​

final class · pocketmine\world\generator\vanilla\structure\piece\StructurePiecesBuilder · source

StructurePiecesBuilder (+ StructurePieceAccessor): the pieces of a code-built structure start while they are generated.

Properties ​

$pieces ​

php
public array $pieces

Methods ​

addPiece() ​

php
public function addPiece(\pocketmine\world\generator\vanilla\structure\piece\StructurePiece $piece) : void

clear() ​

php
public function clear() : void

findCollisionPiece() ​

php
public function findCollisionPiece(\pocketmine\world\generator\vanilla\structure\BoundingBox $box) : ?\pocketmine\world\generator\vanilla\structure\piece\StructurePiece

StructurePiece.findCollisionPiece(): the first piece whose box intersects the given box.

getBoundingBox() ​

php
public function getBoundingBox() : \pocketmine\world\generator\vanilla\structure\BoundingBox

isEmpty() ​

php
public function isEmpty() : bool

moveBelowSeaLevel() ​

php
public function moveBelowSeaLevel(int $seaLevel, int $minY, \pocketmine\world\generator\vanilla\random\LegacyRandom|\pocketmine\world\generator\vanilla\feature\FeatureRandom $random, int $offset) : int

Moves the pieces down to a random height below sea level - offset; returns the offset applied.

moveInsideHeights() ​

php
public function moveInsideHeights(\pocketmine\world\generator\vanilla\random\LegacyRandom|\pocketmine\world\generator\vanilla\feature\FeatureRandom $random, int $lowestAllowed, int $highestAllowed) : void

offsetPiecesVertically() ​

php
public function offsetPiecesVertically(int $dy) : void

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