Fix some Chunk corrumption due to Chunk overlap

This commit is contained in:
Alejandro Liu 2015-03-13 06:23:32 +01:00
parent 9d3f59fab6
commit 4f47dac8ec

View File

@ -189,8 +189,8 @@ class RegionLoader{
$sectors = (int) ceil(($length + 4) / 4096); $sectors = (int) ceil(($length + 4) / 4096);
$index = self::getChunkOffset($x, $z); $index = self::getChunkOffset($x, $z);
if($this->locationTable[$index][1] < $sectors){ if($this->locationTable[$index][1] < $sectors){
$this->locationTable[$index][0] = $this->lastSector+1;
$this->lastSector += $sectors; //The GC will clean this shift "later" $this->lastSector += $sectors; //The GC will clean this shift "later"
$this->locationTable[$index][0] = $this->lastSector;
} }
$this->locationTable[$index][1] = $sectors; $this->locationTable[$index][1] = $sectors;
$this->locationTable[$index][2] = time(); $this->locationTable[$index][2] = time();