Skip to content

Commit

Permalink
Fix wrong text shown on Sprint Toggle Display
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatMG393 committed Feb 18, 2024
1 parent 7c71af2 commit 7a18c9e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/main/java/com/thatmg393/usefulhuds/mixin/InGameHudMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,17 @@ public void render(DrawContext context, float tickDelta, CallbackInfo info) {

if (config.std_showHud) {
boolean isSprintingHeld = client.player.isSprinting();
boolean isSprintingToggled = client.options.getSprintToggled().getValue();
boolean isSprintingToggle = client.options.getSprintToggled().getValue();

String text = "§7§oSprint Held"; // TODO: add ability to change the text in config
if (isSprintingToggled && isSprintingHeld) {
String text = "§7§oStanding"; // TODO: add ability to change the text in config
if (isSprintingToggle) {
text = "§7§oSprint Toggled";
} else {
if (isSprintingHeld) {
text = "§7§oSprint Held";
} else {
text = "§7§oWalking"
}
}

int[] textPos = DrawUtils.getProperOffsets(client, 20, 30, text);
Expand Down

0 comments on commit 7a18c9e

Please sign in to comment.