Removed InventoryType, added new inventory API methods

This commit is contained in:
Dylan K. Taylor
2017-08-07 11:31:36 +01:00
parent 899e318a88
commit 98e0a2ecba
13 changed files with 115 additions and 264 deletions

View File

@ -24,11 +24,28 @@ declare(strict_types=1);
namespace pocketmine\inventory;
use pocketmine\level\Position;
use pocketmine\network\mcpe\protocol\types\WindowTypes;
use pocketmine\Player;
class AnvilInventory extends ContainerInventory{
/** @var FakeBlockMenu */
protected $holder;
public function __construct(Position $pos){
parent::__construct(new FakeBlockMenu($this, $pos), InventoryType::get(InventoryType::ANVIL));
parent::__construct(new FakeBlockMenu($this, $pos));
}
public function getNetworkType() : int{
return WindowTypes::ANVIL;
}
public function getName() : string{
return "Anvil";
}
public function getDefaultSize() : int{
return 3; //1 input, 1 material, 1 result
}
/**