Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 6199f4a

Browse files
committed
Optimise performingAction check
1 parent 58235ca commit 6199f4a

File tree

1 file changed

+10
-8
lines changed
  • src/main/java/io/github/axolotlclient/modules/hud/gui/hud

1 file changed

+10
-8
lines changed

src/main/java/io/github/axolotlclient/modules/hud/gui/hud/PlayerHud.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,16 @@ public void renderPlayer(boolean placeholder, double x, double y, float delta) {
8686
return;
8787
}
8888

89-
if (isPerformingAction()) {
90-
hide = -1;
91-
} else if (hide == -1) {
92-
hide = System.currentTimeMillis();
93-
}
94-
95-
if (!placeholder && autoHide.get() && hide != -1 && System.currentTimeMillis() - hide > 500) {
96-
return;
89+
if (!placeholder && autoHide.get()) {
90+
if (isPerformingAction()) {
91+
hide = -1;
92+
} else if (hide == -1) {
93+
hide = System.currentTimeMillis();
94+
}
95+
96+
if (hide != -1 && System.currentTimeMillis() - hide > 500) {
97+
return;
98+
}
9799
}
98100

99101
float lerpY = (lastYOffset + ((yOffset - lastYOffset) * delta));

0 commit comments

Comments
 (0)