Remove hack to break cyclic dependency on double chests

Since these now reference positions instead of tiles, the cyclic dependency is removed.
This commit is contained in:
Dylan K. Taylor 2019-08-05 19:01:21 +01:00
parent f0505c0284
commit d355d5b5b5
2 changed files with 0 additions and 6 deletions

View File

@ -101,7 +101,6 @@ class Chest extends Spawnable implements Container, Nameable{
if($this->doubleInventory !== null){
if($this->isPaired() and $this->world->isChunkLoaded($this->pairX >> 4, $this->pairZ >> 4)){
$this->doubleInventory->removeAllViewers();
$this->doubleInventory->invalidate();
if(($pair = $this->getPair()) !== null){
$pair->doubleInventory = null;
}

View File

@ -100,9 +100,4 @@ class DoubleChestInventory extends ChestInventory implements InventoryHolder{
public function getRightSide() : ChestInventory{
return $this->right;
}
public function invalidate(){
$this->left = null;
$this->right = null;
}
}