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

@ -39,7 +39,15 @@ class DoubleChestInventory extends ChestInventory implements InventoryHolder{
$this->left = $left->getRealInventory();
$this->right = $right->getRealInventory();
$items = array_merge($this->left->getContents(), $this->right->getContents());
BaseInventory::__construct($this, InventoryType::get(InventoryType::DOUBLE_CHEST), $items);
BaseInventory::__construct($this, $items);
}
public function getName() : string{
return "Double Chest";
}
public function getDefaultSize() : int{
return $this->left->getDefaultSize() + $this->right->getDefaultSize();
}
public function getInventory(){