OceanMonumentPiece 5.46.0
Extends OrientedPiece
OceanMonumentPieces.OceanMonumentPiece: the shared helpers of the ocean monument pieces (water boxes, room floors, elder guardians).
Constants
GRIDROOM_DEPTH
public const GRIDROOM_DEPTH = 8GRIDROOM_HEIGHT
public const GRIDROOM_HEIGHT = 4GRIDROOM_LEFTWING_CONNECT_INDEX
public const GRIDROOM_LEFTWING_CONNECT_INDEX = 25getRoomIndex(0, 1, 0)
GRIDROOM_RIGHTWING_CONNECT_INDEX
public const GRIDROOM_RIGHTWING_CONNECT_INDEX = 29getRoomIndex(4, 1, 0)
GRIDROOM_SOURCE_INDEX
public const GRIDROOM_SOURCE_INDEX = 2getRoomIndex(2, 0, 0)
GRIDROOM_TOP_CONNECT_INDEX
public const GRIDROOM_TOP_CONNECT_INDEX = 52getRoomIndex(2, 2, 0)
GRIDROOM_WIDTH
public const GRIDROOM_WIDTH = 8GRID_DEPTH
public const GRID_DEPTH = 5GRID_FLOOR_COUNT
public const GRID_FLOOR_COUNT = 25GRID_HEIGHT
public const GRID_HEIGHT = 3GRID_SIZE
public const GRID_SIZE = 75GRID_WIDTH
public const GRID_WIDTH = 5LEFTWING_INDEX
public const LEFTWING_INDEX = 1001PENTHOUSE_INDEX
public const PENTHOUSE_INDEX = 1003RIGHTWING_INDEX
public const RIGHTWING_INDEX = 1002Methods
__construct()
public function __construct(int $orientation, int $genDepth, \pocketmine\world\generator\vanilla\structure\BoundingBox $box, ?\pocketmine\world\generator\vanilla\structure\piece\monument\RoomDefinition $roomDefinition = null)chunkIntersects() protected
protected function chunkIntersects(\pocketmine\world\generator\vanilla\structure\BoundingBox $box, int $x0, int $z0, int $x1, int $z1) : boolOceanMonumentPiece.chunkIntersects(): whether the chunk box overlaps a piece-local XZ rectangle.
fillBox() protected
protected function fillBox(\pocketmine\world\generator\vanilla\structure\StructurePlaceContext $c, \pocketmine\world\generator\vanilla\structure\BoundingBox $box, int $minX, int $minY, int $minZ, int $maxX, int $maxY, int $maxZ, int $state) : voidgenerateBox() with the same edge and fill block, not skipping air.
generateBoxOnFillOnly() protected
protected function generateBoxOnFillOnly(\pocketmine\world\generator\vanilla\structure\StructurePlaceContext $c, \pocketmine\world\generator\vanilla\structure\BoundingBox $box, int $x0, int $y0, int $z0, int $x1, int $y1, int $z1, int $state) : voidOceanMonumentPiece.generateBoxOnFillOnly(): replaces only the default water state.
generateDefaultFloor() protected
protected function generateDefaultFloor(\pocketmine\world\generator\vanilla\structure\StructurePlaceContext $c, \pocketmine\world\generator\vanilla\structure\BoundingBox $box, int $xOff, int $zOff, bool $downOpening) : voidOceanMonumentPiece.generateDefaultFloor()
generateWaterBox() protected
protected function generateWaterBox(\pocketmine\world\generator\vanilla\structure\StructurePlaceContext $c, \pocketmine\world\generator\vanilla\structure\BoundingBox $box, int $x0, int $y0, int $z0, int $x1, int $y1, int $z1) : voidOceanMonumentPiece.generateWaterBox(): water below sea level and air above it, keeping ice and water (FILL_KEEP). Positions outside the chunk box read as air and cannot be placed, so only the columns inside the chunk box are visited (same result as vanilla's full loop, every position being independent).
getRoomIndex()
public static function getRoomIndex(int $roomX, int $roomY, int $roomZ) : intmakeRoomBox()
public static function makeRoomBox(int $orientation, \pocketmine\world\generator\vanilla\structure\piece\monument\RoomDefinition $definition, int $roomWidth, int $roomHeight, int $roomDepth) : \pocketmine\world\generator\vanilla\structure\BoundingBoxOceanMonumentPiece.makeBoundingBox(orientation, roomDefinition, roomWidth, roomHeight, roomDepth): the box of a grid room, relative to the building's room grid origin.
palette() protected
protected function palette(\pocketmine\world\generator\vanilla\structure\StructurePlaceContext $c) : arrayBASE_GRAY (prismarine), BASE_LIGHT (prismarine bricks, also DOT_DECO_DATA), BASE_BLACK (dark prismarine), LAMP_BLOCK (sea lantern).
room() protected
protected function room() : \pocketmine\world\generator\vanilla\structure\piece\monument\RoomDefinitionThe room definition of a grid room piece.
spawnElder() protected
protected function spawnElder(\pocketmine\world\generator\vanilla\structure\StructurePlaceContext $c, \pocketmine\world\generator\vanilla\structure\BoundingBox $box, int $x, int $y, int $z) : voidOceanMonumentPiece.spawnElder(): an elder guardian at the centre of the block (finalizeSpawn uses the entity's own random, not the structure's).
