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

Commit c08547a

Browse files
committed
fix more bugs
1 parent 692c3f4 commit c08547a

File tree

10 files changed

+33
-45
lines changed

10 files changed

+33
-45
lines changed

1.16_combat-6/src/main/java/io/github/axolotlclient/modules/auth/Auth.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ protected void login(Account account) {
109109
if (account.isExpired()) {
110110
Notifications.getInstance().addStatus(new TranslatableText("auth.notif.title"), new TranslatableText("auth.notif.refreshing", account.getName()));
111111
}
112-
account.refresh(auth, () -> {});
112+
account.refresh(auth, () -> {
113+
getAccounts().stream().filter(a -> account.getUuid().equals(a.getUuid())).findFirst().ifPresent(this::login);
114+
});
113115
} else {
114116
runnable.run();
115117
}

1.20/src/main/java/io/github/axolotlclient/modules/auth/Auth.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ protected void login(Account account) {
123123
if (account.isExpired()) {
124124
Notifications.getInstance().addStatus(Text.translatable("auth.notif.title"), Text.translatable("auth.notif.refreshing", account.getName()));
125125
}
126-
account.refresh(auth, () -> {});
126+
account.refresh(auth, () -> {
127+
getAccounts().stream().filter(a -> account.getUuid().equals(a.getUuid())).findFirst().ifPresent(this::login);
128+
});
127129
} else {
128130
runnable.run();
129131
}

1.21.3/src/main/java/io/github/axolotlclient/mixin/InGameHudMixin.java

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,22 +107,14 @@ private void onHudRender(GuiGraphics guiGraphics, DeltaTracker deltaTracker, Cal
107107
}
108108
}
109109

110-
@Inject(method = "renderOverlayMessage", at = @At(value = "HEAD"))
111-
public void axolotlclient$clearActionBar(GuiGraphics graphics, DeltaTracker tracker, CallbackInfo ci) {
112-
ActionBarHud hud = (ActionBarHud) HudManager.getInstance().get(ActionBarHud.ID);
113-
if (hud != null && hud.isEnabled()) {
114-
if (overlayMessageString == null || overlayMessageTime <= 0 && hud.getActionBar() != null) {
115-
hud.setActionBar(null, 0);
116-
}
117-
}
118-
}
119-
120110
@WrapOperation(method = "renderOverlayMessage", at = @At(value = "INVOKE",
121111
target = "Lnet/minecraft/client/gui/GuiGraphics;drawStringWithBackdrop(Lnet/minecraft/client/gui/Font;Lnet/minecraft/network/chat/Component;IIII)I"))
122112
public int axolotlclient$getActionBar(GuiGraphics instance, Font font, Component text, int x, int y, int width, int color, Operation<Integer> original) {
123113
ActionBarHud hud = (ActionBarHud) HudManager.getInstance().get(ActionBarHud.ID);
124114
if (hud != null && hud.isEnabled()) {
125-
hud.setActionBar(text, color);// give ourselves the correct values
115+
instance.pose().popPose();
116+
hud.render(instance, text, color);
117+
instance.pose().pushPose();
126118
return 0; // Doesn't matter since return value is not used
127119
} else {
128120
return original.call(instance, font, text, x, y, width, color);

1.21.3/src/main/java/io/github/axolotlclient/modules/auth/Auth.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ protected void login(Account account) {
121121
if (account.isExpired()) {
122122
Notifications.getInstance().addStatus(Component.translatable("auth.notif.title"), Component.translatable("auth.notif.refreshing", account.getName()));
123123
}
124-
account.refresh(auth, () -> {});
124+
account.refresh(auth, () -> {
125+
getAccounts().stream().filter(a -> account.getUuid().equals(a.getUuid())).findFirst().ifPresent(this::login);
126+
});
125127
} else {
126128
runnable.run();
127129
}

1.21.3/src/main/java/io/github/axolotlclient/modules/hud/HudManager.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ public static HudManager getInstance() {
7676
}
7777

7878
public void init() {
79-
//KeyBindingHelper.registerKeyBinding(key);
8079

8180
AxolotlClient.CONFIG.addCategory(hudCategory);
8281

1.21.3/src/main/java/io/github/axolotlclient/modules/hud/gui/hud/vanilla/ActionBarHud.java

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@
2929
import io.github.axolotlclient.AxolotlClientConfig.impl.options.BooleanOption;
3030
import io.github.axolotlclient.AxolotlClientConfig.impl.options.IntegerOption;
3131
import io.github.axolotlclient.modules.hud.gui.entry.TextHudEntry;
32-
import lombok.Getter;
32+
import io.github.axolotlclient.util.ClientColors;
3333
import net.minecraft.client.gui.GuiGraphics;
3434
import net.minecraft.network.chat.Component;
3535
import net.minecraft.resources.ResourceLocation;
36+
import net.minecraft.util.ARGB;
3637

3738
/**
3839
* This implementation of Hud modules is based on KronHUD.
@@ -48,39 +49,26 @@ public class ActionBarHud extends TextHudEntry {
4849
public final IntegerOption timeShown = new IntegerOption("timeshown", 60, 40, 300);
4950
public final BooleanOption customTextColor = new BooleanOption("customtextcolor", false);
5051
private final String placeholder = "Action Bar";
51-
@Getter
52-
private Component actionBar;
53-
private int ticksShown;
54-
private int color;
5552

5653
public ActionBarHud() {
5754
super(115, 13, false);
5855
}
5956

60-
public void setActionBar(Component bar, int color) {
61-
this.actionBar = bar;
62-
this.color = color;
63-
}
64-
6557
@Override
6658
public void renderComponent(GuiGraphics graphics, float delta) {
67-
if (ticksShown >= timeShown.get()) {
68-
this.actionBar = null;
69-
}
70-
Color vanillaColor = new Color(color);
71-
if (this.actionBar != null) {
72-
graphics.drawString(client.font, actionBar,
73-
(int) ((float) getPos().x() + Math.round((float) getWidth() / 2) -
74-
(float) client.font.width(actionBar) / 2), (int) ((float) getPos().y() + 3),
75-
customTextColor.get() ? (textColor.get().getAlpha() == 255 ? new Color(
76-
textColor.get().getRed(), textColor.get().getGreen(), textColor.get().getBlue(),
77-
vanillaColor.getAlpha()
78-
).toInt() : textColor.get().toInt()) : color, shadow.get()
79-
);
80-
ticksShown++;
81-
} else {
82-
ticksShown = 0;
83-
}
59+
}
60+
61+
public void render(GuiGraphics graphics, Component actionBar, int color) {
62+
63+
graphics.drawString(client.font, actionBar,
64+
(int) ((float) getPos().x() + Math.round((float) getWidth() / 2) -
65+
(float) client.font.width(actionBar) / 2), (int) ((float) getPos().y() + 3),
66+
customTextColor.get() ? (textColor.get().getAlpha() == 255 ? new Color(
67+
textColor.get().getRed(), textColor.get().getGreen(), textColor.get().getBlue(),
68+
ARGB.alpha(color)
69+
).toInt() : textColor.get().toInt()) : color, shadow.get()
70+
);
71+
8472
}
8573

8674
@Override

1.21/src/main/java/io/github/axolotlclient/modules/auth/Auth.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ protected void login(Account account) {
124124
Notifications.getInstance().addStatus(Text.translatable("auth.notif.title"), Text.translatable("auth.notif.refreshing", account.getName()));
125125
}
126126
account.refresh(auth, () -> {
127+
getAccounts().stream().filter(a -> account.getUuid().equals(a.getUuid())).findFirst().ifPresent(this::login);
127128
});
128129
} else {
129130
runnable.run();

1.8.9/src/main/java/io/github/axolotlclient/modules/auth/Auth.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ protected void login(Account account) {
113113
if (account.isExpired()) {
114114
Notifications.getInstance().addStatus("auth.notif.title", "auth.notif.refreshing", account.getName());
115115
}
116-
account.refresh(auth, () -> {});
116+
account.refresh(auth, () -> {
117+
getAccounts().stream().filter(a -> account.getUuid().equals(a.getUuid())).findFirst().ifPresent(this::login);
118+
});
117119
} else {
118120
runnable.run();
119121
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ org.gradle.parallel=true
66
axolotlclient.modules.all=true
77

88
# Mod Properties
9-
version=3.1.0-beta.18
9+
version=3.1.0-beta.19
1010

1111
maven_group=io.github.axolotlclient
1212

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)