Fix chat messages being logged without formatting to console (#9058)

This commit is contained in:
Jason 2023-03-27 10:19:23 -07:00 committed by GitHub
parent fbf74ba0ac
commit bd62f2c2dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 183 additions and 158 deletions

View file

@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly.
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8cd3ad2601df5a604de904304ae3f603a471dfee..846dc9b607f40f1af3b4b7c7bbfe3c0803c0ad39 100644
index d3cd196e1a6f707ed5e0008123cc65df80422859..a7f9a3e57c7736b065b8dc4dba6e018ce73e5157 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -284,7 +284,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -285,7 +285,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
public ConsoleReader reader;
@ -24,7 +24,7 @@ index 8cd3ad2601df5a604de904304ae3f603a471dfee..846dc9b607f40f1af3b4b7c7bbfe3c08
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
public Commands vanillaCommandDispatcher;
@@ -293,7 +293,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -294,7 +294,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Spigot start
public static final int TPS = 20;
public static final int TICK_TIME = 1000000000 / MinecraftServer.TPS;
@ -33,7 +33,7 @@ index 8cd3ad2601df5a604de904304ae3f603a471dfee..846dc9b607f40f1af3b4b7c7bbfe3c08
public final double[] recentTps = new double[ 3 ];
// Spigot end
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations;
@@ -955,6 +955,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -956,6 +956,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
{
return ( avg * exp ) + ( tps * ( 1 - exp ) );
}
@ -91,7 +91,7 @@ index 8cd3ad2601df5a604de904304ae3f603a471dfee..846dc9b607f40f1af3b4b7c7bbfe3c08
// Spigot End
public static volatile RuntimeException chunkSystemCrash; // Paper - rewrite chunk system
@@ -971,7 +1022,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -972,7 +1023,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Spigot start
Arrays.fill( recentTps, 20 );
@ -101,7 +101,7 @@ index 8cd3ad2601df5a604de904304ae3f603a471dfee..846dc9b607f40f1af3b4b7c7bbfe3c08
while (this.running) {
// Paper start - rewrite chunk system
// guarantee that nothing can stop the server from halting if it can at least still tick
@@ -979,7 +1031,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -980,7 +1032,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
throw this.chunkSystemCrash;
}
// Paper end - rewrite chunk system
@ -110,7 +110,7 @@ index 8cd3ad2601df5a604de904304ae3f603a471dfee..846dc9b607f40f1af3b4b7c7bbfe3c08
if (i > 5000L && this.nextTickTime - this.lastOverloadWarning >= 30000L) { // CraftBukkit
long j = i / 50L;
@@ -991,12 +1043,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -992,12 +1044,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
++MinecraftServer.currentTickLong; // Paper
@ -134,7 +134,7 @@ index 8cd3ad2601df5a604de904304ae3f603a471dfee..846dc9b607f40f1af3b4b7c7bbfe3c08
tickSection = curTime;
}
// Spigot end
@@ -1006,7 +1064,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1007,7 +1065,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
}