Skip to content

PiglinBarter 5.46.0 ​

final class · pocketmine\entity\monster\PiglinBarter · source

The bartering loot table (Bedrock loot_tables/entities/piglin_barter.json): one roll, weights out of 469. Bedrock gives plain arrows where Java gives spectral arrows, and soul speed books are enchanted books.

Methods ​

getEntries() ​

php
public static function getEntries() : array

Returns the entries of the table: weight, item factory, minimum and maximum count.

getTotalWeight() ​

php
public static function getTotalWeight() : int

roll() ​

php
public static function roll() : \pocketmine\item\Item

Rolls the table once.

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