Skip to content

Commit

Permalink
remove spell queue option
Browse files Browse the repository at this point in the history
  • Loading branch information
Freeder1k committed Apr 23, 2023
1 parent 6914604 commit 55097b4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 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 @@ org.gradle.parallel=true
loader_version=0.14.17

# Mod Properties
mod_version = 1.0.0
mod_version = 1.0.1
maven_group = asd.fred
archives_base_name = wynncraft-spell-caster

Expand Down
8 changes: 2 additions & 6 deletions src/main/java/asd/fred/wynncraft_spell_caster/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ public static Screen createConfigScreen(Screen parent) {

general.addEntry(builder.entryBuilder().startIntSlider(Text.translatable("config.wynncraft-spell-caster.option.right-interval"), config_data.right_interval, 0, 20).setDefaultValue(2).setTooltip(Text.of("Set the amount of ticks to wait after a right click.")).setSaveConsumer(newValue -> config_data.right_interval = newValue).build());

general.addEntry(builder.entryBuilder().startIntSlider(Text.translatable("config.wynncraft-spell-caster.option.queue-size"), config_data.queue_size, 0, 20).setDefaultValue(1).setTooltip(Text.of("Set how many extra spells the spell queue can hold.")).setSaveConsumer(newValue -> config_data.queue_size = newValue).build());

general.addEntry(builder.entryBuilder().startBooleanToggle(Text.translatable("config.wynncraft-spell-caster.option.invert-clicks"), config_data.invert_clicks).setDefaultValue(false).setTooltip(Text.of("Set this to True if playing on archer.")).setSaveConsumer(newValue -> config_data.invert_clicks = newValue).build());

builder.setSavingRunnable(config_data::save);
Expand All @@ -74,18 +72,16 @@ public ConfigScreenFactory<?> getModConfigScreenFactory() {
public static class ConfigData {
public int left_interval;
public int right_interval;
public int queue_size;
public boolean invert_clicks;

public ConfigData(int left_interval, int right_interval, int queue_size, boolean invert_clicks) {
public ConfigData(int left_interval, int right_interval, boolean invert_clicks) {
this.left_interval = left_interval;
this.right_interval = right_interval;
this.queue_size = queue_size;
this.invert_clicks = invert_clicks;
}

public static ConfigData getDefault() {
return new ConfigData(0, 2, 1, false);
return new ConfigData(0, 2, false);
}

public void save() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private void registerKeybinds() {

private void checkSpellKey(KeyBinding spell_key, List<Boolean> spell_clicks) {
if (spell_key.isPressed()) {
if (clickQueue.size() <= 3 * config_data.queue_size)
if (clickQueue.size() <= 3)
clickQueue.addAll(spell_clicks);
spell_key.setPressed(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
"screen.wynncraft-spell-caster.config.title" : "Wynncraft Spell Caster Config",
"config.wynncraft-spell-caster.option.left-interval": "Left Click Interval (Ticks)",
"config.wynncraft-spell-caster.option.right-interval": "Right Click Interval (Ticks)",
"config.wynncraft-spell-caster.option.queue-size": "Spell Queue Size",
"config.wynncraft-spell-caster.option.invert-clicks": "Invert Clicks (Archer Mode)"
}

0 comments on commit 55097b4

Please sign in to comment.