TemplateData 5.46.0
A structure template (data/minecraft/structure/*.nbt) in a compact form for structure generation: blocks are packed ints (x | y << 10 | z << 20 | palette entry << 30) in vanilla's placement order (StructureTemplate.buildInfoList(): full blocks, then other blocks, then blocks with block entity data, each sorted by y, x, z), with the jigsaw blocks, data markers and entities extracted.
Constants
COORD_MASK
public const COORD_MASK = 0x3ffProperties
$blockCount
public int $blockCount$blockNbt
public array $blockNbtBlock entity data by packed position (x | y << 10 | z << 20).
$dataMarkers
public array $dataMarkersStructure blocks in data mode (x, y, z, metadata), first palette.
$entities
public array $entitiesEntities: [x, y, z (exact position), block x, y, z, Java entity data].
$id
public readonly string $id$jigsaws
public array $jigsawsJigsaw blocks of the first palette, in placement order.
$palettes
public array $palettesPacked blocks per palette, as binary strings of 64-bit little-endian ints (8 bytes per block instead of ~40 for a PHP array: the templates of big structures are hundreds of thousands of blocks).
$sizeX
public readonly int $sizeX$sizeY
public readonly int $sizeY$sizeZ
public readonly int $sizeZ$states
public array $statesJava state of each palette entry, per palette.
Methods
__construct()
public function __construct(string $id, int $sizeX, int $sizeY, int $sizeZ)blocks()
public function blocks(int $palette) : arrayThe packed blocks of a palette (see pack()), in placement order.
load()
public static function load(\pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks, string $id, string $path) : selfpack()
public static function pack(int $x, int $y, int $z, int $entry) : int