public function getContents($withAir = false) { if ($withAir) { $contents = []; for ($i = 0; $i < $this->getSize(); ++$i) { $contents[$i] = $this->getItem($i); } return $contents; } return parent::getContents(); }
public function __construct(Chest $left, Chest $right) { $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); }