Skip to content

Commit e9bb424

Browse files
committed
Fix TPS formats
1 parent cbe18f4 commit e9bb424

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/main/kotlin/com/lambda/module/hud/TPS.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ object TPS : HudModule(
4848
text("${format.displayName}: ${avg.string}${format.unit}")
4949
return
5050
}
51-
val overlay = "${format.displayName}: cur ${current.string} | avg ${avg.string}"
51+
val overlay = "cur ${current.string}${format.unit} | avg ${avg.string}${format.unit}"
5252

5353
plotLines(
5454
label = "##TPSPlot",

src/main/kotlin/com/lambda/util/ServerTPS.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,12 @@ object ServerTPS {
5353
enum class TickFormat(
5454
val value: (Long) -> Double,
5555
override val displayName: String,
56+
override val description: String,
5657
val unit: String = ""
57-
) : NamedEnum {
58-
TPS({ it / 50.0 }, "TPS"),
59-
MSPT({ it / 20.0 }, "MSPT", " ms"),
60-
Normalized({ 50.0 / it }, "TPS"),
61-
Percentage({ it / 100.0 }, "TPS", "%")
58+
) : NamedEnum, Describable {
59+
TPS({ it / 50.0 }, "TPS", "Ticks Per Second", " t/s"),
60+
MSPT({ it / 20.0 }, "MSPT", "Milliseconds Per Tick", " ms/t"),
61+
Normalized({ it / 1000.0 }, "nTPS", "Normalized Ticks Per Second"),
62+
Percentage({ it / 10.0 }, "TPS%", "Deviation from 20 TPS","%")
6263
}
6364
}

0 commit comments

Comments
 (0)