Skip to content

Commit

Permalink
fixed hud sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerrrs committed Jun 2, 2024
1 parent 222fa6e commit 0dadcac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/keystrokesmod/module/ModuleManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public static void sort() {
if (HUD.alphabeticalSort.isToggled()) {
Collections.sort(organizedModules, Comparator.comparing(Module::getName));
} else {
Collections.sort(organizedModules, (o1, o2) -> Utils.mc.fontRendererObj.getStringWidth(o2.getName() + (HUD.showInfo.isToggled() ? " " + o2.getInfo() : "")) - Utils.mc.fontRendererObj.getStringWidth(o1.getName() + (HUD.showInfo.isToggled() ? " " + o1.getInfo() : "")));
Collections.sort(organizedModules, (o1, o2) -> Utils.mc.fontRendererObj.getStringWidth(o2.getName() + ((HUD.showInfo.isToggled() && !o2.getInfo().isEmpty()) ? " " + o2.getInfo() : "")) - Utils.mc.fontRendererObj.getStringWidth(o1.getName() + (HUD.showInfo.isToggled() && !o1.getInfo().isEmpty() ? " " + o1.getInfo() : "")));
}
}
}

0 comments on commit 0dadcac

Please sign in to comment.