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

Commit efd2716

Browse files
committed
update fmj links
- (1.8.9) fix MouseMovementHud appearing black - fix a few other bugs - add keybinding name to the key label when configuring a keystroke
1 parent 749ef0d commit efd2716

File tree

19 files changed

+37
-21
lines changed

19 files changed

+37
-21
lines changed

1.16_combat-6/src/main/java/io/github/axolotlclient/modules/hud/gui/keystrokes/ConfigureKeyBindScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public void renderButton(MatrixStack guiGraphics, int mouseX, int mouseY, float
8787

8888
AbstractButtonWidget currentKey = addDrawableChild(textWidget(0, rightColY, super.width, 9, LiteralText.EMPTY, textRenderer));
8989
if (stroke.getKey() != null) {
90-
currentKey.setMessage(new TranslatableText("keystrokes.stroke.key", stroke.getKey().getBoundKeyLocalizedText()));
90+
currentKey.setMessage(new TranslatableText("keystrokes.stroke.key", stroke.getKey().getBoundKeyLocalizedText(), new TranslatableText(stroke.getKey().getTranslationKey())));
9191
} else {
9292
currentKey.setMessage(LiteralText.EMPTY);
9393
}

1.16_combat-6/src/main/resources/fabric.mod.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
],
1616
"contact": {
1717
"homepage": "https://axolotlclient.github.io/",
18-
"sources": "https://github.com/AxolotlClient/AxolotlClient-mod/tree/1.8.9"
18+
"sources": "https://github.com/AxolotlClient/AxolotlClient-mod/",
19+
"issues": "https://github.com/AxolotlClient/AxolotlClient-mod/issues"
1920
},
2021
"license": "LGPL-3.0-or-later",
2122
"icon": "assets/axolotlclient/icon.png",

1.20/src/main/java/io/github/axolotlclient/modules/hud/gui/keystrokes/ConfigureKeyBindScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected void updateNarration(NarrationMessageBuilder narrationElementOutput) {
9090

9191
TextWidget currentKey = addDrawable(new TextWidget(0, rightColY, super.width, 9, Text.empty(), textRenderer));
9292
if (stroke.getKey() != null) {
93-
currentKey.setMessage(Text.translatable("keystrokes.stroke.key", stroke.getKey().getKeyName()));
93+
currentKey.setMessage(Text.translatable("keystrokes.stroke.key", stroke.getKey().getKeyName(), Text.translatable(stroke.getKey().getTranslationKey())));
9494
} else {
9595
currentKey.setMessage(Text.empty());
9696
}

1.20/src/main/resources/fabric.mod.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515
],
1616
"contact": {
1717
"homepage": "https://axolotlclient.github.io/",
18-
"sources": "https://github.com/AxolotlClient/AxolotlClient-mod/tree/1.8.9"
18+
"sources": "https://github.com/AxolotlClient/AxolotlClient-mod/",
19+
"issues": "https://github.com/AxolotlClient/AxolotlClient-mod/issues"
1920
},
2021
"license": "LGPL-3.0-or-later",
2122
"icon": "assets/axolotlclient/icon.png",
23+
"accessWidener": "axolotlclient.accesswidener",
2224
"environment": "client",
2325
"entrypoints": {
2426
"client": [

1.21.4/src/main/java/io/github/axolotlclient/modules/hud/gui/keystrokes/ConfigureKeyBindScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ protected void repositionElements() {
172172
}
173173
currentKey.setWidth(super.width);
174174
if (stroke.getKey() != null) {
175-
currentKey.setMessage(Component.translatable("keystrokes.stroke.key", stroke.getKey().getTranslatedKeyMessage()));
175+
currentKey.setMessage(Component.translatable("keystrokes.stroke.key", stroke.getKey().getTranslatedKeyMessage(), Component.translatable(stroke.getKey().getName())));
176176
} else {
177177
currentKey.setMessage(Component.empty());
178178
}

1.21.4/src/main/resources/fabric.mod.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515
],
1616
"contact": {
1717
"homepage": "https://axolotlclient.github.io/",
18-
"sources": "https://github.com/AxolotlClient/AxolotlClient-mod/tree/1.8.9"
18+
"sources": "https://github.com/AxolotlClient/AxolotlClient-mod/",
19+
"issues": "https://github.com/AxolotlClient/AxolotlClient-mod/issues"
1920
},
2021
"license": "LGPL-3.0-or-later",
2122
"icon": "assets/axolotlclient/icon.png",
23+
"accessWidener": "axolotlclient.accesswidener",
2224
"environment": "client",
2325
"entrypoints": {
2426
"client": [

1.21/src/main/java/io/github/axolotlclient/modules/hud/gui/keystrokes/ConfigureKeyBindScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ protected void repositionElements() {
172172
}
173173
currentKey.setWidth(super.width);
174174
if (stroke.getKey() != null) {
175-
currentKey.setMessage(Text.translatable("keystrokes.stroke.key", stroke.getKey().getKeyName()));
175+
currentKey.setMessage(Text.translatable("keystrokes.stroke.key", stroke.getKey().getKeyName(), Text.translatable(stroke.getKey().getTranslationKey())));
176176
} else {
177177
currentKey.setMessage(Text.empty());
178178
}

1.21/src/main/resources/fabric.mod.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515
],
1616
"contact": {
1717
"homepage": "https://axolotlclient.github.io/",
18-
"sources": "https://github.com/AxolotlClient/AxolotlClient-mod/tree/1.8.9"
18+
"sources": "https://github.com/AxolotlClient/AxolotlClient-mod/",
19+
"issues": "https://github.com/AxolotlClient/AxolotlClient-mod/issues"
1920
},
2021
"license": "LGPL-3.0-or-later",
2122
"icon": "assets/axolotlclient/icon.png",
23+
"accessWidener": "axolotlclient.accesswidener",
2224
"environment": "client",
2325
"entrypoints": {
2426
"client": [

1.8.9/src/main/java/io/github/axolotlclient/mixin/KeyBindAccessor.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,17 @@
2222

2323
package io.github.axolotlclient.mixin;
2424

25+
import java.util.List;
26+
2527
import net.minecraft.client.options.KeyBinding;
26-
import net.minecraft.util.Int2ObjectHashMap;
2728
import org.spongepowered.asm.mixin.Mixin;
2829
import org.spongepowered.asm.mixin.gen.Accessor;
2930

3031
@Mixin(KeyBinding.class)
3132
public interface KeyBindAccessor {
3233

33-
@Accessor("BY_KEY_CODE")
34-
static Int2ObjectHashMap<KeyBinding> getAllKeyBinds() {
34+
@Accessor("ALL")
35+
static List<KeyBinding> getAllKeyBinds() {
3536
throw new UnsupportedOperationException();
3637
}
3738
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ public Map<String, Object> serialize() {
311311
@SuppressWarnings("unchecked")
312312
private Keystroke deserializeKey(Map<String, ?> json) {
313313
if ("option".equals(json.get("type"))) {
314-
KeyBinding key = KeyBindAccessor.getAllKeyBinds().get((int) (long) json.get("option"));
314+
KeyBinding key = KeyBindAccessor.getAllKeyBinds().stream().filter(k -> k.getName().equals(json.get("option"))).findFirst().orElseThrow();
315315
if (json.containsKey("editable_label")) {
316316
String label = (String) json.get("label");
317317
return new LabelKeystroke(getRectangle((Map<String, ?>) json.get("bounds")), getPos(), key,
@@ -320,7 +320,7 @@ private Keystroke deserializeKey(Map<String, ?> json) {
320320
return new CustomRenderKeystroke(SpecialKeystroke.valueOf((String) json.get("special_name")), getRectangle((Map<String, ?>) json.get("bounds")), getPos(), key);
321321
}
322322
} else {
323-
var key = KeyBindAccessor.getAllKeyBinds().get((int) (long) json.get("key_name"));
323+
KeyBinding key = KeyBindAccessor.getAllKeyBinds().stream().filter(k -> k.getName().equals(json.get("key_name"))).findFirst().orElseThrow();
324324
return new LabelKeystroke(getRectangle((Map<String, ?>) json.get("bounds")), getPos(), key, (String) json.get("label"), (boolean) json.get("synchronize_label"));
325325
}
326326
}
@@ -348,7 +348,7 @@ public CustomRenderKeystroke(SpecialKeystroke stroke) {
348348
public Map<String, Object> serialize() {
349349
Map<String, Object> json = super.serialize();
350350
json.put("type", "option");
351-
json.put("option", key.getKeyCode());
351+
json.put("option", key.getName());
352352
json.put("special_name", parent.name());
353353
return json;
354354
}
@@ -407,7 +407,7 @@ public LabelKeystroke(Rectangle bounds, DrawPosition offset, KeyBinding key, Str
407407
public Map<String, Object> serialize() {
408408
Map<String, Object> json = super.serialize();
409409
json.put("type", "custom");
410-
json.put("key_name", key.getKeyCode());
410+
json.put("key_name", key.getName());
411411
json.put("label", label);
412412
json.put("synchronize_label", synchronizeLabel);
413413
return json;

0 commit comments

Comments
 (0)