Update to Minecraft 1.13-pre7

This commit is contained in:
md_5
2018-07-15 10:00:00 +10:00
parent 57ab4cfc6f
commit 421c1728c8
608 changed files with 17788 additions and 9378 deletions

View File

@@ -5,63 +5,63 @@
public class MethodProfiler {
+ public static final boolean ENABLED = Boolean.getBoolean("enableDebugMethodProfiler"); // CraftBukkit - disable unless specified in JVM arguments
private static final Logger b = LogManager.getLogger();
private final List<String> c = Lists.newArrayList();
private final List<Long> d = Lists.newArrayList();
@@ -23,12 +24,14 @@
public MethodProfiler() {}
private static final Logger a = LogManager.getLogger();
private final List<String> b = Lists.newArrayList();
private final List<Long> c = Lists.newArrayList();
@@ -41,6 +42,7 @@
}
public void a() {
+ if (!ENABLED) return; // CraftBukkit
this.f.clear();
this.e = "";
this.c.clear();
public void a(int i) {
+ if (!ENABLED) return; // CraftBukkit
if (!this.d) {
this.d = true;
this.f.clear();
@@ -52,6 +54,7 @@
}
public void a(String s) {
+ if (!ENABLED) return; // CraftBukkit
if (this.a) {
+ if (!ENABLED) return; // CraftBukkit
if (this.d) {
if (!this.e.isEmpty()) {
this.e = this.e + ".";
@@ -41,12 +44,14 @@
@@ -64,12 +67,14 @@
}
public void a(Supplier<String> supplier) {
+ if (!ENABLED) return; // CraftBukkit
if (this.a) {
+ if (!ENABLED) return; // CraftBukkit
if (this.d) {
this.a((String) supplier.get());
}
}
public void b() {
+ if (!ENABLED) return; // CraftBukkit
if (this.a) {
long i = System.nanoTime();
long j = ((Long) this.d.remove(this.d.size() - 1)).longValue();
@@ -69,7 +74,7 @@
public void e() {
+ if (!ENABLED) return; // CraftBukkit
if (this.d && !this.c.isEmpty()) {
long i = SystemUtils.c();
long j = ((Long) this.c.remove(this.c.size() - 1)).longValue();
@@ -92,6 +97,7 @@
}
public List<MethodProfiler.ProfilerInfo> b(String s) {
- if (!this.a) {
+ if (!ENABLED || !this.a) { // CraftBukkit
return Collections.emptyList();
} else {
long i = this.f.containsKey("root") ? ((Long) this.f.get("root")).longValue() : 0L;
@@ -135,11 +140,13 @@
+ if (!ENABLED) return Collections.emptyList(); // CraftBukkit
long i = this.f.containsKey("root") ? ((Long) this.f.get("root")).longValue() : 0L;
long j = this.f.containsKey(s) ? ((Long) this.f.get(s)).longValue() : -1L;
ArrayList arraylist = Lists.newArrayList();
@@ -154,11 +160,13 @@
}
public void c(String s) {
+ if (!ENABLED) return; // CraftBukkit
this.b();
+ if (!ENABLED) return; // CraftBukkit
this.e();
this.a(s);
}
public String c() {
+ if (!ENABLED) return "[DISABLED]"; // CraftBukkit
return this.c.isEmpty() ? "[UNKNOWN]" : (String) this.c.get(this.c.size() - 1);
public String f() {
+ if (!ENABLED) return "[DISABLED]"; // CraftBukkit
return this.b.isEmpty() ? "[UNKNOWN]" : (String) this.b.get(this.b.size() - 1);
}
@@ -159,7 +166,7 @@
@@ -178,7 +186,7 @@
return methodprofiler_profilerinfo.a < this.a ? -1 : (methodprofiler_profilerinfo.a > this.a ? 1 : methodprofiler_profilerinfo.c.compareTo(this.c));
}