TemplatePool 5.46.0
A template pool (vanilla's StructureTemplatePool): the elements repeated by weight, and the fallback pool.
Properties
$fallback
php
public readonly string $fallback$id
php
public readonly string $id$templates
php
public readonly array $templatesMethods
__construct()
php
public function __construct(string $id, array $templates, string $fallback)getMaxSize()
php
public function getMaxSize(\pocketmine\world\generator\vanilla\structure\template\StructureTemplates $templates) : intStructureTemplatePool.getMaxSize(): the tallest element.
getRandomTemplate()
php
public function getRandomTemplate(\pocketmine\world\generator\vanilla\random\LegacyRandom|\pocketmine\world\generator\vanilla\feature\FeatureRandom $random) : \pocketmine\world\generator\vanilla\structure\jigsaw\PoolElementgetShuffledTemplates()
php
public function getShuffledTemplates(\pocketmine\world\generator\vanilla\random\LegacyRandom|\pocketmine\world\generator\vanilla\feature\FeatureRandom $random) : arraysize()
php
public function size() : int