Skip to content

AnvilResult 5.46.0 ​

final class · pocketmine\inventory\transaction\AnvilResult · source

What an anvil makes from its two slots: the item, the experience level cost and how many material items it uses.

Methods ​

__construct() ​

php
public function __construct(\pocketmine\item\Item $result, int $xpCost, int $materialUsed)

getMaterialUsed() ​

php
public function getMaterialUsed() : int

Number of items taken from the material slot (0 when there is none).

getResult() ​

php
public function getResult() : \pocketmine\item\Item

getXpCost() ​

php
public function getXpCost() : int

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