StructurePiecesBuilder 5.46.0
StructurePiecesBuilder (+ StructurePieceAccessor): the pieces of a code-built structure start while they are generated.
Properties
$pieces
php
public array $piecesMethods
addPiece()
php
public function addPiece(\pocketmine\world\generator\vanilla\structure\piece\StructurePiece $piece) : voidclear()
php
public function clear() : voidfindCollisionPiece()
php
public function findCollisionPiece(\pocketmine\world\generator\vanilla\structure\BoundingBox $box) : ?\pocketmine\world\generator\vanilla\structure\piece\StructurePieceStructurePiece.findCollisionPiece(): the first piece whose box intersects the given box.
getBoundingBox()
php
public function getBoundingBox() : \pocketmine\world\generator\vanilla\structure\BoundingBoxisEmpty()
php
public function isEmpty() : boolmoveBelowSeaLevel()
php
public function moveBelowSeaLevel(int $seaLevel, int $minY, \pocketmine\world\generator\vanilla\random\LegacyRandom|\pocketmine\world\generator\vanilla\feature\FeatureRandom $random, int $offset) : intMoves 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) : voidoffsetPiecesVertically()
php
public function offsetPiecesVertically(int $dy) : void