mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 23:37:45 +00:00
WorldProvider subsystem no longer depends on Chunk
Instead, it provides the data needed to construct the chunk, which doesn't require the provider to be aware of anywhere near as much logic.
This commit is contained in:
@@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace pocketmine\world\format\io;
|
||||
|
||||
use pocketmine\utils\Filesystem;
|
||||
use pocketmine\world\format\Chunk;
|
||||
use pocketmine\world\generator\GeneratorManager;
|
||||
use pocketmine\world\generator\normal\Normal;
|
||||
use pocketmine\world\WorldCreationOptions;
|
||||
@@ -142,9 +143,7 @@ class FormatConverter{
|
||||
$thisRound = $start;
|
||||
foreach($this->oldProvider->getAllChunks(true, $this->logger) as $coords => $loadedChunkData){
|
||||
[$chunkX, $chunkZ] = $coords;
|
||||
$chunkData = $loadedChunkData->getData();
|
||||
$chunkData->getChunk()->setTerrainDirty();
|
||||
$new->saveChunk($chunkX, $chunkZ, $chunkData);
|
||||
$new->saveChunk($chunkX, $chunkZ, $loadedChunkData->getData(), ~0);
|
||||
$counter++;
|
||||
if(($counter % $this->chunksPerProgressUpdate) === 0){
|
||||
$time = microtime(true);
|
||||
|
Reference in New Issue
Block a user