LevelDB: simplify condition

This commit is contained in:
Dylan K. Taylor 2023-07-19 16:30:13 +01:00
parent 1b9c282194
commit b33a9690e9
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -303,8 +303,7 @@ class LevelDB extends BaseWorldProvider implements WritableWorldProvider{
$previous = $decoded;
if($nextIndex <= Chunk::MAX_SUBCHUNK_INDEX){ //older versions wrote additional superfluous biome palettes
$result[$nextIndex++] = $decoded;
}
if($stream->feof() && $nextIndex >= Chunk::MAX_SUBCHUNK_INDEX){
}elseif($stream->feof()){
//not enough padding biome arrays for the given version - this is non-critical since we discard the excess anyway, but this should be logged
$logger->error("Wrong number of 3D biome palettes: expected $expectedCount, but got " . ($i + 1) . " - this is not a problem, but may indicate a corrupted chunk");
break;