diff --git a/src/pocketmine/level/format/mcregion/RegionLoader.php b/src/pocketmine/level/format/mcregion/RegionLoader.php index 768018e0c..1b4a7eb76 100644 --- a/src/pocketmine/level/format/mcregion/RegionLoader.php +++ b/src/pocketmine/level/format/mcregion/RegionLoader.php @@ -290,21 +290,9 @@ class RegionLoader{ protected function createBlank(){ fseek($this->filePointer, 0); - ftruncate($this->filePointer, 0); + ftruncate($this->filePointer, 8192); // this fills the file with the null byte $this->lastSector = 1; - $table = ""; - for($i = 0; $i < 1024; ++$i){ - $this->locationTable[$i] = [0, 0]; - $table .= Binary::writeInt(0); - } - - $time = time(); - for($i = 0; $i < 1024; ++$i){ - $this->locationTable[$i][2] = $time; - $table .= Binary::writeInt($time); - } - - fwrite($this->filePointer, $table, 4096 * 2); + $this->locationTable = array_fill(0, 1024, [0, 0, 0]); } public function getX(){