mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 17:06:16 +00:00
Make use of isInLoadedTerrain()
This commit is contained in:
@ -26,6 +26,7 @@ namespace pocketmine\tile;
|
||||
use pocketmine\inventory\ChestInventory;
|
||||
use pocketmine\inventory\DoubleChestInventory;
|
||||
use pocketmine\inventory\InventoryHolder;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\nbt\tag\CompoundTag;
|
||||
use pocketmine\nbt\tag\IntTag;
|
||||
|
||||
@ -103,7 +104,7 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{
|
||||
}
|
||||
|
||||
protected function checkPairing(){
|
||||
if($this->isPaired() and !$this->getLevel()->isChunkLoaded($this->pairX >> 4, $this->pairZ >> 4)){
|
||||
if($this->isPaired() and !$this->getLevel()->isInLoadedTerrain(new Vector3($this->pairX, $this->y, $this->pairZ))){
|
||||
//paired to a tile in an unloaded chunk
|
||||
$this->doubleInventory = null;
|
||||
|
||||
|
Reference in New Issue
Block a user