diff options
Diffstat (limited to 'src/main/java/de/hysky/skyblocker/config')
3 files changed, 50 insertions, 17 deletions
diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java index 6f3a8e4a..59203269 100644 --- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java @@ -189,6 +189,9 @@ public class SkyblockerConfig { public Shortcuts shortcuts = new Shortcuts(); @SerialEntry + public Waypoints waypoints = new Waypoints(); + + @SerialEntry public QuiverWarning quiverWarning = new QuiverWarning(); @SerialEntry @@ -254,8 +257,8 @@ public class SkyblockerConfig { @Override public String toString() { return switch (this) { - case DEFAULT -> "Default"; - case ALPHABETICAL -> "Alphabetical"; + case DEFAULT -> "Default"; + case ALPHABETICAL -> "Alphabetical"; }; } } @@ -293,10 +296,10 @@ public class SkyblockerConfig { public int toInt() { return switch (this) { - case LAYER1 -> 0; - case LAYER2 -> 1; - case RIGHT -> 2; - case NONE -> -1; + case LAYER1 -> 0; + case LAYER2 -> 1; + case RIGHT -> 2; + case NONE -> -1; }; } } @@ -349,6 +352,14 @@ public class SkyblockerConfig { public boolean enableCommandArgShortcuts = true; } + public static class Waypoints { + @SerialEntry + public boolean enableWaypoints = true; + + @SerialEntry + public Waypoint.Type waypointType = Waypoint.Type.WAYPOINT; + } + public static class QuiverWarning { @SerialEntry public boolean enableQuiverWarning = true; @@ -419,8 +430,8 @@ public class SkyblockerConfig { @Override public String toString() { return switch (this) { - case HORIZONTAL -> "Horizontal"; - case VERTICAL -> "Vertical"; + case HORIZONTAL -> "Horizontal"; + case VERTICAL -> "Vertical"; }; } } @@ -431,9 +442,9 @@ public class SkyblockerConfig { @Override public String toString() { return switch (this) { - case LEFT -> "Left"; - case RIGHT -> "Right"; - case MIDDLE -> "Middle"; + case LEFT -> "Left"; + case RIGHT -> "Right"; + case MIDDLE -> "Middle"; }; } } @@ -515,7 +526,7 @@ public class SkyblockerConfig { public final Identifier tex; - private RarityBackgroundStyle(Identifier tex) { + RarityBackgroundStyle(Identifier tex) { this.tex = tex; } @@ -743,9 +754,9 @@ public class SkyblockerConfig { @Override public String toString() { return switch (this) { - case SIMPLE -> "Simple"; - case FANCY -> "Fancy"; - case CLASSIC -> "Classic"; + case SIMPLE -> "Simple"; + case FANCY -> "Fancy"; + case CLASSIC -> "Classic"; }; } } diff --git a/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java index 007d974c..7bb6414c 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java @@ -45,8 +45,8 @@ public class DungeonsCategory { .flag(OptionFlag.GAME_RESTART) .build()) .option(Option.<Type>createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.waypointType")) - .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.waypointType.@Tooltip"))) + .name(Text.translatable("text.autoconfig.skyblocker.option.general.waypoints.waypointType")) + .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.general.waypoints.waypointType.@Tooltip"))) .binding(defaults.locations.dungeons.secretWaypoints.waypointType, () -> config.locations.dungeons.secretWaypoints.waypointType, newValue -> config.locations.dungeons.secretWaypoints.waypointType = newValue) diff --git a/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java index 7e7a91fd..be5f0665 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java @@ -4,6 +4,7 @@ import de.hysky.skyblocker.config.ConfigUtils; import de.hysky.skyblocker.config.SkyblockerConfig; import de.hysky.skyblocker.skyblock.shortcut.ShortcutsConfigScreen; import de.hysky.skyblocker.utils.render.title.TitleContainerConfigScreen; +import de.hysky.skyblocker.utils.waypoint.Waypoint; import dev.isxander.yacl3.api.*; import dev.isxander.yacl3.api.controller.FloatFieldControllerBuilder; import dev.isxander.yacl3.api.controller.FloatSliderControllerBuilder; @@ -261,6 +262,27 @@ public class GeneralCategory { .build()) .build()) + //Waypoints + .group(OptionGroup.createBuilder() + .name(Text.translatable("text.autoconfig.skyblocker.option.general.waypoints")) + .collapsed(true) + .option(Option.<Boolean>createBuilder() + .name(Text.translatable("text.autoconfig.skyblocker.option.general.waypoints.enableWaypoints")) + .binding(defaults.general.waypoints.enableWaypoints, + () -> config.general.waypoints.enableWaypoints, + newValue -> config.general.waypoints.enableWaypoints = newValue) + .controller(ConfigUtils::createBooleanController) + .build()) + .option(Option.<Waypoint.Type>createBuilder() + .name(Text.translatable("text.autoconfig.skyblocker.option.general.waypoints.waypointType")) + .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.general.waypoints.waypointType.@Tooltip"), Text.translatable("text.autoconfig.skyblocker.option.general.waypoints.waypointType.generalNote"))) + .binding(defaults.general.waypoints.waypointType, + () -> config.general.waypoints.waypointType, + newValue -> config.general.waypoints.waypointType = newValue) + .controller(ConfigUtils::createEnumCyclingListController) + .build()) + .build()) + //Quiver Warning .group(OptionGroup.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.general.quiverWarning")) |