diff options
author | md_5 <git@md-5.net> | 2017-08-03 23:00:00 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-08-03 23:00:00 +1000 |
commit | 2a927e8638f66bb076b68ae8a0d1d0ee9ae72732 (patch) | |
tree | 2c786eaa235b2d865b2050d079863825db456459 /nms-patches/MethodProfiler.patch | |
parent | 9a1fc1e2eea898d2839c9f43d5b6eccd13bba090 (diff) | |
download | craftbukkit-2a927e8638f66bb076b68ae8a0d1d0ee9ae72732.tar craftbukkit-2a927e8638f66bb076b68ae8a0d1d0ee9ae72732.tar.gz craftbukkit-2a927e8638f66bb076b68ae8a0d1d0ee9ae72732.tar.lz craftbukkit-2a927e8638f66bb076b68ae8a0d1d0ee9ae72732.tar.xz craftbukkit-2a927e8638f66bb076b68ae8a0d1d0ee9ae72732.zip |
Update to Minecraft 1.12.1
Diffstat (limited to 'nms-patches/MethodProfiler.patch')
-rw-r--r-- | nms-patches/MethodProfiler.patch | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/nms-patches/MethodProfiler.patch b/nms-patches/MethodProfiler.patch index 883f9d9a..b608e64a 100644 --- a/nms-patches/MethodProfiler.patch +++ b/nms-patches/MethodProfiler.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/MethodProfiler.java +++ b/net/minecraft/server/MethodProfiler.java -@@ -12,6 +12,7 @@ +@@ -13,6 +13,7 @@ public class MethodProfiler { @@ -8,7 +8,7 @@ private static final Logger b = LogManager.getLogger(); private final List<String> c = Lists.newArrayList(); private final List<Long> d = Lists.newArrayList(); -@@ -22,12 +23,14 @@ +@@ -23,12 +24,14 @@ public MethodProfiler() {} public void a() { @@ -23,7 +23,14 @@ if (this.a) { if (!this.e.isEmpty()) { this.e = this.e + "."; -@@ -40,6 +43,7 @@ +@@ -41,12 +44,14 @@ + } + + public void a(Supplier<String> supplier) { ++ if (!ENABLED) return; // CraftBukkit + if (this.a) { + this.a((String) supplier.get()); + } } public void b() { @@ -31,7 +38,7 @@ if (this.a) { long i = System.nanoTime(); long j = ((Long) this.d.remove(this.d.size() - 1)).longValue(); -@@ -62,7 +66,7 @@ +@@ -69,7 +74,7 @@ } public List<MethodProfiler.ProfilerInfo> b(String s) { @@ -40,7 +47,7 @@ return Collections.emptyList(); } else { long i = this.f.containsKey("root") ? ((Long) this.f.get("root")).longValue() : 0L; -@@ -128,11 +132,13 @@ +@@ -135,11 +140,13 @@ } public void c(String s) { @@ -54,7 +61,7 @@ return this.c.isEmpty() ? "[UNKNOWN]" : (String) this.c.get(this.c.size() - 1); } -@@ -152,7 +158,7 @@ +@@ -159,7 +166,7 @@ return methodprofiler_profilerinfo.a < this.a ? -1 : (methodprofiler_profilerinfo.a > this.a ? 1 : methodprofiler_profilerinfo.c.compareTo(this.c)); } |