Skip to content

TemplateReader 5.46.0 ​

final class · pocketmine\world\generator\vanilla\structure\template\TemplateReader · source

A lean reader for structure template files (big-endian NBT): the "blocks" list, tens of thousands of compounds in big templates, is read straight into ints without building tag objects (a full NBT tree of a bastion template takes about 50 MB, more than a generator worker can spare); everything else becomes ordinary tags.

Properties ​

$blocks ​

php
public array $blocks

$entities ​

php
public array $entities

$palettes ​

php
public array $palettes

Palettes: entries are CompoundTag ({"Name", "Properties"} or {"id", "properties"}) or StringTag.

$size ​

php
public array $size

Methods ​

__construct() ​

php
public function __construct(string $buffer)

read() ​

php
public function read() : void

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