Paper 1.13.1 Update
Updated Upstream (Bukkit/CraftBukkit/Spigot) Bukkit Changes: 2dcc44dc SPIGOT-4307: Fix hacky API for banners on shields e0fc6572 SPIGOT-4309: Add "forced" display of particles efeeab2f Add index to README.md for easier navigation f502bc6f Update to Minecraft 1.13.1 CraftBukkit Changes: d0bb0a1d Fix some tests randomly failing 997d378d Fix client stall in specific teleportation scenarios b3dc2366 SPIGOT-4307: Fix hacky API for banners on shields 2a271162 SPIGOT-4301: Fix more invalid enchants 5d0d83bb SPIGOT-4309: Add "forced" display of particles a6772578 Add additional tests for CraftBlockData ce1af0c3 Update to Minecraft 1.13.1 Spigot Changes: 2440e189 Rebuild patches 4ecffced Update to Minecraft 1.13.1
This commit is contained in:
parent
338c730c10
commit
05dfa62d32
324 changed files with 1984 additions and 2579 deletions
|
@ -26,7 +26,7 @@ Then finally, Sleeping will by default be removed, but due to known issues with
|
|||
But if sleeps are to remain enabled, we at least lower the sleep interval so it doesn't have as much negative impact.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index d48ef7e85..280cfd553 100644
|
||||
index 0d68ffd75a..fd00c320ce 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperConfig {
|
||||
|
@ -41,7 +41,7 @@ index d48ef7e85..280cfd553 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 5001fd11d..b247d5f07 100644
|
||||
index f969c036f3..2b0a088a6a 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -0,0 +0,0 @@ import java.util.function.Consumer;
|
||||
|
@ -66,15 +66,12 @@ index 5001fd11d..b247d5f07 100644
|
|||
+ this.compoundSupplier = compoundSupplier;
|
||||
+ }
|
||||
+ }
|
||||
+ private ConcurrentLinkedQueue<QueuedChunk> queue = new ConcurrentLinkedQueue<>();
|
||||
+ final private ConcurrentLinkedQueue<QueuedChunk> queue = new ConcurrentLinkedQueue<>();
|
||||
+ // Paper end
|
||||
+
|
||||
private static final Logger a = LogManager.getLogger();
|
||||
- private final Object2ObjectMap<ChunkCoordIntPair, Supplier<NBTTagCompound>> b = Object2ObjectMaps.synchronize(new Object2ObjectLinkedOpenHashMap()); // Spigot
|
||||
+ private final Object2ObjectMap<ChunkCoordIntPair, Supplier<NBTTagCompound>> b = new Object2ObjectLinkedOpenHashMap(); // Spigot // Paper - remove synchronized
|
||||
private final Map<ChunkCoordIntPair, Supplier<NBTTagCompound>> b = Maps.newHashMap();
|
||||
private final File c;
|
||||
private final DataFixer d;
|
||||
private PersistentStructureLegacy e;
|
||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
}
|
||||
};
|
||||
|
@ -89,68 +86,58 @@ index 5001fd11d..b247d5f07 100644
|
|||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
}
|
||||
|
||||
protected synchronized void a(ChunkCoordIntPair chunkcoordintpair, Supplier<NBTTagCompound> nbttagcompound) { // Spigot
|
||||
+ queue.add(new QueuedChunk(chunkcoordintpair, nbttagcompound)); // Paper - Chunk queue improvements
|
||||
this.b.put(chunkcoordintpair, nbttagcompound);
|
||||
protected void a(ChunkCoordIntPair chunkcoordintpair, Supplier<NBTTagCompound> nbttagcompound) { // Spigot
|
||||
- this.b.put(chunkcoordintpair, nbttagcompound);
|
||||
+ synchronized (this.queue) { // Paper - synchronize while modifying the map
|
||||
+ queue.add(new QueuedChunk(chunkcoordintpair, nbttagcompound)); // Paper - Chunk queue improvements
|
||||
+ this.b.put(chunkcoordintpair, nbttagcompound);
|
||||
+ }
|
||||
FileIOThread.a().a(this);
|
||||
}
|
||||
|
||||
- public synchronized boolean a() {
|
||||
+ public boolean a() { // Paper - remove synchronized
|
||||
// CraftBukkit start
|
||||
return this.processSaveQueueEntry(false);
|
||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
}
|
||||
|
||||
- private synchronized boolean processSaveQueueEntry(boolean logCompletion) {
|
||||
- Iterator<Map.Entry<ChunkCoordIntPair, Supplier<NBTTagCompound>>> iter = this.b.entrySet().iterator(); // Spigot
|
||||
- if (!iter.hasNext()) {
|
||||
+ private boolean processSaveQueueEntry(boolean logCompletion) { // Paper - dont synchronize during save
|
||||
+ // CraftBukkit start
|
||||
private boolean processSaveQueueEntry(boolean logCompletion) {
|
||||
- Iterator iterator = this.b.entrySet().iterator();
|
||||
- if (!iterator.hasNext()) {
|
||||
+ // Paper start - Chunk queue improvements
|
||||
+ QueuedChunk chunk = queue.poll();
|
||||
+ if (chunk == null) {
|
||||
+ // Paper - end
|
||||
if (logCompletion) {
|
||||
// CraftBukkit end
|
||||
if (logCompletion) { // CraftBukkit
|
||||
ChunkRegionLoader.a.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.c.getName());
|
||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
}
|
||||
|
||||
return false;
|
||||
} else {
|
||||
- // CraftBukkit start
|
||||
- Map.Entry<ChunkCoordIntPair, Supplier<NBTTagCompound>> entry = iter.next(); // Spigot
|
||||
- ChunkCoordIntPair chunkcoordintpair = entry.getKey();
|
||||
- Supplier<NBTTagCompound> value = entry.getValue(); // Spigot
|
||||
- // CraftBukkit end
|
||||
- Entry entry = (Entry) iterator.next();
|
||||
-
|
||||
- iterator.remove();
|
||||
- ChunkCoordIntPair chunkcoordintpair = (ChunkCoordIntPair) entry.getKey();
|
||||
- Supplier<NBTTagCompound> nbttagcompound = (Supplier<NBTTagCompound>) entry.getValue(); // Spigot
|
||||
+ ChunkCoordIntPair chunkcoordintpair = chunk.coords; // Paper - Chunk queue improvements
|
||||
+ Supplier<NBTTagCompound> nbttagcompound = chunk.compoundSupplier; // Spigot // Paper
|
||||
|
||||
boolean flag;
|
||||
|
||||
try {
|
||||
// NBTTagCompound nbttagcompound = (NBTTagCompound) this.b.get(chunkcoordintpair); // CraftBukkit
|
||||
- NBTTagCompound nbttagcompound = SupplierUtils.getIfExists(value); // Spigot
|
||||
+ NBTTagCompound nbttagcompound = SupplierUtils.getIfExists(chunk.compoundSupplier); // Spigot // Paper
|
||||
|
||||
if (nbttagcompound != null) {
|
||||
try {
|
||||
if (nbttagcompound == null) {
|
||||
return true;
|
||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
// CraftBukkit start
|
||||
RegionFileCache.write(this.c, chunkcoordintpair.x, chunkcoordintpair.z, SupplierUtils.getIfExists(nbttagcompound)); // Spigot
|
||||
|
||||
flag = true;
|
||||
} finally {
|
||||
- this.b.remove(chunkcoordintpair, value); // CraftBukkit // Spigot
|
||||
+ // Paper start - only synchronize here
|
||||
+ synchronized (this) {
|
||||
+ // This will not equal if a newer version is still pending - wait until newest is saved to remove
|
||||
+ if (this.b.get(chunkcoordintpair) == chunk.compoundSupplier) {
|
||||
+ this.b.remove(chunkcoordintpair);
|
||||
+ // Paper start remove from map only if this was the latest version of the chunk
|
||||
+ synchronized (this.queue) {
|
||||
+ // This will not equal if a newer version is still pending - wait until newest is saved to remove
|
||||
+ if (this.b.get(chunkcoordintpair) == chunk.compoundSupplier) {
|
||||
+ this.b.remove(chunkcoordintpair);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper start
|
||||
}
|
||||
|
||||
return flag;
|
||||
+ // Paper end
|
||||
/*
|
||||
NBTCompressedStreamTools.a(nbttagcompound, (DataOutput) dataoutputstream);
|
||||
dataoutputstream.close();
|
||||
diff --git a/src/main/java/net/minecraft/server/FileIOThread.java b/src/main/java/net/minecraft/server/FileIOThread.java
|
||||
index 34312667a..549fab9a5 100644
|
||||
index 8c3537ab8d..170c239b77 100644
|
||||
--- a/src/main/java/net/minecraft/server/FileIOThread.java
|
||||
+++ b/src/main/java/net/minecraft/server/FileIOThread.java
|
||||
@@ -0,0 +0,0 @@ public class FileIOThread implements Runnable {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue