Update to 1.12.1

This commit is contained in:
BlackHole
2017-08-03 16:36:06 +02:00
parent 644f1e6e30
commit 01d1cc351b
64 changed files with 151 additions and 224 deletions

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 21 Jan 2017 02:00:33 -0500
Date: Sat, 21 Jan 2017 08:00:33 +0100
Subject: [PATCH] Remove the Vanilla Method Profiler
Spigot rebrought this back after it was removed for years due to the performance hit.
@@ -11,7 +11,7 @@ added, so we do not want any risk of performance degredation.
Paper has a proper Timings system that makes the Vanilla Method profiler obsolete and inferior.
diff --git a/src/main/java/net/minecraft/server/CommandDebug.java b/src/main/java/net/minecraft/server/CommandDebug.java
index 89708da9..7586168d 100644
index 89708da96..7586168db 100644
--- a/src/main/java/net/minecraft/server/CommandDebug.java
+++ b/src/main/java/net/minecraft/server/CommandDebug.java
@@ -0,0 +0,0 @@ public class CommandDebug extends CommandAbstract {
@@ -40,28 +40,15 @@ index 89708da9..7586168d 100644
public List<String> tabComplete(MinecraftServer minecraftserver, ICommandListener icommandlistener, String[] astring, @Nullable BlockPosition blockposition) {
diff --git a/src/main/java/net/minecraft/server/MethodProfiler.java b/src/main/java/net/minecraft/server/MethodProfiler.java
index 20aa10c1..ebc324ed 100644
index 480e2ca97..a76d50723 100644
--- a/src/main/java/net/minecraft/server/MethodProfiler.java
+++ b/src/main/java/net/minecraft/server/MethodProfiler.java
@@ -0,0 +0,0 @@ import java.util.List;
import java.util.Map;
@@ -0,0 +0,0 @@ import java.util.function.Supplier;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
-
-public class MethodProfiler {
+// Paper - Remove this system - we have a more efficient Timings system
+/*
+class MethodProfiler {
public static final boolean ENABLED = Boolean.getBoolean("enableDebugMethodProfiler"); // CraftBukkit - disable unless specified in JVM arguments
private static final Logger b = LogManager.getLogger();
@@ -0,0 +0,0 @@ public class MethodProfiler {
}
}
}
+*/
+
+public class MethodProfiler {
+// Paper - Remove this system - we have a more efficient Timings system
public class MethodProfiler {
+ public boolean a;
+
+ MethodProfiler() {}
@@ -70,12 +57,30 @@ index 20aa10c1..ebc324ed 100644
+
+ public final void a(String s) {}
+
+ public void a(Supplier<String> supplier) {}
+
+ public final void b() {}
+
+ public List<MethodProfiler.ProfilerInfo> b(String s) {
+ return Collections.emptyList();
+ }
+
+ public final void c(String s) {}
+
+ public final String c() {
+ return null;
+ return "[DISABLED]";
+ }
+}
+/*
+class MethodProfiler {
public static final boolean ENABLED = Boolean.getBoolean("enableDebugMethodProfiler"); // CraftBukkit - disable unless specified in JVM arguments
private static final Logger b = LogManager.getLogger();
@@ -0,0 +0,0 @@ public class MethodProfiler {
if (!ENABLED) return "[DISABLED]"; // CraftBukkit
return this.c.isEmpty() ? "[UNKNOWN]" : (String) this.c.get(this.c.size() - 1);
}
+*/
public static final class ProfilerInfo implements Comparable<MethodProfiler.ProfilerInfo> {
--