From 14c0d5cba9e92c880f64cb6d997d88f2fdfd1c79 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 26 Jan 2014 11:04:55 +1100 Subject: [PATCH] We want to use Math.min, not max to cap displayed TPS to 20 --- CraftBukkit-Patches/0100-Highly-Optimized-Tick-Loop.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CraftBukkit-Patches/0100-Highly-Optimized-Tick-Loop.patch b/CraftBukkit-Patches/0100-Highly-Optimized-Tick-Loop.patch index 093dc8e26..8cccb2ad3 100644 --- a/CraftBukkit-Patches/0100-Highly-Optimized-Tick-Loop.patch +++ b/CraftBukkit-Patches/0100-Highly-Optimized-Tick-Loop.patch @@ -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 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 ) );