mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Removed InventoryType, added new inventory API methods
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user