Fixed #1598 spawning on a index-corrupted Anvil chunk

This commit is contained in:
Shoghi Cervantes 2014-07-10 16:52:59 +02:00
parent 828f7f1590
commit 7dd4a843c6

View File

@ -81,7 +81,9 @@ class RegionLoader{
public function readChunk($x, $z, $generate = true){
$index = self::getChunkOffset($x, $z);
if($index < 0 or $index >= 4096){
return false;
//Regenerate chunk due to corruption
$this->locationTable[$index][0] = 0;
$this->locationTable[$index][1] = 1;
}
if(!$this->isChunkGenerated($index)){