DesertPyramidPiece 5.46.0
Extends OrientedPiece
The desert pyramid (vanilla's DesertPyramidPiece): sandstone pyramid with two towers, the TNT trap room and its four chests, and the archaeology cellar with suspicious sand (placed by DesertPyramidStructure.afterPlace()).
Ported from vanilla's bytecode. WorldGenRegion.getRandom() (cellar stairs variant, collapsed roof) is the region random of the chunk being decorated (FeatureLevel::$regionRandom).
Methods
__construct()
public function __construct(\pocketmine\world\generator\vanilla\random\LegacyRandom $random, int $x, int $z)getPotentialSuspiciousSand()
public function getPotentialSuspiciousSand() : arrayWorld positions where the cellar may get suspicious sand (getPotentialSuspiciousSandWorldPositions(), as the SortedArraySet of DesertPyramidStructure.afterPlace(): Vec3i order y, z, x).
placeSuspiciousSand()
public function placeSuspiciousSand(\pocketmine\world\generator\vanilla\structure\StructurePlaceContext $c, \pocketmine\world\generator\vanilla\structure\BoundingBox $chunkBox, \pocketmine\world\generator\vanilla\structure\StructureStart $start) : voidDesertPyramidStructure.afterPlace(): the collapsed roof block and 5 to 7 of the cellar's sand blocks become suspicious sand, the other ones sand.
postProcess()
public function postProcess(\pocketmine\world\generator\vanilla\structure\StructurePlaceContext $c, \pocketmine\world\generator\vanilla\structure\BoundingBox $box, int $chunkX, int $chunkZ, array $pivot) : void