Update to Minecraft 1.8.3
This commit is contained in:
@@ -13,12 +13,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
|
||||
private static final Logger a = LogManager.getLogger();
|
||||
- private List b = Lists.newArrayList();
|
||||
- private Set c = Sets.newHashSet();
|
||||
- private List<ChunkRegionLoader.PendingChunkToSave> b = Lists.newArrayList();
|
||||
- private Set<ChunkCoordIntPair> c = Sets.newHashSet();
|
||||
+ // Spigot start
|
||||
+ private java.util.LinkedHashMap<ChunkCoordIntPair, PendingChunkToSave> pendingSaves = new java.util.LinkedHashMap<ChunkCoordIntPair, PendingChunkToSave>();
|
||||
+ // private List b = Lists.newArrayList();
|
||||
+ // private Set c = Sets.newHashSet();
|
||||
+ // private List<ChunkRegionLoader.PendingChunkToSave> b = Lists.newArrayList();
|
||||
+ // private Set<ChunkCoordIntPair> c = Sets.newHashSet();
|
||||
+ // Spigot end
|
||||
private Object d = new Object();
|
||||
private final File e;
|
||||
@@ -48,8 +48,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
synchronized (this.d) {
|
||||
- if (this.c.contains(chunkcoordintpair)) {
|
||||
- for (int k = 0; k < this.b.size(); ++k) {
|
||||
- if (((PendingChunkToSave) this.b.get(k)).a.equals(chunkcoordintpair)) {
|
||||
- nbttagcompound = ((PendingChunkToSave) this.b.get(k)).b;
|
||||
- if (((ChunkRegionLoader.PendingChunkToSave) this.b.get(k)).a.equals(chunkcoordintpair)) {
|
||||
- nbttagcompound = ((ChunkRegionLoader.PendingChunkToSave) this.b.get(k)).b;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
@@ -68,8 +68,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
synchronized (this.d) {
|
||||
- if (this.c.contains(chunkcoordintpair)) {
|
||||
- for (int i = 0; i < this.b.size(); ++i) {
|
||||
- if (((PendingChunkToSave) this.b.get(i)).a.equals(chunkcoordintpair)) {
|
||||
- this.b.set(i, new PendingChunkToSave(chunkcoordintpair, nbttagcompound));
|
||||
- if (((ChunkRegionLoader.PendingChunkToSave) this.b.get(i)).a.equals(chunkcoordintpair)) {
|
||||
- this.b.set(i, new ChunkRegionLoader.PendingChunkToSave(chunkcoordintpair, nbttagcompound));
|
||||
- return;
|
||||
- }
|
||||
- }
|
||||
@@ -78,9 +78,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ return;
|
||||
}
|
||||
|
||||
- this.b.add(new PendingChunkToSave(chunkcoordintpair, nbttagcompound));
|
||||
- this.b.add(new ChunkRegionLoader.PendingChunkToSave(chunkcoordintpair, nbttagcompound));
|
||||
- this.c.add(chunkcoordintpair);
|
||||
+ // this.b.add(new PendingChunkToSave(chunkcoordintpair, nbttagcompound));
|
||||
+ // this.b.add(new ChunkRegionLoader.PendingChunkToSave(chunkcoordintpair, nbttagcompound));
|
||||
+ // this.c.add(chunkcoordintpair);
|
||||
+ // Spigot end
|
||||
FileIOThread.a().a(this);
|
||||
@@ -96,12 +96,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
return false;
|
||||
}
|
||||
|
||||
- pendingchunktosave = (PendingChunkToSave) this.b.remove(0);
|
||||
- this.c.remove(pendingchunktosave.a);
|
||||
+ pendingchunktosave = this.pendingSaves.values().iterator().next();
|
||||
+ this.pendingSaves.remove(pendingchunktosave.a);
|
||||
- chunkregionloader_pendingchunktosave = (ChunkRegionLoader.PendingChunkToSave) this.b.remove(0);
|
||||
- this.c.remove(chunkregionloader_pendingchunktosave.a);
|
||||
+ chunkregionloader_pendingchunktosave = this.pendingSaves.values().iterator().next();
|
||||
+ this.pendingSaves.remove(chunkregionloader_pendingchunktosave.a);
|
||||
+ // Spigot end
|
||||
}
|
||||
|
||||
if (pendingchunktosave != null) {
|
||||
if (chunkregionloader_pendingchunktosave != null) {
|
||||
--
|
||||
Reference in New Issue
Block a user