StructureTemplate 5.46.0
A structure template (data/minecraft/structure/*.nbt) with the palettes in vanilla's placement order (StructureTemplate.buildInfoList(): full blocks, then other blocks, then block entities, each sorted by y, x, z), and its placement (StructureTemplate.placeInWorld()) without entities and shape updates.
Constants
ROTATION_CLOCKWISE_180
php
public const ROTATION_CLOCKWISE_180 = 2ROTATION_CLOCKWISE_90
php
public const ROTATION_CLOCKWISE_90 = 1ROTATION_COUNTERCLOCKWISE_90
php
public const ROTATION_COUNTERCLOCKWISE_90 = 3ROTATION_NAMES
php
public const ROTATION_NAMES = ["none", "clockwise_90", "180", "counterclockwise_90"]ROTATION_NONE
php
public const ROTATION_NONE = 0Properties
$palettes
php
public array $palettes$sizeX
php
public readonly int $sizeX$sizeY
php
public readonly int $sizeY$sizeZ
php
public readonly int $sizeZMethods
__construct()
php
public function __construct(int $sizeX, int $sizeY, int $sizeZ)getBoundingBox()
php
public function getBoundingBox(int $x, int $y, int $z, int $rotation) : arraygetBoundingBox(settings, position): [minX, minY, minZ, maxX, maxY, maxZ]
getSize()
php
public function getSize(int $rotation) : arraygetSize(rotation)
load()
php
public static function load(\pocketmine\world\generator\vanilla\WorldgenData $data, \pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks, string $id) : selfrotateDirection()
php
public static function rotateDirection(int $direction, int $rotation) : introtateState()
php
public function rotateState(\pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks, int $state, int $rotation) : intBlockState.rotate() for the common rotatable properties.
transform()
php
public static function transform(int $x, int $z, int $rotation) : arrayStructureTemplate.transform() with no mirror and the pivot at the origin.
zeroPositionOffset()
php
public function zeroPositionOffset(int $rotation) : arraygetZeroPositionWithTransform(zeroPos, Mirror.NONE, rotation): offset of the zero position.
