mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 01:51:51 +00:00
Merge branch 'release/3.4'
This commit is contained in:
commit
4879eac946
@ -75,8 +75,13 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{
|
|||||||
$this->inventory->removeAllViewers(true);
|
$this->inventory->removeAllViewers(true);
|
||||||
|
|
||||||
if($this->doubleInventory !== null){
|
if($this->doubleInventory !== null){
|
||||||
$this->doubleInventory->removeAllViewers(true);
|
if($this->isPaired() and $this->level->isChunkLoaded($this->pairX >> 4, $this->pairZ >> 4)){
|
||||||
$this->doubleInventory->invalidate();
|
$this->doubleInventory->removeAllViewers(true);
|
||||||
|
$this->doubleInventory->invalidate();
|
||||||
|
if(($pair = $this->getPair()) !== null){
|
||||||
|
$pair->doubleInventory = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
$this->doubleInventory = null;
|
$this->doubleInventory = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,9 +123,9 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{
|
|||||||
$this->doubleInventory = $pair->doubleInventory;
|
$this->doubleInventory = $pair->doubleInventory;
|
||||||
}else{
|
}else{
|
||||||
if(($pair->x + ($pair->z << 15)) > ($this->x + ($this->z << 15))){ //Order them correctly
|
if(($pair->x + ($pair->z << 15)) > ($this->x + ($this->z << 15))){ //Order them correctly
|
||||||
$this->doubleInventory = new DoubleChestInventory($pair, $this);
|
$this->doubleInventory = $pair->doubleInventory = new DoubleChestInventory($pair, $this);
|
||||||
}else{
|
}else{
|
||||||
$this->doubleInventory = new DoubleChestInventory($this, $pair);
|
$this->doubleInventory = $pair->doubleInventory = new DoubleChestInventory($this, $pair);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user