mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Fixed Double Chest behavior
This commit is contained in:
@ -55,8 +55,6 @@ class Chest extends Spawnable implements InventoryHolder, Container{
|
||||
for($i = 0; $i < $this->getSize(); ++$i){
|
||||
$this->inventory->setItem($i, $this->getItem($i));
|
||||
}
|
||||
|
||||
$this->checkPairing();
|
||||
}
|
||||
|
||||
public function close(){
|
||||
@ -158,6 +156,9 @@ class Chest extends Spawnable implements InventoryHolder, Container{
|
||||
* @return ChestInventory|DoubleChestInventory
|
||||
*/
|
||||
public function getInventory(){
|
||||
if($this->isPaired() and $this->doubleInventory === null){
|
||||
$this->checkPairing();
|
||||
}
|
||||
return $this->doubleInventory instanceof DoubleChestInventory ? $this->doubleInventory : $this->inventory;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user