Skip to content

Commit

Permalink
Fix missing min value check
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHua269 authored Dec 20, 2023
1 parent ae5a4e8 commit b2689cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion patches/server/0015-Add-a-simple-tpsbar.patch
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ index 0000000000000000000000000000000000000000..baec715e0c20e920ccb99f2f07d84fcb
+ Placeholder.component("ping",getPingComponent(player.getPing()))
+ ));
+ bar.color(barColorFromTps(tps));
+ bar.progress((float) Math.max(mspt / 50,0));
+ bar.progress((float) Math.min((float)1,Math.max(mspt / 50,0)));
+ }
+
+ private static @NotNull Component getPingComponent(int ping){
Expand Down

0 comments on commit b2689cc

Please sign in to comment.