[ci skip] Add more identifying patch comments
This commit is contained in:
parent
3c246dc632
commit
66431e1300
84 changed files with 265 additions and 271 deletions
|
@ -46,14 +46,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
jframe.pack();
|
||||
jframe.setLocationRelativeTo((Component) null);
|
||||
jframe.setVisible(true);
|
||||
+ jframe.setName("Minecraft server"); // Paper
|
||||
+ jframe.setName("Minecraft server"); // Paper - Improve ServerGUI
|
||||
+
|
||||
+ // Paper start - Add logo as frame image
|
||||
+ // Paper start - Improve ServerGUI
|
||||
+ try {
|
||||
+ jframe.setIconImage(javax.imageio.ImageIO.read(Objects.requireNonNull(MinecraftServerGui.class.getClassLoader().getResourceAsStream("logo.png"))));
|
||||
+ } catch (java.io.IOException ignore) {
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Improve ServerGUI
|
||||
+
|
||||
jframe.addWindowListener(new WindowAdapter() {
|
||||
public void windowClosing(WindowEvent windowevent) {
|
||||
|
@ -66,7 +66,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
private void tick() {
|
||||
long l = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
|
||||
+ // Paper start - Add tps entry
|
||||
+ // Paper start - Improve ServerGUI
|
||||
+ double[] tps = org.bukkit.Bukkit.getTPS();
|
||||
+ String[] tpsAvg = new String[tps.length];
|
||||
+
|
||||
|
@ -76,7 +76,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
this.msgs[0] = "Memory use: " + l / 1024L / 1024L + " mb (" + Runtime.getRuntime().freeMemory() * 100L / Runtime.getRuntime().maxMemory() + "% free)";
|
||||
this.msgs[1] = "Avg tick: " + DECIMAL_FORMAT.format((double)this.server.getAverageTickTimeNanos() / (double)TimeUtil.NANOSECONDS_PER_MILLISECOND) + " ms";
|
||||
+ this.msgs[2] = "TPS from last 1m, 5m, 15m: " + String.join(", ", tpsAvg);
|
||||
+ // Paper end
|
||||
+ // Paper end - Improve ServerGUI
|
||||
this.values[this.vp++ & 255] = (int)(l * 100L / Runtime.getRuntime().maxMemory());
|
||||
this.repaint();
|
||||
}
|
||||
|
@ -85,11 +85,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
this.timer.stop();
|
||||
}
|
||||
+
|
||||
+ // Paper - start Add tps entry
|
||||
+ // Paper - Improve ServerGUI
|
||||
+ private static String format(double tps) {
|
||||
+ return (( tps > 21.0 ) ? "*" : "") + Math.min(Math.round(tps * 100.0) / 100.0, 20.0); // only print * at 21, we commonly peak to 20.02 as the tick sleep is not accurate enough, stop the noise
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Improve ServerGUI
|
||||
}
|
||||
diff --git a/src/main/resources/logo.png b/src/main/resources/logo.png
|
||||
new file mode 100644
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue