Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-16 19:40:07 +01:00
We want to use Math.min, not max to cap displayed TPS to 20
Dieser Commit ist enthalten in:
Ursprung
71255cf140
Commit
14c0d5cba9
@ -1,4 +1,4 @@
|
||||
From cb15a8dc8cee18a4d5b6a8ce3ccbbf28dfd0c65c Mon Sep 17 00:00:00 2001
|
||||
From 21c8405f31d7d07ddd80fad5950ef608936a492c Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <git@md-5.net>
|
||||
Date: Sat, 25 Jan 2014 14:08:35 +1100
|
||||
Subject: [PATCH] Highly Optimized Tick Loop
|
||||
@ -108,7 +108,7 @@ index 205249e..6634292 100755
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/TicksPerSecondCommand.java b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
|
||||
new file mode 100644
|
||||
index 0000000..36363ee
|
||||
index 0000000..a101b52
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
|
||||
@@ -0,0 +1,44 @@
|
||||
@ -143,7 +143,7 @@ index 0000000..36363ee
|
||||
+ StringBuilder sb = new StringBuilder( ChatColor.GOLD + "TPS from last 1m, 5m, 15m: " );
|
||||
+ for ( double tps : MinecraftServer.getServer().recentTps )
|
||||
+ {
|
||||
+ sb.append( format( Math.max( tps, 20.0 ) ) );
|
||||
+ sb.append( format( Math.min( tps, 20.0 ) ) );
|
||||
+ sb.append( ", " );
|
||||
+ }
|
||||
+ sender.sendMessage( sb.substring( 0, sb.length() - 2 ) );
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren