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:
Dylan K. Taylor
2023-05-29 17:44:00 +01:00
parent d57954dff0
commit a49842278a
8 changed files with 39 additions and 32 deletions

View File

@@ -102,10 +102,8 @@ trait LegacyAnvilChunkTrait{
return new LoadedChunkData(
data: new ChunkData(
new Chunk(
$subChunks,
$chunk->getByte("TerrainPopulated", 0) !== 0
),
$subChunks,
$chunk->getByte("TerrainPopulated", 0) !== 0,
($entitiesTag = $chunk->getTag("Entities")) instanceof ListTag ? self::getCompoundList("Entities", $entitiesTag) : [],
($tilesTag = $chunk->getTag("TileEntities")) instanceof ListTag ? self::getCompoundList("TileEntities", $tilesTag) : [],
),