Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 public function pairWith(Chest $tile)
 {
     if ($this->isPaired() or $tile->isPaired()) {
         return false;
     }
     $this->createPair($tile);
     $this->spawnToAll();
     $tile->spawnToAll();
     $this->checkPairing();
     return true;
 }