mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 15:00:13 +01:00
Slightly prettier patch file
This commit is contained in:
parent
2fee804892
commit
43f3c03491
2 changed files with 11 additions and 15 deletions
|
@ -1,28 +1,24 @@
|
|||
From e0342635c30572cde8156362401c52c42693f114 Mon Sep 17 00:00:00 2001
|
||||
From d62facce1542c708d4fb2c5f8a81125a8c969943 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 11 Jun 2013 12:09:45 +1000
|
||||
Subject: [PATCH] More Efficient Chunk Save Queue
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index bee715b..62ec7d6 100644
|
||||
index bee715b..5c67fe4 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -13,8 +13,11 @@ import java.util.Set;
|
||||
@@ -13,8 +13,7 @@ import java.util.Set;
|
||||
|
||||
public class ChunkRegionLoader implements IAsyncChunkSaver, IChunkLoader {
|
||||
|
||||
- private List a = new ArrayList();
|
||||
- private Set b = new HashSet();
|
||||
+ // Spigot start
|
||||
+ private java.util.LinkedHashMap<ChunkCoordIntPair, PendingChunkToSave> pendingSaves = new java.util.LinkedHashMap<ChunkCoordIntPair, PendingChunkToSave>();
|
||||
+ // private List a = new ArrayList();
|
||||
+ // private Set b = new HashSet();
|
||||
+ // Spigot end
|
||||
+ private java.util.LinkedHashMap<ChunkCoordIntPair, PendingChunkToSave> pendingSaves = new java.util.LinkedHashMap<ChunkCoordIntPair, PendingChunkToSave>(); // Spigot
|
||||
private Object c = new Object();
|
||||
private final File d;
|
||||
|
||||
@@ -27,13 +30,11 @@ public class ChunkRegionLoader implements IAsyncChunkSaver, IChunkLoader {
|
||||
@@ -27,13 +26,11 @@ public class ChunkRegionLoader implements IAsyncChunkSaver, IChunkLoader {
|
||||
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j);
|
||||
|
||||
synchronized (this.c) {
|
||||
|
@ -41,7 +37,7 @@ index bee715b..62ec7d6 100644
|
|||
}
|
||||
|
||||
return RegionFileCache.a(this.d, i, j).chunkExists(i & 31, j & 31);
|
||||
@@ -60,14 +61,12 @@ public class ChunkRegionLoader implements IAsyncChunkSaver, IChunkLoader {
|
||||
@@ -60,14 +57,12 @@ public class ChunkRegionLoader implements IAsyncChunkSaver, IChunkLoader {
|
||||
Object object = this.c;
|
||||
|
||||
synchronized (this.c) {
|
||||
|
@ -61,7 +57,7 @@ index bee715b..62ec7d6 100644
|
|||
}
|
||||
|
||||
if (nbttagcompound == null) {
|
||||
@@ -148,17 +147,11 @@ public class ChunkRegionLoader implements IAsyncChunkSaver, IChunkLoader {
|
||||
@@ -148,17 +143,11 @@ public class ChunkRegionLoader implements IAsyncChunkSaver, IChunkLoader {
|
||||
Object object = this.c;
|
||||
|
||||
synchronized (this.c) {
|
||||
|
@ -83,7 +79,7 @@ index bee715b..62ec7d6 100644
|
|||
FileIOThread.a.a(this);
|
||||
}
|
||||
}
|
||||
@@ -168,12 +161,14 @@ public class ChunkRegionLoader implements IAsyncChunkSaver, IChunkLoader {
|
||||
@@ -168,12 +157,14 @@ public class ChunkRegionLoader implements IAsyncChunkSaver, IChunkLoader {
|
||||
Object object = this.c;
|
||||
|
||||
synchronized (this.c) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 5b52dd4d9234729246f5e9fbfe4b78046e060a2b Mon Sep 17 00:00:00 2001
|
||||
From 24494b59668ae9742d1045f1d949d5e86ca6f7fe Mon Sep 17 00:00:00 2001
|
||||
From: Mike Primm <mike@primmhome.com>
|
||||
Date: Sun, 13 Jan 2013 03:49:07 -0800
|
||||
Subject: [PATCH] Implement 'lightening' of NibbleArrays - only allocate
|
||||
|
@ -10,10 +10,10 @@ Finish up NibbleArray lightening work - use for Snapshots, reduce copies
|
|||
Fix nibble handling with NBT - arrays aren't copied by NBTByteArray
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 62ec7d6..a90209e 100644
|
||||
index 5c67fe4..3f3c07e 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -221,15 +221,15 @@ public class ChunkRegionLoader implements IAsyncChunkSaver, IChunkLoader {
|
||||
@@ -217,15 +217,15 @@ public class ChunkRegionLoader implements IAsyncChunkSaver, IChunkLoader {
|
||||
nbttagcompound1.setByte("Y", (byte) (chunksection.getYPosition() >> 4 & 255));
|
||||
nbttagcompound1.setByteArray("Blocks", chunksection.getIdArray());
|
||||
if (chunksection.getExtendedIdArray() != null) {
|
||||
|
|
Loading…
Reference in a new issue