Fixed level upgrade and direct save on load

This commit is contained in:
Shoghi Cervantes 2014-03-01 21:45:07 +01:00
parent 16eb45925a
commit 5bf440d820

View File

@ -243,9 +243,8 @@ class PMFLevel extends PMF{
);
$this->chunks[$index] = array();
$this->chunkChange[$index] = array(-1 => false);
for($Y = 0; $Y < $this->chunkInfo[$index][0]; ++$Y){
$t = 1 << $Y;
if(($this->chunkInfo[$index][0] & $t) === $t){
for($Y = 0; $Y < 8; ++$Y){
if(($this->chunkInfo[$index][0] & (1 << $Y)) !== 0){
// 4096 + 2048 + 2048, Block Data, Meta, Light
if(strlen($this->chunks[$index][$Y] = gzread($chunk, 8192)) < 8192){
console("[NOTICE] Empty corrupt chunk detected [$X,$Z,:$Y], recovering contents", true, true, 2);