Fixed crash on chunks that are used by an entity after generation

This commit is contained in:
Shoghi Cervantes 2014-07-31 20:05:07 +02:00
parent 58bded4988
commit 171de939cd

View File

@ -129,8 +129,11 @@ class GenerationRequestManager{
/** @var FullChunk $class */
$class = substr($packet, $offset, $len);
$offset += $len;
$chunk = $class::fromBinary(substr($packet, $offset));
$this->receiveChunk($levelID, $chunk);
$level = $this->server->getLevel($levelID);
if($level instanceof Level){
$chunk = $class::fromBinary(substr($packet, $offset), $level->getProvider());
$this->receiveChunk($levelID, $chunk);
}
}
}
}