From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: AlphaKR93 Date: Sun, 5 May 2024 00:01:03 +0900 Subject: [PATCH] Add more MSPT diff --git a/src/main/java/io/papermc/paper/command/MSPTCommand.java b/src/main/java/io/papermc/paper/command/MSPTCommand.java index 03be23690a94a14d7343526acad67ccf53b85c70..416c0a736edf47f76a37be0bc5fe8678cf89cdb3 100644 --- a/src/main/java/io/papermc/paper/command/MSPTCommand.java +++ b/src/main/java/io/papermc/paper/command/MSPTCommand.java @@ -45,8 +45,10 @@ public final class MSPTCommand extends Command { MinecraftServer server = MinecraftServer.getServer(); List times = new ArrayList<>(); + times.addAll(eval(server.tickTimes1s.getTimes())); // Plazma - Add more MSPT times.addAll(eval(server.tickTimes5s.getTimes())); times.addAll(eval(server.tickTimes10s.getTimes())); + times.addAll(eval(server.tickTimes30s.getTimes())); // Plazma - Add more MSPT times.addAll(eval(server.tickTimes60s.getTimes())); sender.sendMessage(text().content("Server tick times ").color(GOLD) @@ -61,12 +63,18 @@ public final class MSPTCommand extends Command { text(")") ) ).append( - text(" from last 5s"), + // Plazma start - Add more MSPT + text(" from last 1s"), + text(",", GRAY), + text(" 5s"), text(",", GRAY), text(" 10s"), text(",", GRAY), + text(" 30s"), + text(",", GRAY), text(" 1m"), text(":", YELLOW) + // Plazma end - Add more MSPT ) ); sender.sendMessage(text().content("◴ ").color(GOLD) @@ -74,7 +82,11 @@ public final class MSPTCommand extends Command { .append( times.get(0), SLASH, times.get(1), SLASH, times.get(2), text(", ", YELLOW), times.get(3), SLASH, times.get(4), SLASH, times.get(5), text(", ", YELLOW), - times.get(6), SLASH, times.get(7), SLASH, times.get(8) + // Plazma start - Add more MSPT + times.get(6), SLASH, times.get(7), SLASH, times.get(8), text(", ", YELLOW), + times.get(9), SLASH, times.get(10), SLASH, times.get(11), text(", ", YELLOW), + times.get(12), SLASH, times.get(13), SLASH, times.get(14), text(", ", YELLOW) + // Plazma end - Add more MSPT ) ) ); @@ -93,18 +105,26 @@ public final class MSPTCommand extends Command { text(")") ) ).append( - text(" from last 5s"), + // Plazma start - Add more MSPT + text(" from last 1s"), + text(",", GRAY), + text(" 5s"), text(",", GRAY), text(" 10s"), text(",", GRAY), + text(" 30s"), + text(",", GRAY), text(" 1m"), text(":", YELLOW) + // Plazma end - Add more MSPT ) ); for (net.minecraft.server.level.ServerLevel level: server.getAllLevels()) { List worldTimes = new ArrayList<>(); + worldTimes.addAll(eval(level.tickTimes1s.getTimes())); // Plazma - Add more MSPT worldTimes.addAll(eval(level.tickTimes5s.getTimes())); worldTimes.addAll(eval(level.tickTimes10s.getTimes())); + worldTimes.addAll(eval(level.tickTimes30s.getTimes())); // Plazma - Add more MSPT worldTimes.addAll(eval(level.tickTimes60s.getTimes())); sender.sendMessage(text().content("◴ " + level.getWorld().getName() + ": ").color(GOLD) @@ -112,7 +132,11 @@ public final class MSPTCommand extends Command { .append( worldTimes.get(0), SLASH, worldTimes.get(1), SLASH, worldTimes.get(2), text(", ", YELLOW), worldTimes.get(3), SLASH, worldTimes.get(4), SLASH, worldTimes.get(5), text(", ", YELLOW), - worldTimes.get(6), SLASH, worldTimes.get(7), SLASH, worldTimes.get(8) + // Plazma start - Add more MSPT + worldTimes.get(6), SLASH, worldTimes.get(7), SLASH, worldTimes.get(8), text(", ", YELLOW), + worldTimes.get(9), SLASH, worldTimes.get(10), SLASH, worldTimes.get(11), text(", ", YELLOW), + worldTimes.get(12), SLASH, worldTimes.get(13), SLASH, worldTimes.get(14), text(", ", YELLOW) + // Plazma end - Add more MSPT ) ) ); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 118832d94f96d7624f9faee35b9da0aeb9d9ded8..1c3bb7cd27d97e54cbe74465bd8a7c5faeafdf4a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -259,8 +259,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop