Skip to content

DesertPyramidPiece 5.46.0 ​

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

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() ​

php
public function __construct(\pocketmine\world\generator\vanilla\random\LegacyRandom $random, int $x, int $z)

getPotentialSuspiciousSand() ​

php
public function getPotentialSuspiciousSand() : array

World positions where the cellar may get suspicious sand (getPotentialSuspiciousSandWorldPositions(), as the SortedArraySet of DesertPyramidStructure.afterPlace(): Vec3i order y, z, x).

placeSuspiciousSand() ​

php
public function placeSuspiciousSand(\pocketmine\world\generator\vanilla\structure\StructurePlaceContext $c, \pocketmine\world\generator\vanilla\structure\BoundingBox $chunkBox, \pocketmine\world\generator\vanilla\structure\StructureStart $start) : void

DesertPyramidStructure.afterPlace(): the collapsed roof block and 5 to 7 of the cellar's sand blocks become suspicious sand, the other ones sand.

postProcess() ​

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

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