summaryrefslogtreecommitdiffstats
path: root/nms-patches/MinecraftServer.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-11-17 12:41:03 +1100
committermd_5 <git@md-5.net>2016-11-17 12:41:03 +1100
commitc25ddf063a808e3adb749e22017661f403c5fb7e (patch)
treeb2efcff512be12fd3e38cf8c36386148ce6ab4ae /nms-patches/MinecraftServer.patch
parent51263e97187a84338f89698eef187284055a682a (diff)
downloadcraftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.gz
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.lz
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.xz
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.zip
Update to Minecraft 1.11
Diffstat (limited to 'nms-patches/MinecraftServer.patch')
-rw-r--r--nms-patches/MinecraftServer.patch102
1 files changed, 51 insertions, 51 deletions
diff --git a/nms-patches/MinecraftServer.patch b/nms-patches/MinecraftServer.patch
index 909dba27..a60fd8bf 100644
--- a/nms-patches/MinecraftServer.patch
+++ b/nms-patches/MinecraftServer.patch
@@ -1,6 +1,6 @@
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
-@@ -38,6 +38,13 @@
+@@ -40,6 +40,13 @@
import org.apache.commons.lang3.Validate;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -14,9 +14,9 @@
public abstract class MinecraftServer implements Runnable, ICommandListener, IAsyncTaskHandler, IMojangStatistics {
-@@ -94,19 +101,61 @@
+@@ -97,19 +104,61 @@
private Thread serverThread;
- private long aa = av();
+ private long ab = aw();
- public MinecraftServer(File file, Proxy proxy, DataConverterManager dataconvertermanager, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache) {
+ // CraftBukkit start
@@ -34,10 +34,10 @@
+
+ public MinecraftServer(OptionSet options, Proxy proxy, DataConverterManager dataconvertermanager, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache) {
this.e = proxy;
- this.U = yggdrasilauthenticationservice;
- this.V = minecraftsessionservice;
- this.W = gameprofilerepository;
- this.X = usercache;
+ this.V = yggdrasilauthenticationservice;
+ this.W = minecraftsessionservice;
+ this.X = gameprofilerepository;
+ this.Y = usercache;
- this.universe = file;
+ // this.universe = file; // CraftBukkit
this.p = new ServerConnection(this);
@@ -79,7 +79,7 @@
protected CommandDispatcher i() {
return new CommandDispatcher(this);
}
-@@ -144,6 +193,7 @@
+@@ -147,6 +196,7 @@
this.a(s);
this.b("menu.loadingLevel");
this.worldServer = new WorldServer[3];
@@ -87,7 +87,7 @@
this.i = new long[this.worldServer.length][100];
IDataManager idatamanager = this.convertable.a(s, true);
-@@ -167,36 +217,108 @@
+@@ -170,36 +220,108 @@
worlddata.a(s1);
worldsettings = new WorldSettings(worlddata);
}
@@ -207,18 +207,18 @@
this.v.setPlayerFileData(this.worldServer);
this.a(this.getDifficulty());
this.l();
-@@ -212,25 +334,38 @@
+@@ -215,25 +337,38 @@
this.b("menu.generatingTerrain");
boolean flag4 = false;
- MinecraftServer.LOGGER.info("Preparing start region for level 0");
- WorldServer worldserver = this.worldServer[0];
- BlockPosition blockposition = worldserver.getSpawn();
-- long j = av();
+- long j = aw();
-
- for (int k = -192; k <= 192 && this.isRunning(); k += 16) {
- for (int l = -192; l <= 192 && this.isRunning(); l += 16) {
-- long i1 = av();
+- long i1 = aw();
-
- if (i1 - j > 1000L) {
- this.a_("Preparing spawn area", i * 100 / 625);
@@ -234,12 +234,12 @@
+ }
+
+ BlockPosition blockposition = worldserver.getSpawn();
-+ long j = av();
++ long j = aw();
+ i = 0;
+
+ for (int k = -192; k <= 192 && this.isRunning(); k += 16) {
+ for (int l = -192; l <= 192 && this.isRunning(); l += 16) {
-+ long i1 = av();
++ long i1 = aw();
+
+ if (i1 - j > 1000L) {
+ this.a_("Preparing spawn area", i * 100 / 625);
@@ -261,7 +261,7 @@
this.t();
}
-@@ -266,14 +401,17 @@
+@@ -273,14 +408,17 @@
protected void t() {
this.f = null;
this.g = 0;
@@ -281,7 +281,7 @@
if (worldserver != null) {
if (!flag) {
-@@ -282,6 +420,7 @@
+@@ -289,6 +427,7 @@
try {
worldserver.save(true, (IProgressUpdate) null);
@@ -289,7 +289,7 @@
} catch (ExceptionWorldConflict exceptionworldconflict) {
MinecraftServer.LOGGER.warn(exceptionworldconflict.getMessage());
}
-@@ -290,8 +429,24 @@
+@@ -297,8 +436,24 @@
}
@@ -312,10 +312,10 @@
+ this.server.disablePlugins();
+ }
+ // CraftBukkit end
- if (this.am() != null) {
- this.am().b();
+ if (this.an() != null) {
+ this.an().b();
}
-@@ -300,6 +455,7 @@
+@@ -307,6 +462,7 @@
MinecraftServer.LOGGER.info("Saving players");
this.v.savePlayers();
this.v.u();
@@ -323,7 +323,7 @@
}
if (this.worldServer != null) {
-@@ -321,12 +477,14 @@
+@@ -328,12 +484,14 @@
aworldserver = this.worldServer;
i = aworldserver.length;
@@ -338,18 +338,18 @@
}
if (this.m.d()) {
-@@ -366,6 +524,7 @@
- long k = j - this.aa;
+@@ -373,6 +531,7 @@
+ long k = j - this.ab;
- if (k > 2000L && this.aa - this.Q >= 15000L) {
+ if (k > 2000L && this.ab - this.R >= 15000L) {
+ if (server.getWarnOnOverload()) // CraftBukkit
MinecraftServer.LOGGER.warn("Can\'t keep up! Did the system time change, or is the server overloaded? Running {}ms behind, skipping {} tick(s)", new Object[] { Long.valueOf(k), Long.valueOf(k / 50L)});
k = 2000L;
- this.Q = this.aa;
-@@ -378,11 +537,12 @@
+ this.R = this.ab;
+@@ -385,11 +544,12 @@
i += k;
- this.aa = j;
+ this.ab = j;
- if (this.worldServer[0].everyoneDeeplySleeping()) {
+ if (this.worlds.get(0).everyoneDeeplySleeping()) { // CraftBukkit
this.C();
@@ -360,7 +360,7 @@
i -= 50L;
this.C();
}
-@@ -420,6 +580,12 @@
+@@ -427,6 +587,12 @@
} catch (Throwable throwable1) {
MinecraftServer.LOGGER.error("Exception stopping the server", throwable1);
} finally {
@@ -373,7 +373,7 @@
this.B();
}
-@@ -463,7 +629,7 @@
+@@ -470,7 +636,7 @@
public void B() {}
@@ -382,7 +382,7 @@
long i = System.nanoTime();
++this.ticks;
-@@ -489,7 +655,7 @@
+@@ -496,7 +662,7 @@
this.q.b().a(agameprofile);
}
@@ -391,7 +391,7 @@
this.methodProfiler.a("save");
this.v.savePlayers();
this.saveChunks(true);
-@@ -513,6 +679,7 @@
+@@ -520,6 +686,7 @@
}
public void D() {
@@ -399,7 +399,7 @@
this.methodProfiler.a("jobs");
Queue queue = this.j;
-@@ -524,20 +691,38 @@
+@@ -531,20 +698,38 @@
this.methodProfiler.c("levels");
@@ -441,7 +441,7 @@
this.methodProfiler.a("tick");
-@@ -564,9 +749,9 @@
+@@ -571,9 +756,9 @@
worldserver.getTracker().updatePlayers();
this.methodProfiler.b();
this.methodProfiler.b();
@@ -453,7 +453,7 @@
}
this.methodProfiler.c("connection");
-@@ -590,10 +775,11 @@
+@@ -597,10 +782,11 @@
this.o.add(itickable);
}
@@ -466,7 +466,7 @@
boolean flag = true;
String s = null;
String s1 = ".";
-@@ -638,13 +824,16 @@
+@@ -645,13 +831,16 @@
++j;
}
}
@@ -484,7 +484,7 @@
if (s != null) {
dedicatedserver.i(s);
}
-@@ -675,6 +864,25 @@
+@@ -682,6 +871,25 @@
dedicatedserver.stop();
}
});
@@ -510,7 +510,7 @@
} catch (Exception exception) {
MinecraftServer.LOGGER.fatal("Failed to start the minecraft server", exception);
}
-@@ -682,8 +890,10 @@
+@@ -689,8 +897,10 @@
}
public void F() {
@@ -521,7 +521,7 @@
}
public File d(String s) {
-@@ -699,7 +909,14 @@
+@@ -706,7 +916,14 @@
}
public WorldServer getWorldServer(int i) {
@@ -537,7 +537,7 @@
}
public String getVersion() {
-@@ -723,7 +940,7 @@
+@@ -730,7 +947,7 @@
}
public boolean isDebugging() {
@@ -546,7 +546,7 @@
}
public void g(String s) {
-@@ -738,7 +955,7 @@
+@@ -745,7 +962,7 @@
}
public String getServerModName() {
@@ -555,7 +555,7 @@
}
public CrashReport b(CrashReport crashreport) {
-@@ -767,6 +984,7 @@
+@@ -774,6 +991,7 @@
}
public List<String> tabCompleteCommand(ICommandListener icommandlistener, String s, @Nullable BlockPosition blockposition, boolean flag) {
@@ -563,7 +563,7 @@
ArrayList arraylist = Lists.newArrayList();
boolean flag1 = s.startsWith("/");
-@@ -809,10 +1027,13 @@
+@@ -816,10 +1034,13 @@
return arraylist;
}
@@ -578,7 +578,7 @@
}
public String getName() {
-@@ -868,11 +1089,13 @@
+@@ -875,11 +1096,13 @@
}
public void a(EnumDifficulty enumdifficulty) {
@@ -595,7 +595,7 @@
if (worldserver != null) {
if (worldserver.getWorldData().isHardcore()) {
-@@ -939,13 +1162,11 @@
+@@ -946,13 +1169,11 @@
int i = 0;
if (this.worldServer != null) {
@@ -613,7 +613,7 @@
WorldData worlddata = worldserver.getWorldData();
mojangstatisticsgenerator.a("world[" + i + "][dimension]", Integer.valueOf(worldserver.worldProvider.getDimensionManager().getDimensionID()));
-@@ -978,7 +1199,7 @@
+@@ -985,7 +1206,7 @@
public abstract boolean aa();
public boolean getOnlineMode() {
@@ -622,7 +622,7 @@
}
public void setOnlineMode(boolean flag) {
-@@ -1050,13 +1271,9 @@
+@@ -1065,13 +1286,9 @@
}
public void setGamemode(EnumGamemode enumgamemode) {
@@ -639,7 +639,7 @@
}
}
-@@ -1088,7 +1305,7 @@
+@@ -1103,7 +1320,7 @@
}
public World getWorld() {
@@ -648,7 +648,7 @@
}
public Entity f() {
-@@ -1160,8 +1377,10 @@
+@@ -1175,8 +1392,10 @@
WorldServer[] aworldserver = this.worldServer;
int i = aworldserver.length;
@@ -661,7 +661,7 @@
if (worldserver != null) {
Entity entity = worldserver.getEntity(uuid);
-@@ -1176,7 +1395,7 @@
+@@ -1191,7 +1410,7 @@
}
public boolean getSendCommandFeedback() {
@@ -670,7 +670,7 @@
}
public void a(CommandObjectiveExecutor.EnumCommandResult commandobjectiveexecutor_enumcommandresult, int i) {}
-@@ -1191,7 +1410,7 @@
+@@ -1206,7 +1425,7 @@
public <V> ListenableFuture<V> a(Callable<V> callable) {
Validate.notNull(callable);
@@ -679,7 +679,7 @@
ListenableFutureTask listenablefuturetask = ListenableFutureTask.create(callable);
Queue queue = this.j;
-@@ -1236,4 +1455,11 @@
+@@ -1251,4 +1470,11 @@
public int a(@Nullable WorldServer worldserver) {
return worldserver != null ? worldserver.getGameRules().c("spawnRadius") : 10;
}