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

@ -26,12 +26,32 @@ namespace pocketmine\inventory;
use pocketmine\level\Level;
use pocketmine\network\mcpe\protocol\BlockEventPacket;
use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
use pocketmine\network\mcpe\protocol\types\WindowTypes;
use pocketmine\Player;
use pocketmine\tile\Chest;
class ChestInventory extends ContainerInventory{
/** @var Chest */
protected $holder;
/**
* @param Chest $tile
*/
public function __construct(Chest $tile){
parent::__construct($tile, InventoryType::get(InventoryType::CHEST));
parent::__construct($tile);
}
public function getNetworkType() : int{
return WindowTypes::CONTAINER;
}
public function getName() : string{
return "Chest";
}
public function getDefaultSize() : int{
return 27;
}
/**