getDefaultTitle() !== "Crafting"){ throw new \InvalidStateException("Invalid Inventory type, expected CRAFTING or WORKBENCH"); } $this->resultInventory = $resultInventory; parent::__construct($holder, $inventoryType); } /** * @return Inventory */ public function getResultInventory(){ return $this->resultInventory; } public function getSize() : int{ return $this->getResultInventory()->getSize() + parent::getSize(); } }