summaryrefslogtreecommitdiffstats
path: root/nms-patches/MinecraftServer.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/MinecraftServer.patch')
-rw-r--r--nms-patches/MinecraftServer.patch80
1 files changed, 40 insertions, 40 deletions
diff --git a/nms-patches/MinecraftServer.patch b/nms-patches/MinecraftServer.patch
index 664f9ded..1493d7e5 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
-@@ -40,6 +40,13 @@
+@@ -41,6 +41,13 @@
import org.apache.commons.lang3.Validate;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -14,7 +14,7 @@
public abstract class MinecraftServer implements ICommandListener, Runnable, IAsyncTaskHandler, IMojangStatistics {
-@@ -97,19 +104,61 @@
+@@ -98,19 +105,61 @@
private Thread serverThread;
private long ab = aw();
@@ -79,7 +79,7 @@
protected CommandDispatcher i() {
return new CommandDispatcher(this);
}
-@@ -147,6 +196,7 @@
+@@ -148,6 +197,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);
-@@ -170,36 +220,108 @@
+@@ -171,36 +221,108 @@
worlddata.a(s1);
worldsettings = new WorldSettings(worlddata);
}
@@ -207,7 +207,7 @@
this.v.setPlayerFileData(this.worldServer);
this.a(this.getDifficulty());
this.l();
-@@ -215,25 +337,38 @@
+@@ -216,25 +338,38 @@
this.b("menu.generatingTerrain");
boolean flag4 = false;
@@ -261,7 +261,7 @@
this.t();
}
-@@ -273,14 +408,17 @@
+@@ -274,14 +409,17 @@
protected void t() {
this.f = null;
this.g = 0;
@@ -281,7 +281,7 @@
if (worldserver != null) {
if (!flag) {
-@@ -289,6 +427,7 @@
+@@ -290,6 +428,7 @@
try {
worldserver.save(true, (IProgressUpdate) null);
@@ -289,7 +289,7 @@
} catch (ExceptionWorldConflict exceptionworldconflict) {
MinecraftServer.LOGGER.warn(exceptionworldconflict.getMessage());
}
-@@ -297,8 +436,24 @@
+@@ -298,8 +437,24 @@
}
@@ -315,7 +315,7 @@
if (this.an() != null) {
this.an().b();
}
-@@ -307,6 +462,7 @@
+@@ -308,6 +463,7 @@
MinecraftServer.LOGGER.info("Saving players");
this.v.savePlayers();
this.v.u();
@@ -323,7 +323,7 @@
}
if (this.worldServer != null) {
-@@ -328,12 +484,14 @@
+@@ -329,12 +485,14 @@
aworldserver = this.worldServer;
i = aworldserver.length;
@@ -338,7 +338,7 @@
}
if (this.m.d()) {
-@@ -373,6 +531,7 @@
+@@ -374,6 +532,7 @@
long k = j - this.ab;
if (k > 2000L && this.ab - this.R >= 15000L) {
@@ -346,7 +346,7 @@
MinecraftServer.LOGGER.warn("Can\'t keep up! Did the system time change, or is the server overloaded? Running {}ms behind, skipping {} tick(s)", Long.valueOf(k), Long.valueOf(k / 50L));
k = 2000L;
this.R = this.ab;
-@@ -385,11 +544,12 @@
+@@ -386,11 +545,12 @@
i += k;
this.ab = j;
@@ -360,7 +360,7 @@
i -= 50L;
this.C();
}
-@@ -427,6 +587,12 @@
+@@ -428,6 +588,12 @@
} catch (Throwable throwable1) {
MinecraftServer.LOGGER.error("Exception stopping the server", throwable1);
} finally {
@@ -373,7 +373,7 @@
this.B();
}
-@@ -470,7 +636,7 @@
+@@ -471,7 +637,7 @@
public void B() {}
@@ -382,7 +382,7 @@
long i = System.nanoTime();
++this.ticks;
-@@ -496,7 +662,7 @@
+@@ -497,7 +663,7 @@
this.q.b().a(agameprofile);
}
@@ -391,7 +391,7 @@
this.methodProfiler.a("save");
this.v.savePlayers();
this.saveChunks(true);
-@@ -520,6 +686,7 @@
+@@ -521,6 +687,7 @@
}
public void D() {
@@ -399,7 +399,7 @@
this.methodProfiler.a("jobs");
Queue queue = this.j;
-@@ -531,20 +698,38 @@
+@@ -532,22 +699,40 @@
this.methodProfiler.c("levels");
@@ -430,7 +430,9 @@
+ // if (i == 0 || this.getAllowNether()) {
+ WorldServer worldserver = this.worlds.get(i);
- this.methodProfiler.a(worldserver.getWorldData().getName());
+ this.methodProfiler.a(() -> {
+ return worldserver.getWorldData().getName();
+ });
+ /* Drop global time updates
if (this.ticks % 20 == 0) {
this.methodProfiler.a("timeSync");
@@ -441,7 +443,7 @@
this.methodProfiler.a("tick");
-@@ -571,9 +756,9 @@
+@@ -574,9 +759,9 @@
worldserver.getTracker().updatePlayers();
this.methodProfiler.b();
this.methodProfiler.b();
@@ -453,7 +455,7 @@
}
this.methodProfiler.c("connection");
-@@ -599,10 +784,11 @@
+@@ -602,10 +787,11 @@
this.o.add(itickable);
}
@@ -466,7 +468,7 @@
boolean flag = true;
String s = null;
String s1 = ".";
-@@ -647,13 +833,16 @@
+@@ -650,13 +836,16 @@
++j;
}
}
@@ -484,7 +486,7 @@
if (s != null) {
dedicatedserver.i(s);
}
-@@ -684,6 +873,25 @@
+@@ -687,6 +876,25 @@
dedicatedserver.stop();
}
});
@@ -510,7 +512,7 @@
} catch (Exception exception) {
MinecraftServer.LOGGER.fatal("Failed to start the minecraft server", exception);
}
-@@ -691,8 +899,10 @@
+@@ -694,8 +902,10 @@
}
public void F() {
@@ -521,7 +523,7 @@
}
public File d(String s) {
-@@ -708,7 +918,14 @@
+@@ -711,7 +921,14 @@
}
public WorldServer getWorldServer(int i) {
@@ -537,7 +539,7 @@
}
public String getVersion() {
-@@ -732,7 +949,7 @@
+@@ -735,7 +952,7 @@
}
public boolean isDebugging() {
@@ -546,7 +548,7 @@
}
public void g(String s) {
-@@ -747,7 +964,7 @@
+@@ -750,7 +967,7 @@
}
public String getServerModName() {
@@ -555,7 +557,7 @@
}
public CrashReport b(CrashReport crashreport) {
-@@ -776,6 +993,7 @@
+@@ -779,6 +996,7 @@
}
public List<String> tabCompleteCommand(ICommandListener icommandlistener, String s, @Nullable BlockPosition blockposition, boolean flag) {
@@ -563,7 +565,7 @@
ArrayList arraylist = Lists.newArrayList();
boolean flag1 = s.startsWith("/");
-@@ -818,10 +1036,13 @@
+@@ -821,10 +1039,13 @@
return arraylist;
}
@@ -578,7 +580,7 @@
}
public String getName() {
-@@ -877,11 +1098,13 @@
+@@ -880,11 +1101,13 @@
}
public void a(EnumDifficulty enumdifficulty) {
@@ -595,7 +597,7 @@
if (worldserver != null) {
if (worldserver.getWorldData().isHardcore()) {
-@@ -948,13 +1171,11 @@
+@@ -951,13 +1174,11 @@
int i = 0;
if (this.worldServer != null) {
@@ -613,7 +615,7 @@
WorldData worlddata = worldserver.getWorldData();
mojangstatisticsgenerator.a("world[" + i + "][dimension]", Integer.valueOf(worldserver.worldProvider.getDimensionManager().getDimensionID()));
-@@ -987,7 +1208,7 @@
+@@ -990,7 +1211,7 @@
public abstract boolean aa();
public boolean getOnlineMode() {
@@ -622,7 +624,7 @@
}
public void setOnlineMode(boolean flag) {
-@@ -1067,13 +1288,9 @@
+@@ -1070,13 +1291,9 @@
}
public void setGamemode(EnumGamemode enumgamemode) {
@@ -639,7 +641,7 @@
}
}
-@@ -1097,7 +1314,7 @@
+@@ -1100,7 +1317,7 @@
}
public World getWorld() {
@@ -648,7 +650,7 @@
}
public int getSpawnProtection() {
-@@ -1157,8 +1374,10 @@
+@@ -1160,8 +1377,10 @@
WorldServer[] aworldserver = this.worldServer;
int i = aworldserver.length;
@@ -661,7 +663,7 @@
if (worldserver != null) {
Entity entity = worldserver.getEntity(uuid);
-@@ -1173,7 +1392,7 @@
+@@ -1176,7 +1395,7 @@
}
public boolean getSendCommandFeedback() {
@@ -670,7 +672,7 @@
}
public MinecraftServer C_() {
-@@ -1186,7 +1405,7 @@
+@@ -1189,7 +1408,7 @@
public <V> ListenableFuture<V> a(Callable<V> callable) {
Validate.notNull(callable);
@@ -679,7 +681,7 @@
ListenableFutureTask listenablefuturetask = ListenableFutureTask.create(callable);
Queue queue = this.j;
-@@ -1229,23 +1448,30 @@
+@@ -1232,17 +1451,17 @@
}
public AdvancementDataWorld getAdvancementData() {
@@ -700,9 +702,7 @@
this.getAdvancementData().reload();
this.aL().f();
this.getPlayerList().reload();
- } else {
-- this.postToMainThread(run<invokedynamic>(this));
-+ this.postToMainThread(() -> reload()); // CraftBukkit - decompile error
+@@ -1251,4 +1470,11 @@
}
}