Update upstream B/CB/S

This commit is contained in:
Zach Brown 2017-04-28 19:25:52 -05:00
parent 157528a29e
commit 8b2122a291
No known key found for this signature in database
GPG Key ID: CC9DA35FC5450B76
22 changed files with 114 additions and 143 deletions

View File

@ -1,4 +1,4 @@
From be6fc8fd90adbee10abc3c19b9baffa4e9b55618 Mon Sep 17 00:00:00 2001 From 1c2a256ac8dc0122b4a34665f614bb09ea329fe4 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600 Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2 Subject: [PATCH] Timings v2
@ -503,7 +503,7 @@ index 81fc04ed3..bd3b16025 100644
private void z() { private void z() {
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index daf2c0a67..3ba489d4f 100644 index 2d267e44b..2762d1838 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -195,7 +195,7 @@ public class ChunkProviderServer implements IChunkProvider { @@ -195,7 +195,7 @@ public class ChunkProviderServer implements IChunkProvider {
@ -525,10 +525,10 @@ index daf2c0a67..3ba489d4f 100644
this.chunkLoader.a(this.world, chunk); this.chunkLoader.a(this.world, chunk);
} catch (IOException ioexception) { } catch (IOException ioexception) {
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index a97e7d3c2..4890023d7 100644 index 65fe4e2ec..bee52d783 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -402,7 +402,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -388,7 +388,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
public void loadEntities(Chunk chunk, NBTTagCompound nbttagcompound, World world) { public void loadEntities(Chunk chunk, NBTTagCompound nbttagcompound, World world) {
// CraftBukkit end // CraftBukkit end
@ -537,7 +537,7 @@ index a97e7d3c2..4890023d7 100644
NBTTagList nbttaglist1 = nbttagcompound.getList("Entities", 10); NBTTagList nbttaglist1 = nbttagcompound.getList("Entities", 10);
for (int l = 0; l < nbttaglist1.size(); ++l) { for (int l = 0; l < nbttaglist1.size(); ++l) {
@@ -411,8 +411,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -397,8 +397,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
a(nbttagcompound2, world, chunk); a(nbttagcompound2, world, chunk);
chunk.g(true); chunk.g(true);
} }
@ -546,7 +546,7 @@ index a97e7d3c2..4890023d7 100644
NBTTagList nbttaglist2 = nbttagcompound.getList("TileEntities", 10); NBTTagList nbttaglist2 = nbttagcompound.getList("TileEntities", 10);
for (int i1 = 0; i1 < nbttaglist2.size(); ++i1) { for (int i1 = 0; i1 < nbttaglist2.size(); ++i1) {
@@ -423,8 +421,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -409,8 +407,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
chunk.a(tileentity); chunk.a(tileentity);
} }
} }
@ -555,7 +555,7 @@ index a97e7d3c2..4890023d7 100644
if (nbttagcompound.hasKeyOfType("TileTicks", 9)) { if (nbttagcompound.hasKeyOfType("TileTicks", 9)) {
NBTTagList nbttaglist3 = nbttagcompound.getList("TileTicks", 10); NBTTagList nbttaglist3 = nbttagcompound.getList("TileTicks", 10);
@@ -442,7 +438,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -428,7 +424,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
world.b(new BlockPosition(nbttagcompound4.getInt("x"), nbttagcompound4.getInt("y"), nbttagcompound4.getInt("z")), block, nbttagcompound4.getInt("t"), nbttagcompound4.getInt("p")); world.b(new BlockPosition(nbttagcompound4.getInt("x"), nbttagcompound4.getInt("y"), nbttagcompound4.getInt("z")), block, nbttagcompound4.getInt("t"), nbttagcompound4.getInt("p"));
} }
} }
@ -1078,7 +1078,7 @@ index f74b06794..1fc632e0c 100644
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index be52f3ad1..d778eafb3 100644 index 411720f2d..80bf61164 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -1088,7 +1088,7 @@ index be52f3ad1..d778eafb3 100644
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
@@ -1173,10 +1174,11 @@ public abstract class PlayerList { @@ -1174,10 +1175,11 @@ public abstract class PlayerList {
} }
public void savePlayers() { public void savePlayers() {
@ -1663,7 +1663,7 @@ index 3a95b4465..b5efb9c3f 100644
public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException { public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 5ceb086e5..b56ae7a36 100644 index 0c8295435..f4d71683a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -39,15 +39,9 @@ import org.bukkit.configuration.serialization.DelegateDeserialization; @@ -39,15 +39,9 @@ import org.bukkit.configuration.serialization.DelegateDeserialization;
@ -1929,5 +1929,5 @@ index c32d44df0..5c2fb0058 100644
} }
} }
-- --
2.12.2 2.12.2.windows.2

View File

@ -1,4 +1,4 @@
From d5161bb68e53e6d14389c17582a73a10fce3aeee Mon Sep 17 00:00:00 2001 From c5e40e9bfa3083bdbf6c1eb91991e96b585320f5 Mon Sep 17 00:00:00 2001
From: DoctorDark <doctordark11@gmail.com> From: DoctorDark <doctordark11@gmail.com>
Date: Wed, 16 Mar 2016 02:21:39 -0500 Date: Wed, 16 Mar 2016 02:21:39 -0500
Subject: [PATCH] Configurable end credits Subject: [PATCH] Configurable end credits
@ -20,10 +20,10 @@ index fd606ee14..c00fa83d5 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 030a3e51c..79c9601fa 100644 index f7edd9aa1..dbc5cf632 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -515,6 +515,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -516,6 +516,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
return this.world.pvpMode; return this.world.pvpMode;
} }
@ -39,7 +39,7 @@ index 030a3e51c..79c9601fa 100644
@Nullable @Nullable
public Entity c(int i) { public Entity c(int i) {
if (this.isSleeping()) return this; // CraftBukkit - SPIGOT-3154 if (this.isSleeping()) return this; // CraftBukkit - SPIGOT-3154
@@ -524,7 +533,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -525,7 +534,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.world.kill(this); this.world.kill(this);
if (!this.viewingCredits) { if (!this.viewingCredits) {
this.viewingCredits = true; this.viewingCredits = true;
@ -52,5 +52,5 @@ index 030a3e51c..79c9601fa 100644
} else { } else {
this.b((Statistic) AchievementList.D); this.b((Statistic) AchievementList.D);
-- --
2.12.2 2.12.2.windows.2

View File

@ -1,4 +1,4 @@
From ad16101c81f51dd63f5aff74cc1f10414650e8ce Mon Sep 17 00:00:00 2001 From 154ee18ea861801364d933168a27c5fcda6d6459 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com> From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 23:34:44 -0600 Date: Wed, 2 Mar 2016 23:34:44 -0600
Subject: [PATCH] Configurable container update tick rate Subject: [PATCH] Configurable container update tick rate
@ -19,7 +19,7 @@ index 1bb956515..e6aae7317 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 1ed1859b8..4866f9f34 100644 index b830f833f..bf3e46c35 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -68,6 +68,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -68,6 +68,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -30,7 +30,7 @@ index 1ed1859b8..4866f9f34 100644
// CraftBukkit start // CraftBukkit start
public String displayName; public String displayName;
@@ -230,7 +231,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -231,7 +232,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
--this.noDamageTicks; --this.noDamageTicks;
} }
@ -45,5 +45,5 @@ index 1ed1859b8..4866f9f34 100644
this.closeInventory(); this.closeInventory();
this.activeContainer = this.defaultContainer; this.activeContainer = this.defaultContainer;
-- --
2.12.2 2.12.2.windows.2

View File

@ -1,4 +1,4 @@
From ce608a503abf342c96c23e68f479c099be811aa7 Mon Sep 17 00:00:00 2001 From 9d265dc548c5d1e3df9129a15865e70b1597451d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 2 Mar 2016 23:51:51 -0600 Date: Wed, 2 Mar 2016 23:51:51 -0600
Subject: [PATCH] Don't create Region File's when checking if chunk exists Subject: [PATCH] Don't create Region File's when checking if chunk exists
@ -6,24 +6,8 @@ Subject: [PATCH] Don't create Region File's when checking if chunk exists
Plugins like Dynmap can end up creating tons of emtpy Region Files Plugins like Dynmap can end up creating tons of emtpy Region Files
when using chunkExists. when using chunkExists.
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 4890023d7..79cb3953b 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -39,7 +39,10 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
}
}
- return RegionFileCache.a(this.d, i, j).chunkExists(i & 31, j & 31);
+ // Paper start - Don't create region files when checking that they exist
+ final RegionFile region = RegionFileCache.a(this.d, i, j, false);
+ return region != null && region.chunkExists(i & 31, j & 31);
+ // Paper end
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
index f23429898..933934fb6 100644 index 6ec72689c..0163a4e59 100644
--- a/src/main/java/net/minecraft/server/RegionFileCache.java --- a/src/main/java/net/minecraft/server/RegionFileCache.java
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java
@@ -12,7 +12,13 @@ public class RegionFileCache { @@ -12,7 +12,13 @@ public class RegionFileCache {
@ -49,5 +33,5 @@ index f23429898..933934fb6 100644
file1.mkdirs(); file1.mkdirs();
} }
-- --
2.12.2 2.12.2.windows.2

View File

@ -1,4 +1,4 @@
From 33f879767f8b9a6146f578e89282b711f5d1543d Mon Sep 17 00:00:00 2001 From 810379dfd7052f869995fd68b8e139a640b10899 Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io> From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 03:15:41 -0600 Date: Thu, 3 Mar 2016 03:15:41 -0600
Subject: [PATCH] Add exception reporting event Subject: [PATCH] Add exception reporting event
@ -89,7 +89,7 @@ index e1fc4ea6c..8f1a68d67 100644
} }
} }
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index f7f2d12cf..b0a82e7ed 100644 index fab36ec15..0ad57afba 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -12,6 +12,7 @@ import java.util.Iterator; @@ -12,6 +12,7 @@ import java.util.Iterator;
@ -198,7 +198,7 @@ index 936d6c640..50056f49a 100644
} }
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index b0279ac3e..be13c1131 100644 index 8d1b65885..5f9678aad 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java --- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -216,7 +216,7 @@ index b0279ac3e..be13c1131 100644
} }
} }
@@ -248,6 +250,7 @@ public class RegionFile { @@ -209,6 +211,7 @@ public class RegionFile {
this.b(i, j, (int) (MinecraftServer.aw() / 1000L)); this.b(i, j, (int) (MinecraftServer.aw() / 1000L));
} catch (IOException ioexception) { } catch (IOException ioexception) {
ioexception.printStackTrace(); ioexception.printStackTrace();
@ -225,7 +225,7 @@ index b0279ac3e..be13c1131 100644
} }
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
index 933934fb6..19fbf9b4a 100644 index 0163a4e59..57d6443cd 100644
--- a/src/main/java/net/minecraft/server/RegionFileCache.java --- a/src/main/java/net/minecraft/server/RegionFileCache.java
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -372,5 +372,5 @@ index 9952b64be..e30cfb7b7 100644
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code) // (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
} }
-- --
2.12.2 2.12.2.windows.2

View File

@ -1,4 +1,4 @@
From 30f567605c740413aa96168ce4eb60ab22ee1180 Mon Sep 17 00:00:00 2001 From cfd598467afa046d6f71df7841c168df4758dca1 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 4 Mar 2016 18:18:37 -0600 Date: Fri, 4 Mar 2016 18:18:37 -0600
Subject: [PATCH] Chunk save queue improvements Subject: [PATCH] Chunk save queue improvements
@ -41,7 +41,7 @@ index 9a6f87e59..873ffa77d 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 79cb3953b..7f3e874ba 100644 index bee52d783..8e91be4a1 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -12,14 +12,17 @@ import java.util.Map; @@ -12,14 +12,17 @@ import java.util.Map;
@ -63,21 +63,7 @@ index 79cb3953b..7f3e874ba 100644
private final File d; private final File d;
private final DataConverterManager e; private final DataConverterManager e;
private boolean f; private boolean f;
@@ -33,11 +36,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -134,35 +137,32 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
public boolean chunkExists(World world, int i, int j) {
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j);
- if (this.c.contains(chunkcoordintpair)) {
+ //if (this.c.contains(chunkcoordintpair)) { // Paper - Chunk queue improvements
if (this.b.containsKey(chunkcoordintpair)) {
return true;
}
- }
+ //} // Paper - Chunk queue improvements
// Paper start - Don't create region files when checking that they exist
final RegionFile region = RegionFileCache.a(this.d, i, j, false);
@@ -151,35 +154,32 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
} }
protected void a(ChunkCoordIntPair chunkcoordintpair, NBTTagCompound nbttagcompound) { protected void a(ChunkCoordIntPair chunkcoordintpair, NBTTagCompound nbttagcompound) {
@ -122,7 +108,7 @@ index 79cb3953b..7f3e874ba 100644
if (nbttagcompound != null) { if (nbttagcompound != null) {
try { try {
@@ -188,10 +188,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -171,10 +171,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
ChunkRegionLoader.a.error("Failed to save chunk", exception); ChunkRegionLoader.a.error("Failed to save chunk", exception);
} }
} }
@ -135,7 +121,7 @@ index 79cb3953b..7f3e874ba 100644
} }
return flag; return flag;
@@ -556,4 +557,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -539,4 +540,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
return entity; return entity;
} }
} }
@ -177,5 +163,5 @@ index acfdd52dc..fdbaf5fbd 100644
if (this.b.isEmpty()) { if (this.b.isEmpty()) {
-- --
2.12.2 2.12.2.windows.2

View File

@ -1,4 +1,4 @@
From 82e7c9b1c02794288a3242d11d2b62ee3c46369b Mon Sep 17 00:00:00 2001 From 1a4ce4dfb31730e1359640c638688cbba006b68c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Mon, 4 Mar 2013 23:46:10 -0500 Date: Mon, 4 Mar 2013 23:46:10 -0500
Subject: [PATCH] Chunk Save Reattempt Subject: [PATCH] Chunk Save Reattempt
@ -6,10 +6,10 @@ Subject: [PATCH] Chunk Save Reattempt
We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks. We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks.
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 7f3e874ba..310ab96ab 100644 index 8e91be4a1..721a3cd81 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -182,11 +182,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -165,11 +165,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
NBTTagCompound nbttagcompound = chunk.compound; // Paper - Chunk queue improvements NBTTagCompound nbttagcompound = chunk.compound; // Paper - Chunk queue improvements
if (nbttagcompound != null) { if (nbttagcompound != null) {
@ -28,10 +28,10 @@ index 7f3e874ba..310ab96ab 100644
synchronized (lock) { if (this.b.get(chunkcoordintpair) == nbttagcompound) { this.b.remove(chunkcoordintpair); } }// Paper - This will not equal if a newer version is still pending synchronized (lock) { if (this.b.get(chunkcoordintpair) == nbttagcompound) { this.b.remove(chunkcoordintpair); } }// Paper - This will not equal if a newer version is still pending
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index be13c1131..9cfc46bc2 100644 index 5f9678aad..ed840dbc9 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java --- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -249,8 +249,7 @@ public class RegionFile { @@ -210,8 +210,7 @@ public class RegionFile {
this.b(i, j, (int) (MinecraftServer.aw() / 1000L)); this.b(i, j, (int) (MinecraftServer.aw() / 1000L));
} catch (IOException ioexception) { } catch (IOException ioexception) {
@ -42,5 +42,5 @@ index be13c1131..9cfc46bc2 100644
} }
-- --
2.12.2 2.12.2.windows.2

View File

@ -1,4 +1,4 @@
From dc7e3a08fdabca0ced4e60d7c27aa58790185d29 Mon Sep 17 00:00:00 2001 From 3ebd0b6e30d5bb88cd31408f92c49f79e928d2a9 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 28 May 2015 23:00:19 -0400 Date: Thu, 28 May 2015 23:00:19 -0400
Subject: [PATCH] Handle Item Meta Inconsistencies Subject: [PATCH] Handle Item Meta Inconsistencies
@ -144,7 +144,7 @@ index a54bc7c42..81ec8f69e 100644
static Map<Enchantment, Integer> getEnchantments(net.minecraft.server.ItemStack item) { static Map<Enchantment, Integer> getEnchantments(net.minecraft.server.ItemStack item) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index a9a338a82..0ac639f76 100644 index 9d0c05cd0..ab50ee92e 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -6,13 +6,8 @@ import java.lang.annotation.RetentionPolicy; @@ -6,13 +6,8 @@ import java.lang.annotation.RetentionPolicy;
@ -224,7 +224,7 @@ index a9a338a82..0ac639f76 100644
for (int i = 0; i < ench.size(); i++) { for (int i = 0; i < ench.size(); i++) {
int id = 0xffff & ((NBTTagCompound) ench.get(i)).getShort(ENCHANTMENTS_ID.NBT); int id = 0xffff & ((NBTTagCompound) ench.get(i)).getShort(ENCHANTMENTS_ID.NBT);
@@ -546,13 +549,13 @@ class CraftMetaItem implements ItemMeta, Repairable { @@ -545,13 +548,13 @@ class CraftMetaItem implements ItemMeta, Repairable {
void deserializeInternal(NBTTagCompound tag) { void deserializeInternal(NBTTagCompound tag) {
} }
@ -240,7 +240,7 @@ index a9a338a82..0ac639f76 100644
for (Map.Entry<?, ?> entry : ench.entrySet()) { for (Map.Entry<?, ?> entry : ench.entrySet()) {
Enchantment enchantment = Enchantment.getByName(entry.getKey().toString()); Enchantment enchantment = Enchantment.getByName(entry.getKey().toString());
@@ -696,12 +699,12 @@ class CraftMetaItem implements ItemMeta, Repairable { @@ -695,12 +698,12 @@ class CraftMetaItem implements ItemMeta, Repairable {
} }
public Map<Enchantment, Integer> getEnchants() { public Map<Enchantment, Integer> getEnchants() {
@ -255,7 +255,7 @@ index a9a338a82..0ac639f76 100644
} }
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
@@ -871,7 +874,7 @@ class CraftMetaItem implements ItemMeta, Repairable { @@ -870,7 +873,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
clone.lore = new ArrayList<String>(this.lore); clone.lore = new ArrayList<String>(this.lore);
} }
if (this.enchantments != null) { if (this.enchantments != null) {
@ -264,7 +264,7 @@ index a9a338a82..0ac639f76 100644
} }
clone.hideFlag = this.hideFlag; clone.hideFlag = this.hideFlag;
clone.unbreakable = this.unbreakable; clone.unbreakable = this.unbreakable;
@@ -1028,6 +1031,23 @@ class CraftMetaItem implements ItemMeta, Repairable { @@ -1027,6 +1030,23 @@ class CraftMetaItem implements ItemMeta, Repairable {
} }
} }
@ -289,5 +289,5 @@ index a9a338a82..0ac639f76 100644
private final Spigot spigot = new Spigot() private final Spigot spigot = new Spigot()
{ {
-- --
2.12.2 2.12.2.windows.2

View File

@ -1,4 +1,4 @@
From 8947fc06b9c49517b322470cd569d158c05b4118 Mon Sep 17 00:00:00 2001 From 6e0a59b05544ff285c2775c54e01c0a5b08c8371 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 13 Apr 2016 02:10:49 -0400 Date: Wed, 13 Apr 2016 02:10:49 -0400
Subject: [PATCH] Configurable Player Collision Subject: [PATCH] Configurable Player Collision
@ -75,7 +75,7 @@ index d8ec50455..eb45d3cf2 100644
} }
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index b8d48b45c..50a3dfe44 100644 index e303b45f0..97322c5da 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -71,6 +71,7 @@ public abstract class PlayerList { @@ -71,6 +71,7 @@ public abstract class PlayerList {
@ -99,7 +99,7 @@ index b8d48b45c..50a3dfe44 100644
// CraftBukkit - Moved from above, added world // CraftBukkit - Moved from above, added world
PlayerList.f.info(entityplayer.getName() + "[" + s1 + "] logged in with entity id " + entityplayer.getId() + " at ([" + entityplayer.world.worldData.getName() + "]" + entityplayer.locX + ", " + entityplayer.locY + ", " + entityplayer.locZ + ")"); PlayerList.f.info(entityplayer.getName() + "[" + s1 + "] logged in with entity id " + entityplayer.getId() + " at ([" + entityplayer.world.worldData.getName() + "]" + entityplayer.locX + ", " + entityplayer.locY + ", " + entityplayer.locZ + ")");
} }
@@ -399,6 +406,16 @@ public abstract class PlayerList { @@ -400,6 +407,16 @@ public abstract class PlayerList {
entityplayer.playerTick();// SPIGOT-924 entityplayer.playerTick();// SPIGOT-924
// CraftBukkit end // CraftBukkit end
@ -116,7 +116,7 @@ index b8d48b45c..50a3dfe44 100644
this.savePlayerFile(entityplayer); this.savePlayerFile(entityplayer);
if (entityplayer.isPassenger()) { if (entityplayer.isPassenger()) {
Entity entity = entityplayer.getVehicle(); Entity entity = entityplayer.getVehicle();
@@ -1313,7 +1330,13 @@ public abstract class PlayerList { @@ -1314,7 +1331,13 @@ public abstract class PlayerList {
player.playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message player.playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message
} }
// CraftBukkit end // CraftBukkit end
@ -132,5 +132,5 @@ index b8d48b45c..50a3dfe44 100644
// CraftBukkit start // CraftBukkit start
-- --
2.12.2 2.12.2.windows.2

View File

@ -1,11 +1,11 @@
From c6514d3a10a21f812014901a8f530813fd10a66b Mon Sep 17 00:00:00 2001 From 230b15e3cf0ecccba8688946cc029fd5d3a4a54d Mon Sep 17 00:00:00 2001
From: Isaac Moore <rmsy@me.com> From: Isaac Moore <rmsy@me.com>
Date: Tue, 19 Apr 2016 14:09:31 -0500 Date: Tue, 19 Apr 2016 14:09:31 -0500
Subject: [PATCH] Implement PlayerLocaleChangeEvent Subject: [PATCH] Implement PlayerLocaleChangeEvent
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 4866f9f34..cf12e51e4 100644 index bf3e46c35..ad1bb7bab 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -31,7 +31,7 @@ import org.bukkit.inventory.MainHand; @@ -31,7 +31,7 @@ import org.bukkit.inventory.MainHand;
@ -17,7 +17,7 @@ index 4866f9f34..cf12e51e4 100644
public PlayerConnection playerConnection; public PlayerConnection playerConnection;
public final MinecraftServer server; public final MinecraftServer server;
public final PlayerInteractManager playerInteractManager; public final PlayerInteractManager playerInteractManager;
@@ -1104,7 +1104,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -1105,7 +1105,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.server.server.getPluginManager().callEvent(event); this.server.server.getPluginManager().callEvent(event);
} }
// CraftBukkit end // CraftBukkit end
@ -34,7 +34,7 @@ index 4866f9f34..cf12e51e4 100644
this.ch = packetplayinsettings.d(); this.ch = packetplayinsettings.d();
this.getDataWatcher().set(EntityPlayer.bq, Byte.valueOf((byte) packetplayinsettings.e())); this.getDataWatcher().set(EntityPlayer.bq, Byte.valueOf((byte) packetplayinsettings.e()));
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 5f6b182d6..233903b5f 100644 index 8e06c2140..61c32223d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1691,7 +1691,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1691,7 +1691,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -50,5 +50,5 @@ index 5f6b182d6..233903b5f 100644
@Override @Override
-- --
2.12.2 2.12.2.windows.2

View File

@ -1,4 +1,4 @@
From 8ed79f772341407250572ea3a08b13d46bafab63 Mon Sep 17 00:00:00 2001 From df9b45642a0350faf91c0100855ee2d22435f4ce Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 21 Jun 2016 22:54:34 -0400 Date: Tue, 21 Jun 2016 22:54:34 -0400
Subject: [PATCH] Fix Double World Add issues Subject: [PATCH] Fix Double World Add issues
@ -8,10 +8,10 @@ Vanilla will double add Spider Jockeys to the world, so ignore already added.
Also add debug if something else tries to, and abort before world gets bad state Also add debug if something else tries to, and abort before world gets bad state
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 310ab96ab..19411212a 100644 index 721a3cd81..90d069539 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -525,7 +525,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -508,7 +508,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
} }
public static void a(Entity entity, World world, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) { public static void a(Entity entity, World world, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {
@ -33,5 +33,5 @@ index 7ed3a0677..7900fca57 100644
int i = MathHelper.floor(entity.locX / 16.0D); int i = MathHelper.floor(entity.locX / 16.0D);
int j = MathHelper.floor(entity.locZ / 16.0D); int j = MathHelper.floor(entity.locZ / 16.0D);
-- --
2.12.2 2.12.2.windows.2

View File

@ -1,14 +1,14 @@
From ce4e97796333e81052f7e5267af694d1ebb49f50 Mon Sep 17 00:00:00 2001 From 44ea66d13039d7c00b6fb87a41a187ba42690249 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 31 Jul 2016 16:33:03 -0500 Date: Sun, 31 Jul 2016 16:33:03 -0500
Subject: [PATCH] Re-track players that dismount from other players Subject: [PATCH] Re-track players that dismount from other players
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index cf12e51e4..acda1843d 100644 index ad1bb7bab..4e8efc549 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -653,6 +653,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -654,6 +654,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
if (entity1 != entity && this.playerConnection != null) { if (entity1 != entity && this.playerConnection != null) {
this.playerConnection.a(this.locX, this.locY, this.locZ, this.yaw, this.pitch); this.playerConnection.a(this.locX, this.locY, this.locZ, this.yaw, this.pitch);
} }
@ -23,5 +23,5 @@ index cf12e51e4..acda1843d 100644
} }
-- --
2.12.2 2.12.2.windows.2

View File

@ -1,4 +1,4 @@
From acd7a746b5bf9c66021066b91467f8f808772d3d Mon Sep 17 00:00:00 2001 From 4978f444ee1bb732f34447349281f25b8f470a13 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Mon, 19 Sep 2016 23:16:39 -0400 Date: Mon, 19 Sep 2016 23:16:39 -0400
Subject: [PATCH] Auto Save Improvements Subject: [PATCH] Auto Save Improvements
@ -76,7 +76,7 @@ index 88437d77a..9f7f32dc2 100644
public Random a(long i) { public Random a(long i) {
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 0a8e09e5e..ad668be62 100644 index 81b9bb884..71df9e4aa 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -96,7 +96,7 @@ index 0a8e09e5e..ad668be62 100644
} }
} }
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index acda1843d..171ed25c3 100644 index 4e8efc549..55c966811 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -32,6 +32,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -32,6 +32,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -155,7 +155,7 @@ index 2349c3ade..8134501c7 100644
this.methodProfiler.a("tallying"); this.methodProfiler.a("tallying");
// Spigot start // Spigot start
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 50a3dfe44..185b5929f 100644 index 97322c5da..58f30fb1d 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -330,6 +330,7 @@ public abstract class PlayerList { @@ -330,6 +330,7 @@ public abstract class PlayerList {
@ -166,7 +166,7 @@ index 50a3dfe44..185b5929f 100644
this.playerFileData.save(entityplayer); this.playerFileData.save(entityplayer);
ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) this.o.get(entityplayer.getUniqueID()); ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) this.o.get(entityplayer.getUniqueID());
@@ -1206,13 +1207,23 @@ public abstract class PlayerList { @@ -1207,13 +1208,23 @@ public abstract class PlayerList {
} }
@ -215,5 +215,5 @@ index f969d2a72..cc0e8d2c8 100644
timings.worldSaveChunks.startTiming(); // Paper timings.worldSaveChunks.startTiming(); // Paper
chunkproviderserver.a(flag); chunkproviderserver.a(flag);
-- --
2.12.2 2.12.2.windows.2

View File

@ -1,4 +1,4 @@
From 8d7d278a44258fea1363df19c5e4e1868fb6e53c Mon Sep 17 00:00:00 2001 From d90efd20600735e017db928e235bde3740181dab Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 21 Sep 2016 23:48:39 -0400 Date: Wed, 21 Sep 2016 23:48:39 -0400
Subject: [PATCH] Auto fix bad Y levels on player login Subject: [PATCH] Auto fix bad Y levels on player login
@ -6,10 +6,10 @@ Subject: [PATCH] Auto fix bad Y levels on player login
Bring down to a saner Y level if super high, as this can cause the server to crash Bring down to a saner Y level if super high, as this can cause the server to crash
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 171ed25c3..32bce920b 100644 index 55c966811..eca224bdb 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -130,6 +130,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -131,6 +131,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
} }
} }
@ -18,5 +18,5 @@ index 171ed25c3..32bce920b 100644
} }
-- --
2.12.2 2.12.2.windows.2

View File

@ -1,4 +1,4 @@
From f3d367714519d31627c7ef374578b894060495cd Mon Sep 17 00:00:00 2001 From f8e15ecff289a756ab1e2cdf81ea4fbc150e4bd2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 3 Nov 2016 21:52:22 -0400 Date: Thu, 3 Nov 2016 21:52:22 -0400
Subject: [PATCH] Prevent Auto Save if Save Queue is full Subject: [PATCH] Prevent Auto Save if Save Queue is full
@ -23,7 +23,7 @@ index 220ecaf8d..4ca44afa9 100644
private void removeCorruptTEs() { private void removeCorruptTEs() {
removeCorruptTEs = getBoolean("remove-corrupt-tile-entities", false); removeCorruptTEs = getBoolean("remove-corrupt-tile-entities", false);
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index ad668be62..916bf53f4 100644 index 71df9e4aa..0fb1f8427 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -254,6 +254,14 @@ public class ChunkProviderServer implements IChunkProvider { @@ -254,6 +254,14 @@ public class ChunkProviderServer implements IChunkProvider {
@ -51,17 +51,18 @@ index ad668be62..916bf53f4 100644
} }
} }
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 19411212a..139f2799c 100644 index 90d069539..895882b2e 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -33,6 +33,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -32,6 +32,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
this.e = dataconvertermanager;
} }
// CraftBukkit start
+ public int getQueueSize() { return queue.size(); } // Paper + public int getQueueSize() { return queue.size(); } // Paper
public boolean chunkExists(World world, int i, int j) { +
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j); // CraftBukkit start - Add async variant, provide compatibility
@Nullable
public Chunk a(World world, int i, int j) throws IOException {
-- --
2.12.2 2.12.2.windows.2

View File

@ -1,4 +1,4 @@
From beb15103f9456ab0f8e3df370a52048e13fd7cc3 Mon Sep 17 00:00:00 2001 From bdd1befe24e100ea6a31702f49dfbe8020bbf0cf Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 4 Nov 2016 02:12:10 -0400 Date: Fri, 4 Nov 2016 02:12:10 -0400
Subject: [PATCH] Chunk Save Stats Debug Option Subject: [PATCH] Chunk Save Stats Debug Option
@ -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. 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 diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 916bf53f4..7006466b5 100644 index 0fb1f8427..dabe4137f 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -28,6 +28,11 @@ public class ChunkProviderServer implements IChunkProvider { @@ -28,6 +28,11 @@ public class ChunkProviderServer implements IChunkProvider {
@ -55,13 +55,13 @@ index 916bf53f4..7006466b5 100644
return false; return false;
} }
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 139f2799c..a10964b5b 100644 index 895882b2e..a4c0b0c96 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -33,7 +33,13 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -32,7 +32,13 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
this.e = dataconvertermanager;
} }
// CraftBukkit start
- public int getQueueSize() { return queue.size(); } // Paper - public int getQueueSize() { return queue.size(); } // Paper
+ // Paper start + // Paper start
+ private long queuedSaves = 0; + private long queuedSaves = 0;
@ -70,10 +70,10 @@ index 139f2799c..a10964b5b 100644
+ public long getQueuedSaves() { return queuedSaves; } + public long getQueuedSaves() { return queuedSaves; }
+ public long getProcessedSaves() { return processedSaves.longValue(); } + public long getProcessedSaves() { return processedSaves.longValue(); }
+ // Paper end + // Paper end
public boolean chunkExists(World world, int i, int j) {
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j);
@@ -158,6 +164,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { // CraftBukkit start - Add async variant, provide compatibility
@Nullable
@@ -142,6 +148,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
synchronized (lock) { // Paper - Chunk queue improvements synchronized (lock) { // Paper - Chunk queue improvements
this.b.put(chunkcoordintpair, nbttagcompound); this.b.put(chunkcoordintpair, nbttagcompound);
} }
@ -81,7 +81,7 @@ index 139f2799c..a10964b5b 100644
queue.add(new QueuedChunk(chunkcoordintpair, nbttagcompound)); // Paper - Chunk queue improvements queue.add(new QueuedChunk(chunkcoordintpair, nbttagcompound)); // Paper - Chunk queue improvements
FileIOThread.a().a(this); FileIOThread.a().a(this);
@@ -175,6 +182,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -159,6 +166,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
return false; return false;
} else { } else {
ChunkCoordIntPair chunkcoordintpair = chunk.coords; // Paper - Chunk queue improvements ChunkCoordIntPair chunkcoordintpair = chunk.coords; // Paper - Chunk queue improvements
@ -90,5 +90,5 @@ index 139f2799c..a10964b5b 100644
boolean flag; boolean flag;
-- --
2.12.2 2.12.2.windows.2

View File

@ -1,11 +1,11 @@
From df2fd9ca4186acf80f5f3516d1d6473d29f4c2b2 Mon Sep 17 00:00:00 2001 From 8fe1d79d96efbc0d370340b62f9c9bbf85fa2bd4 Mon Sep 17 00:00:00 2001
From: Alfie Cleveland <alfeh@me.com> From: Alfie Cleveland <alfeh@me.com>
Date: Fri, 25 Nov 2016 13:22:40 +0000 Date: Fri, 25 Nov 2016 13:22:40 +0000
Subject: [PATCH] Optimise removeQueue Subject: [PATCH] Optimise removeQueue
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 32bce920b..56ce2554d 100644 index eca224bdb..58d40f994 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -4,7 +4,9 @@ import com.google.common.collect.Lists; @@ -4,7 +4,9 @@ import com.google.common.collect.Lists;
@ -27,7 +27,7 @@ index 32bce920b..56ce2554d 100644
private final ServerStatisticManager bU; private final ServerStatisticManager bU;
private float bV = Float.MIN_VALUE; private float bV = Float.MIN_VALUE;
private int bW = Integer.MIN_VALUE; private int bW = Integer.MIN_VALUE;
@@ -250,10 +252,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -251,10 +253,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
Iterator iterator = this.removeQueue.iterator(); Iterator iterator = this.removeQueue.iterator();
int j = 0; int j = 0;
@ -46,7 +46,7 @@ index 32bce920b..56ce2554d 100644
this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(aint)); this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(aint));
} }
@@ -994,7 +1003,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -995,7 +1004,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.lastSentExp = -1; this.lastSentExp = -1;
this.lastHealthSent = -1.0F; this.lastHealthSent = -1.0F;
this.cc = -1; this.cc = -1;
@ -61,5 +61,5 @@ index 32bce920b..56ce2554d 100644
protected void a(MobEffect mobeffect) { protected void a(MobEffect mobeffect) {
-- --
2.12.2 2.12.2.windows.2

View File

@ -1,4 +1,4 @@
From 7fa342a5b6c89bbc3be05d7b6b87693d2d78c64c Mon Sep 17 00:00:00 2001 From bd8532227d23fe7a62d16e8d4695f237ad2fc408 Mon Sep 17 00:00:00 2001
From: Alfie Cleveland <alfeh@me.com> From: Alfie Cleveland <alfeh@me.com>
Date: Tue, 27 Dec 2016 01:57:57 +0000 Date: Tue, 27 Dec 2016 01:57:57 +0000
Subject: [PATCH] Properly fix item duplication bug Subject: [PATCH] Properly fix item duplication bug
@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug
Credit to prplz for figuring out the real issue Credit to prplz for figuring out the real issue
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 56ce2554..a5c5bd4b 100644 index 58d40f994..acb4469d2 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1345,7 +1345,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -1346,7 +1346,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override @Override
protected boolean isFrozen() { protected boolean isFrozen() {
@ -19,7 +19,7 @@ index 56ce2554..a5c5bd4b 100644
public void reset() { public void reset() {
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 43757500..7c2d43ac 100644 index 437575003..7c2d43ac2 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2565,6 +2565,6 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -2565,6 +2565,6 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@ -31,5 +31,5 @@ index 43757500..7c2d43ac 100644
} }
} }
-- --
2.12.2 2.12.2.windows.2

View File

@ -1,4 +1,4 @@
From 92c63591e1ef7367804389d182d09755a26693c5 Mon Sep 17 00:00:00 2001 From ec9ab2991de89ca5c7c8c51bb4ab8abbee15d5d0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 7 Jan 2017 15:41:58 -0500 Date: Sat, 7 Jan 2017 15:41:58 -0500
Subject: [PATCH] Enforce Sync Player Saves Subject: [PATCH] Enforce Sync Player Saves
@ -7,10 +7,10 @@ Saving players async is extremely dangerous. This will force it to main
the same way we handle async chunk loads. the same way we handle async chunk loads.
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 185b5929..91a45a75 100644 index 58f30fb1d..034bdb7cf 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1213,6 +1213,7 @@ public abstract class PlayerList { @@ -1214,6 +1214,7 @@ public abstract class PlayerList {
} }
public void savePlayers(Integer interval) { public void savePlayers(Integer interval) {
@ -18,7 +18,7 @@ index 185b5929..91a45a75 100644
long now = MinecraftServer.currentTick; long now = MinecraftServer.currentTick;
MinecraftTimings.savePlayers.startTiming(); // Paper MinecraftTimings.savePlayers.startTiming(); // Paper
for (int i = 0; i < this.players.size(); ++i) { for (int i = 0; i < this.players.size(); ++i) {
@@ -1222,6 +1223,7 @@ public abstract class PlayerList { @@ -1223,6 +1224,7 @@ public abstract class PlayerList {
} }
} }
MinecraftTimings.savePlayers.stopTiming(); // Paper MinecraftTimings.savePlayers.stopTiming(); // Paper
@ -27,5 +27,5 @@ index 185b5929..91a45a75 100644
// Paper end // Paper end
-- --
2.12.2 2.12.2.windows.2

@ -1 +1 @@
Subproject commit bbfe2ba6aa89f6299d2efe793b1956e8fc96b2c5 Subproject commit 7861de61e648464ce3e3dd635ed19f92521fc952

@ -1 +1 @@
Subproject commit c19c2932bf14b62a6d31266c8ccd9003bfe05e91 Subproject commit a2af8f0a730c11af84d995ccfcf36544ddb4eea0

@ -1 +1 @@
Subproject commit 38ddb34339a47f2d52e9e36ee7e6cca8fbf61932 Subproject commit a3f6ea510b919b8d64636ed6be3b7b23af9e6b16