diff --git a/patches/server/Allow-Saving-of-Oversized-Chunks.patch b/patches/server/Allow-Saving-of-Oversized-Chunks.patch index 830aba46e9..ad073b8a7a 100644 --- a/patches/server/Allow-Saving-of-Oversized-Chunks.patch +++ b/patches/server/Allow-Saving-of-Oversized-Chunks.patch @@ -51,13 +51,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import org.slf4j.Logger; @@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable { - - public RegionFile(RegionStorageInfo storageKey, Path path, Path directory, RegionFileVersion compressionFormat, boolean dsync) throws IOException { - this.header = ByteBuffer.allocateDirect(8192); -+ initOversizedState(); // Paper this.usedSectors = new RegionBitmap(); this.info = storageKey; this.path = path; ++ initOversizedState(); // Paper + this.version = compressionFormat; + if (!Files.isDirectory(directory, new LinkOption[0])) { + throw new IllegalArgumentException("Expected directory, got " + String.valueOf(directory.toAbsolutePath())); @@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable { } diff --git a/patches/server/Attempt-to-recalculate-regionfile-header-if-it-is-co.patch b/patches/server/Attempt-to-recalculate-regionfile-header-if-it-is-co.patch index 992be687a6..68ed90bf27 100644 --- a/patches/server/Attempt-to-recalculate-regionfile-header-if-it-is-co.patch +++ b/patches/server/Attempt-to-recalculate-regionfile-header-if-it-is-co.patch @@ -462,8 +462,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.canRecalcHeader = canRecalcHeader; + // Paper end - add can recalc flag this.header = ByteBuffer.allocateDirect(8192); - initOversizedState(); // Paper this.usedSectors = new RegionBitmap(); + this.info = storageKey; @@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable { RegionFile.LOGGER.warn("Region file {} has truncated header: {}", path, i); } diff --git a/patches/server/Rewrite-chunk-system.patch b/patches/server/Rewrite-chunk-system.patch index 537570bdad..027aee7147 100644 --- a/patches/server/Rewrite-chunk-system.patch +++ b/patches/server/Rewrite-chunk-system.patch @@ -18587,8 +18587,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + private static final class EntityRegionFileStorage extends net.minecraft.world.level.chunk.storage.RegionFileStorage { + -+ public EntityRegionFileStorage(Path directory, boolean dsync) { -+ super(directory, dsync); ++ public EntityRegionFileStorage(RegionStorageInfo storageKey, Path directory, boolean dsync) { ++ super(storageKey, directory, dsync); + } + + protected void write(ChunkPos pos, net.minecraft.nbt.CompoundTag nbt) throws IOException { @@ -20283,6 +20283,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public class ChunkStatus { + static final ChunkStatus.LoadingTask PASSTHROUGH_LOAD_TASK = (WorldGenContext context, ChunkStatus status, ToFullChunk fullChunkConverter, ChunkAccess chunk) -> CompletableFuture.completedFuture(chunk); // Paper - rewrite chunk system ++ protected static final java.util.List statuses = new java.util.ArrayList<>(); // Paper - rewrite chunk system public static final int MAX_STRUCTURE_DISTANCE = 8; private static final EnumSet PRE_FEATURES = EnumSet.of(Heightmap.Types.OCEAN_FLOOR_WG, Heightmap.Types.WORLD_SURFACE_WG); public static final EnumSet POST_FEATURES = EnumSet.of( @@ -20341,8 +20342,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public int writeRadius = -1; + public int loadRange = 0; + -+ protected static final java.util.List statuses = new java.util.ArrayList<>(); -+ + private ChunkStatus nextStatus; + + public final ChunkStatus getNextStatus() { diff --git a/patches/server/incremental-chunk-and-player-saving.patch b/patches/server/incremental-chunk-and-player-saving.patch index 105200bc08..73d65d90da 100644 --- a/patches/server/incremental-chunk-and-player-saving.patch +++ b/patches/server/incremental-chunk-and-player-saving.patch @@ -106,7 +106,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + ServerLevel worldserver1 = this; + + this.serverLevelData.setWorldBorder(worldserver1.getWorldBorder().createSettings()); -+ this.serverLevelData.setCustomBossEvents(this.server.getCustomBossEvents().save()); ++ this.serverLevelData.setCustomBossEvents(this.server.getCustomBossEvents().save(this.registryAccess())); + this.convertable.saveDataTag(this.server.registryAccess(), this.serverLevelData, this.server.getPlayerList().getSingleplayerData()); + } + // CraftBukkit end