Skip to content

OceanMonumentPiece 5.46.0 ​

abstract class · pocketmine\world\generator\vanilla\structure\piece\monument\OceanMonumentPiece · source

Extends OrientedPiece

OceanMonumentPieces.OceanMonumentPiece: the shared helpers of the ocean monument pieces (water boxes, room floors, elder guardians).

Constants ​

GRIDROOM_DEPTH ​

php
public const GRIDROOM_DEPTH = 8

GRIDROOM_HEIGHT ​

php
public const GRIDROOM_HEIGHT = 4

GRIDROOM_LEFTWING_CONNECT_INDEX ​

php
public const GRIDROOM_LEFTWING_CONNECT_INDEX = 25

getRoomIndex(0, 1, 0)

GRIDROOM_RIGHTWING_CONNECT_INDEX ​

php
public const GRIDROOM_RIGHTWING_CONNECT_INDEX = 29

getRoomIndex(4, 1, 0)

GRIDROOM_SOURCE_INDEX ​

php
public const GRIDROOM_SOURCE_INDEX = 2

getRoomIndex(2, 0, 0)

GRIDROOM_TOP_CONNECT_INDEX ​

php
public const GRIDROOM_TOP_CONNECT_INDEX = 52

getRoomIndex(2, 2, 0)

GRIDROOM_WIDTH ​

php
public const GRIDROOM_WIDTH = 8

GRID_DEPTH ​

php
public const GRID_DEPTH = 5

GRID_FLOOR_COUNT ​

php
public const GRID_FLOOR_COUNT = 25

GRID_HEIGHT ​

php
public const GRID_HEIGHT = 3

GRID_SIZE ​

php
public const GRID_SIZE = 75

GRID_WIDTH ​

php
public const GRID_WIDTH = 5

LEFTWING_INDEX ​

php
public const LEFTWING_INDEX = 1001

PENTHOUSE_INDEX ​

php
public const PENTHOUSE_INDEX = 1003

RIGHTWING_INDEX ​

php
public const RIGHTWING_INDEX = 1002

Methods ​

__construct() ​

php
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 ​

php
protected function chunkIntersects(\pocketmine\world\generator\vanilla\structure\BoundingBox $box, int $x0, int $z0, int $x1, int $z1) : bool

OceanMonumentPiece.chunkIntersects(): whether the chunk box overlaps a piece-local XZ rectangle.

fillBox() protected ​

php
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) : void

generateBox() with the same edge and fill block, not skipping air.

generateBoxOnFillOnly() protected ​

php
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) : void

OceanMonumentPiece.generateBoxOnFillOnly(): replaces only the default water state.

generateDefaultFloor() protected ​

php
protected function generateDefaultFloor(\pocketmine\world\generator\vanilla\structure\StructurePlaceContext $c, \pocketmine\world\generator\vanilla\structure\BoundingBox $box, int $xOff, int $zOff, bool $downOpening) : void

OceanMonumentPiece.generateDefaultFloor()

generateWaterBox() protected ​

php
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) : void

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

php
public static function getRoomIndex(int $roomX, int $roomY, int $roomZ) : int

makeRoomBox() ​

php
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\BoundingBox

OceanMonumentPiece.makeBoundingBox(orientation, roomDefinition, roomWidth, roomHeight, roomDepth): the box of a grid room, relative to the building's room grid origin.

palette() protected ​

php
protected function palette(\pocketmine\world\generator\vanilla\structure\StructurePlaceContext $c) : array

BASE_GRAY (prismarine), BASE_LIGHT (prismarine bricks, also DOT_DECO_DATA), BASE_BLACK (dark prismarine), LAMP_BLOCK (sea lantern).

room() protected ​

php
protected function room() : \pocketmine\world\generator\vanilla\structure\piece\monument\RoomDefinition

The room definition of a grid room piece.

spawnElder() protected ​

php
protected function spawnElder(\pocketmine\world\generator\vanilla\structure\StructurePlaceContext $c, \pocketmine\world\generator\vanilla\structure\BoundingBox $box, int $x, int $y, int $z) : void

OceanMonumentPiece.spawnElder(): an elder guardian at the centre of the block (finalizeSpawn uses the entity's own random, not the structure's).

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