Skip to content

Commit

Permalink
Merge pull request #17 from DancingSnow0517/minihud
Browse files Browse the repository at this point in the history
fix(tps): 支持minihud显示tps和mspt
Gu-ZT authored Apr 2, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 5f08d81 + e83fb51 commit b7f8e8b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -41,8 +41,8 @@ public Component display(ServerPlayer player) {
}
ChatFormatting finalColor = color;
return Component.literal("TPS: ").withStyle(style -> style.withColor(ChatFormatting.GRAY))
.append(Component.literal("%.2f".formatted(TPS)).withStyle(style -> style.withColor(finalColor)))
.append(Component.literal("%.1f".formatted(TPS)).withStyle(style -> style.withColor(finalColor)))
.append(Component.literal(" MSPT: ").withStyle(style -> style.withColor(ChatFormatting.GRAY)))
.append(Component.literal("%.2f".formatted(MSPT)).withStyle(style -> style.withColor(finalColor)));
.append(Component.literal("%.1f".formatted(MSPT)).withStyle(style -> style.withColor(finalColor)));
}
}

0 comments on commit b7f8e8b

Please sign in to comment.