LootEntry 5.46.0
A loot pool entry (vanilla's LootPoolEntryContainer). Singleton entries (item, tag, loot_table, dynamic, empty) expand to themselves (an expanded tag expands to one choice per item); composite entries (alternatives, group, sequence) expand their children.
Constants
ALTERNATIVES
php
public const ALTERNATIVES = 5DYNAMIC
php
public const DYNAMIC = 3EMPTY
php
public const EMPTY = 4GROUP
php
public const GROUP = 6ITEM
php
public const ITEM = 0SEQUENCE
php
public const SEQUENCE = 7TABLE
php
public const TABLE = 2TAG
php
public const TAG = 1Properties
$children
php
public array $children$expand
php
public bool $expand$name
php
public string $name$quality
php
public readonly int $quality$tableProvider
php
public ?\Closure $tableProvider$tagItems
php
public array $tagItems$type
php
public readonly int $type$weight
php
public readonly int $weightMethods
__construct()
php
public function __construct(int $type, int $weight, int $quality, ?\Closure $condition, ?\Closure $function, string $name)createItemStack()
php
public function createItemStack(?string $tagItem, \Closure $output, \pocketmine\loot\LootContext $context) : voidLootPoolEntry.createItemStack(), for a choice returned by expand().
expand()
php
public function expand(\pocketmine\loot\LootContext $context, \Closure $output) : boolLootPoolEntryContainer.expand(): passes the choices of this entry to $output ([entry, item of an expanded tag]).
getWeight()
php
public function getWeight(float $luck) : intLootPoolEntry.getWeight()
