Skip to content

TemplatePool 5.46.0 ​

final class · pocketmine\world\generator\vanilla\structure\jigsaw\TemplatePool · source

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 $templates

Methods ​

__construct() ​

php
public function __construct(string $id, array $templates, string $fallback)

getMaxSize() ​

php
public function getMaxSize(\pocketmine\world\generator\vanilla\structure\template\StructureTemplates $templates) : int

StructureTemplatePool.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\PoolElement

getShuffledTemplates() ​

php
public function getShuffledTemplates(\pocketmine\world\generator\vanilla\random\LegacyRandom|\pocketmine\world\generator\vanilla\feature\FeatureRandom $random) : array

size() ​

php
public function size() : int

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