WorldProvider: allow loadChunk() to return additional information about the loaded chunk data

this will be needed for dealing with #5733. I don't plan to fix that before 5.0, but we need to make the appropriate BC breaks now, before release.
This commit is contained in:
Dylan K. Taylor
2023-05-29 17:03:39 +01:00
parent f5a1a0c9cb
commit c10be0f346
8 changed files with 91 additions and 30 deletions

View File

@@ -140,10 +140,11 @@ class FormatConverter{
$start = microtime(true);
$thisRound = $start;
foreach($this->oldProvider->getAllChunks(true, $this->logger) as $coords => $chunk){
foreach($this->oldProvider->getAllChunks(true, $this->logger) as $coords => $loadedChunkData){
[$chunkX, $chunkZ] = $coords;
$chunk->getChunk()->setTerrainDirty();
$new->saveChunk($chunkX, $chunkZ, $chunk);
$chunkData = $loadedChunkData->getData();
$chunkData->getChunk()->setTerrainDirty();
$new->saveChunk($chunkX, $chunkZ, $chunkData);
$counter++;
if(($counter % $this->chunksPerProgressUpdate) === 0){
$time = microtime(true);