From d355d5b5b50186998de645b5944028fcdd052a96 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 5 Aug 2019 19:01:21 +0100 Subject: [PATCH] Remove hack to break cyclic dependency on double chests Since these now reference positions instead of tiles, the cyclic dependency is removed. --- src/block/tile/Chest.php | 1 - src/inventory/DoubleChestInventory.php | 5 ----- 2 files changed, 6 deletions(-) diff --git a/src/block/tile/Chest.php b/src/block/tile/Chest.php index 6479c4628..fe77aa979 100644 --- a/src/block/tile/Chest.php +++ b/src/block/tile/Chest.php @@ -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; } diff --git a/src/inventory/DoubleChestInventory.php b/src/inventory/DoubleChestInventory.php index 451ddc7a7..273e04c2a 100644 --- a/src/inventory/DoubleChestInventory.php +++ b/src/inventory/DoubleChestInventory.php @@ -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; - } }