Fix McRegionChunkStore.java (#2292)

- Fixes an issue where the LinCompoundTag passed to ChunkStoreHelper::getChunk is not the expected root compound tag, but one that wraps it. See comment of LinRootEntry::toLinTag
This commit is contained in:
ykgamma 2023-05-13 08:41:32 -04:00 committed by GitHub
parent 34b19577f1
commit df13de3379
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,7 +70,7 @@ protected McRegionReader getReader(BlockVector2 pos, String worldname) throws Da
public LinCompoundTag getChunkData(BlockVector2 position, World world) throws DataException, IOException {
McRegionReader reader = getReader(position, world.getName());
try (var chunkStream = new DataInputStream(reader.getChunkInputStream(position))) {
return LinBinaryIO.readUsing(chunkStream, LinRootEntry::readFrom).toLinTag();
return LinBinaryIO.readUsing(chunkStream, LinRootEntry::readFrom).value();
}
}