mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-23 19:16:18 +01:00
94 lines
2.8 KiB
Diff
94 lines
2.8 KiB
Diff
From 22377ef98dec05e8777293c9be2454593b9c6bad Mon Sep 17 00:00:00 2001
|
|
From: tr7zw <tr7zw@live.de>
|
|
Date: Thu, 5 Mar 2020 23:08:01 +0100
|
|
Subject: [PATCH] Kill the vanilla "GameProfiler"
|
|
|
|
---
|
|
.../de/tr7zw/yapfa/GameProfilerDisabled.java | 51 +++++++++++++++++++
|
|
.../net/minecraft/server/MinecraftServer.java | 4 +-
|
|
2 files changed, 53 insertions(+), 2 deletions(-)
|
|
create mode 100644 src/main/java/de/tr7zw/yapfa/GameProfilerDisabled.java
|
|
|
|
diff --git a/src/main/java/de/tr7zw/yapfa/GameProfilerDisabled.java b/src/main/java/de/tr7zw/yapfa/GameProfilerDisabled.java
|
|
new file mode 100644
|
|
index 000000000..96a2270a8
|
|
--- /dev/null
|
|
+++ b/src/main/java/de/tr7zw/yapfa/GameProfilerDisabled.java
|
|
@@ -0,0 +1,51 @@
|
|
+package de.tr7zw.yapfa;
|
|
+
|
|
+import java.util.function.IntSupplier;
|
|
+import java.util.function.Supplier;
|
|
+
|
|
+import net.minecraft.server.GameProfiler;
|
|
+
|
|
+public class GameProfilerDisabled extends GameProfiler{
|
|
+
|
|
+ public GameProfilerDisabled(IntSupplier var0) {
|
|
+ super(var0);
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public net.minecraft.server.GameProfiler.a d() {
|
|
+ return super.d();
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void a() {
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void b() {
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void enter(String var0) {
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void a(Supplier<String> var0) {
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void exit() {
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void exitEnter(String var0) {
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void c(String var0) {
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void c(Supplier<String> var0) {
|
|
+ }
|
|
+
|
|
+}
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
index f41584b85..53acfcd5b 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -80,7 +80,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
private final MojangStatisticsGenerator snooper = new MojangStatisticsGenerator("server", this, SystemUtils.getMonotonicMillis());
|
|
public File universe;
|
|
private final List<Runnable> tickables = Lists.newArrayList();
|
|
- private final GameProfiler methodProfiler = new GameProfiler(this::ak);
|
|
+ private final GameProfiler methodProfiler = new de.tr7zw.yapfa.GameProfilerDisabled(this::ak); // YAPFA
|
|
private ServerConnection serverConnection;
|
|
public final WorldLoadListenerFactory worldLoadListenerFactory;
|
|
private final ServerPing serverPing = new ServerPing();
|
|
@@ -964,7 +964,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
this.nextTick += 50L;
|
|
if (this.T) {
|
|
this.T = false;
|
|
- this.methodProfiler.d().d();
|
|
+ //this.methodProfiler.d().d(); // YAPFA
|
|
}
|
|
|
|
|
|
--
|
|
2.25.1.windows.1
|
|
|