diff --git a/src/pmf/Level.php b/src/pmf/Level.php index 13072d15c6..b389c9a836 100644 --- a/src/pmf/Level.php +++ b/src/pmf/Level.php @@ -191,12 +191,12 @@ class PMFLevel extends PMF{ public function loadChunk($X, $Z){ $X = (int) $X; $Z = (int) $Z; + $index = $this->getIndex($X, $Z); if($this->isChunkLoaded($X, $Z)){ return true; }elseif(!isset($this->locationTable[$index])){ return false; } - $index = $this->getIndex($X, $Z); $info = $this->locationTable[$index]; $this->seek($info[0]);