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

Commit be22595

Browse files
committed
(1.8.9) fix ChatHud color/transparency issues
1 parent 547bc4b commit be22595

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

1.8.9/src/main/java/io/github/axolotlclient/modules/hud/gui/hud/ChatHud.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class ChatHud extends TextHudEntry {
4949
public static final Identifier ID = new Identifier("axolotlclient", "chathud");
5050
// tooltip: "chathud"
5151
public final BooleanOption background = new BooleanOption("background", true);
52-
public final ColorOption bgColor = new ColorOption("bgcolor", Color.parse("#40000000"));
52+
public final ColorOption bgColor = new ColorOption("bgcolor", Color.parse("#80000000"));
5353

5454
public final IntegerOption chatHistory = new IntegerOption("chatHistoryLength", 100, 10, 5000);
5555
public final ColorOption scrollbarColor = new ColorOption("scrollbarColor", Color.parse("#70CCCCCC"));
@@ -128,18 +128,18 @@ public void render(float delta) {
128128
if (opacity > 3) {
129129
int y = pos.y + getHeight() - (m * (9 + lineSpacing.get()));
130130
if (background.get()) {
131-
int bg = bgColor.get().toInt();
131+
Color bg = bgColor.get();
132132
if (!isChatFocused()) {
133-
bg += ((int)((bg >> 24) * d)) << 24;
133+
bg = bg.withAlpha((int) (bg.getAlpha()*d));
134134
}
135135
fill(pos.x, y - (9 + lineSpacing.get()), pos.x + l + 4, y,
136-
bg);
136+
bg.toInt());
137137
}
138138
String string = chatHudLine.getText().getFormattedString();
139139
GlStateManager.enableBlend();
140-
int text = textColor.get().toInt();
140+
Color text = textColor.get();
141141
if (!isChatFocused()) {
142-
text += ((int)((text >> 24) * d)) << 24;
142+
text = text.withAlpha((int) (text.getAlpha()*d));
143143
}
144144
DrawUtil.drawString(string, pos.x, (y - 8),
145145
text, shadow.get());

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.1-rc.8
9+
version=3.1.1-rc.9
1010

1111
maven_group=io.github.axolotlclient
1212

0 commit comments

Comments
 (0)