Fixup indent in async chunk io patch

This commit is contained in:
Jason Penilla 2021-11-23 22:30:31 -08:00
parent cc3b3eba50
commit 3039146dc3

View File

@ -3029,9 +3029,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- return protochunk1; - return protochunk1;
+ return new InProgressChunkHolder(protochunk1, tasksToExecuteOnMain); // Paper - Async chunk loading + return new InProgressChunkHolder(protochunk1, tasksToExecuteOnMain); // Paper - Async chunk loading
} + }
} + }
+
+ // Paper start - async chunk save for unload + // Paper start - async chunk save for unload
+ public record AsyncSaveData( + public record AsyncSaveData(
+ DataLayer[] blockLight, + DataLayer[] blockLight,
@ -3077,7 +3077,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ if (blockEntityNbt != null) { + if (blockEntityNbt != null) {
+ blockEntitiesSerialized.add(blockEntityNbt); + blockEntitiesSerialized.add(blockEntityNbt);
+ } + }
+ } }
+ +
+ return new AsyncSaveData( + return new AsyncSaveData(
+ blockLight, + blockLight,
@ -3087,15 +3087,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ blockEntitiesSerialized, + blockEntitiesSerialized,
+ world.getGameTime() + world.getGameTime()
+ ); + );
+ } }
+ + // Paper end
private static void logErrors(ChunkPos chunkPos, int y, String message) { private static void logErrors(ChunkPos chunkPos, int y, String message) {
ChunkSerializer.LOGGER.error("Recoverable errors when loading section [" + chunkPos.x + ", " + y + ", " + chunkPos.z + "]: " + message); ChunkSerializer.LOGGER.error("Recoverable errors when loading section [" + chunkPos.x + ", " + y + ", " + chunkPos.z + "]: " + message);
}
@@ -0,0 +0,0 @@ public class ChunkSerializer { @@ -0,0 +0,0 @@ public class ChunkSerializer {
} }
public static CompoundTag write(ServerLevel world, ChunkAccess chunk) { public static CompoundTag write(ServerLevel world, ChunkAccess chunk) {
+ // Paper start
+ return saveChunk(world, chunk, null); + return saveChunk(world, chunk, null);
+ } + }
+ public static CompoundTag saveChunk(ServerLevel world, ChunkAccess chunk, @org.checkerframework.checker.nullness.qual.Nullable AsyncSaveData asyncsavedata) { + public static CompoundTag saveChunk(ServerLevel world, ChunkAccess chunk, @org.checkerframework.checker.nullness.qual.Nullable AsyncSaveData asyncsavedata) {