Updated Upstream (CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: 7033f180 Hoist out synchronisation from ChunkRegionLoader Spigot Changes: 500ff5d4 Rebuild patches Additional Paper changes: Fixed Versioned World Folders to not synchronize on ChunkRegionLoader Optimized Save Queue even more to use a Long2ObjectOpenHashmap for save map Add World#getXIfLoaded to IWorldReader to expose it to more places
This commit is contained in:
@@ -8,7 +8,7 @@ Adds a command line flag to enable stats on how chunk saves are processing.
|
||||
Stats on current queue, how many was processed and how many were queued.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 87744dcbfc..355186c111 100644
|
||||
index 8acbd7bbff..edb4f2bb65 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
@@ -54,7 +54,7 @@ index 87744dcbfc..355186c111 100644
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 2415404d69..f099b91f7a 100644
|
||||
index fc8f7574cf..94ed728c0e 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
@@ -73,13 +73,13 @@ index 2415404d69..f099b91f7a 100644
|
||||
// CraftBukkit start - Add async variant, provide compatibility
|
||||
@Nullable
|
||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
protected void a(ChunkCoordIntPair chunkcoordintpair, Supplier<NBTTagCompound> nbttagcompound) { // Spigot
|
||||
this.saveMap.put(chunkcoordintpair.asLong(), nbttagcompound); // Paper
|
||||
queue.add(new QueuedChunk(chunkcoordintpair, nbttagcompound)); // Paper - Chunk queue improvements
|
||||
+ queuedSaves++; // Paper
|
||||
FileIOThread.a().a(this);
|
||||
}
|
||||
|
||||
protected void a(ChunkCoordIntPair chunkcoordintpair, Supplier<NBTTagCompound> nbttagcompound) { // Spigot
|
||||
+ queuedSaves++; // Paper
|
||||
synchronized (this.b) { // Paper - synchronize while modifying the map
|
||||
queue.add(new QueuedChunk(chunkcoordintpair, nbttagcompound)); // Paper - Chunk queue improvements
|
||||
this.b.put(chunkcoordintpair, nbttagcompound);
|
||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
// Paper end
|
||||
ChunkCoordIntPair chunkcoordintpair = chunk.coords; // Paper - Chunk queue improvements
|
||||
|
||||
Reference in New Issue
Block a user