mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 03:08:58 +00:00
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:
parent
f0505c0284
commit
d355d5b5b5
@ -101,7 +101,6 @@ class Chest extends Spawnable implements Container, Nameable{
|
|||||||
if($this->doubleInventory !== null){
|
if($this->doubleInventory !== null){
|
||||||
if($this->isPaired() and $this->world->isChunkLoaded($this->pairX >> 4, $this->pairZ >> 4)){
|
if($this->isPaired() and $this->world->isChunkLoaded($this->pairX >> 4, $this->pairZ >> 4)){
|
||||||
$this->doubleInventory->removeAllViewers();
|
$this->doubleInventory->removeAllViewers();
|
||||||
$this->doubleInventory->invalidate();
|
|
||||||
if(($pair = $this->getPair()) !== null){
|
if(($pair = $this->getPair()) !== null){
|
||||||
$pair->doubleInventory = null;
|
$pair->doubleInventory = null;
|
||||||
}
|
}
|
||||||
|
@ -100,9 +100,4 @@ class DoubleChestInventory extends ChestInventory implements InventoryHolder{
|
|||||||
public function getRightSide() : ChestInventory{
|
public function getRightSide() : ChestInventory{
|
||||||
return $this->right;
|
return $this->right;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function invalidate(){
|
|
||||||
$this->left = null;
|
|
||||||
$this->right = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user