Skip to content

Commit

Permalink
Merge pull request #3 from kilieli/add-attack-key
Browse files Browse the repository at this point in the history
Add attacking as an action that can be performed.
  • Loading branch information
Freeder1k authored Jul 4, 2024
2 parents 2fb161d + d598aa3 commit 65b72f1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ yarn_mappings=1.20.2+build.2
loader_version=0.14.17

# Mod Properties
mod_version = 2.1.
mod_version = 2.2
maven_group = asd.fred
archives_base_name = wynncraft-spell-caster

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ public class WynncraftSpellCasterClient implements ClientModInitializer, ClientL
private static final List<Boolean> spell2_clicks = Arrays.asList(true, true, true);
private static final List<Boolean> spell3_clicks = Arrays.asList(true, false, false);
private static final List<Boolean> spell4_clicks = Arrays.asList(true, true, false);
private static final List<Boolean> attack_clicks = Arrays.asList(false);
public static KeyBinding attack_key;
public static KeyBinding use_key;
public static KeyBinding spell1_key, spell2_key, spell3_key, spell4_key;
public static KeyBinding attackQueue_key;
public static KeyBinding config_key;
public static Config.ConfigData config_data;
public static ClickQueue clickQueue;
Expand Down Expand Up @@ -60,6 +62,7 @@ public void onEndTick(MinecraftClient client) {
checkSpellKey(spell2_key, spell2_clicks);
checkSpellKey(spell3_key, spell3_clicks);
checkSpellKey(spell4_key, spell4_clicks);
checkSpellKey(attackQueue_key, attack_clicks);
}

private void registerKeybinds() {
Expand All @@ -69,6 +72,7 @@ private void registerKeybinds() {
spell2_key = KeyBindingHelper.registerKeyBinding(new KeyBinding("key.wynncraft-spell-caster.spell.second", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_UNKNOWN, "key.category.spell"));
spell3_key = KeyBindingHelper.registerKeyBinding(new KeyBinding("key.wynncraft-spell-caster.spell.third", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_UNKNOWN, "key.category.spell"));
spell4_key = KeyBindingHelper.registerKeyBinding(new KeyBinding("key.wynncraft-spell-caster.spell.fourth", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_UNKNOWN, "key.category.spell"));
attackQueue_key = KeyBindingHelper.registerKeyBinding(new KeyBinding("key.wynncraft-spell-caster.spell.attack_queue", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_UNKNOWN, "key.category.spell"));
}

private void checkSpellKey(KeyBinding spell_key, Collection<Boolean> spell_clicks) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"key.wynncraft-spell-caster.spell.second": "Cast 2nd Spell",
"key.wynncraft-spell-caster.spell.third": "Cast 3rd Spell",
"key.wynncraft-spell-caster.spell.fourth": "Cast 4th Spell",
"key.wynncraft-spell-caster.spell.attack_queue": "Attack Once",
"key.wynncraft-spell-caster.config": "Open Config",

"screen.wynncraft-spell-caster.config.title" : "Wynncraft Spell Caster Config",
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"name": "Wynncraft Spell Caster",
"description": "A configurable spell macro mod for Wynncraft.",
"authors": [
"Frederik"
"Frederik",
"KiliE"
],
"contact": {
"sources": "https://github.com/Freeder1k/Wynncraft-Spell-Caster"
Expand Down

0 comments on commit 65b72f1

Please sign in to comment.