From 15bf2503e0147aeb06ebae2922ecede237983d5c Mon Sep 17 00:00:00 2001 From: Yasin Date: Wed, 8 May 2024 00:07:04 +0200 Subject: debloat SkyblockerConfig.java + translate change removed text.autoconfig. prefix new way is skyblocker.option. --- .../hysky/skyblocker/config/HudConfigScreen.java | 2 +- .../hysky/skyblocker/config/SkyblockerConfig.java | 1285 +------------------- .../skyblocker/config/SkyblockerConfigManager.java | 4 +- .../config/categories/CrimsonIsleCategory.java | 74 +- .../config/categories/DiscordRPCCategory.java | 39 +- .../config/categories/DungeonsCategory.java | 643 +++++----- .../config/categories/DwarvenMinesCategory.java | 134 +- .../config/categories/GeneralCategory.java | 602 ++++----- .../config/categories/LocationsCategory.java | 178 +-- .../config/categories/MessageFilterCategory.java | 57 +- .../config/categories/QuickNavigationCategory.java | 196 +-- .../config/categories/SlayersCategory.java | 44 +- .../config/configs/CrimsonIsleConfig.java | 35 + .../skyblocker/config/configs/DungeonsConfig.java | 292 +++++ .../skyblocker/config/configs/FarmingConfig.java | 37 + .../skyblocker/config/configs/GeneralConfig.java | 220 ++++ .../skyblocker/config/configs/HelperConfig.java | 65 + .../skyblocker/config/configs/MessagesConfig.java | 61 + .../skyblocker/config/configs/MiningConfig.java | 100 ++ .../skyblocker/config/configs/MiscConfig.java | 35 + .../config/configs/OtherLocationsConfig.java | 79 ++ .../skyblocker/config/configs/QuickNavConfig.java | 181 +++ .../skyblocker/config/configs/SlayerConfig.java | 60 + .../config/configs/UiAndVisualsConfig.java | 244 ++++ .../mixins/AbstractInventoryScreenMixin.java | 2 +- .../skyblocker/mixins/ClientPlayerEntityMixin.java | 6 +- .../skyblocker/mixins/HandledScreenMixin.java | 8 +- .../mixins/HandledScreenProviderMixin.java | 14 +- .../de/hysky/skyblocker/mixins/InGameHudMixin.java | 8 +- .../mixins/InGameOverlayRendererMixin.java | 4 +- .../de/hysky/skyblocker/mixins/ItemStackMixin.java | 2 +- .../skyblocker/mixins/PlayerListHudMixin.java | 4 +- .../skyblocker/mixins/PlayerSkinTextureMixin.java | 2 +- .../hysky/skyblocker/mixins/RenderFishMixin.java | 2 +- .../de/hysky/skyblocker/skyblock/ChestValue.java | 16 +- .../hysky/skyblocker/skyblock/FishingHelper.java | 8 +- .../skyblocker/skyblock/StatusBarTracker.java | 2 +- .../hysky/skyblocker/skyblock/TeleportOverlay.java | 16 +- .../newyearcakes/NewYearCakeBagHelper.java | 2 +- .../newyearcakes/NewYearCakesHelper.java | 2 +- .../skyblock/auction/AuctionBrowserScreen.java | 4 +- .../skyblocker/skyblock/barn/HungryHiker.java | 2 +- .../skyblocker/skyblock/barn/TreasureHunter.java | 2 +- .../skyblock/chat/ChatRuleConfigScreen.java | 100 +- .../skyblock/chat/ChatRulesConfigListWidget.java | 16 +- .../skyblock/chat/ChatRulesConfigScreen.java | 4 +- .../crimson/kuudra/ArrowPoisonWarning.java | 3 +- .../skyblock/crimson/kuudra/KuudraWaypoints.java | 24 +- .../skyblocker/skyblock/dungeon/CroesusHelper.java | 2 +- .../skyblocker/skyblock/dungeon/CroesusProfit.java | 2 +- .../skyblocker/skyblock/dungeon/DungeonMap.java | 8 +- .../skyblock/dungeon/DungeonMapConfigScreen.java | 26 +- .../skyblocker/skyblock/dungeon/DungeonScore.java | 5 +- .../skyblock/dungeon/DungeonScoreHUD.java | 8 +- .../skyblock/dungeon/FireFreezeStaffTimer.java | 4 +- .../skyblock/dungeon/GuardianHealth.java | 4 +- .../skyblocker/skyblock/dungeon/LividColor.java | 11 +- .../hysky/skyblocker/skyblock/dungeon/Reparty.java | 2 +- .../skyblock/dungeon/puzzle/CreeperBeams.java | 2 +- .../skyblock/dungeon/puzzle/DungeonBlaze.java | 2 +- .../skyblock/dungeon/puzzle/IceFill.java | 4 +- .../skyblock/dungeon/puzzle/Silverfish.java | 4 +- .../skyblock/dungeon/puzzle/ThreeWeirdos.java | 2 +- .../skyblock/dungeon/puzzle/TicTacToe.java | 2 +- .../skyblocker/skyblock/dungeon/puzzle/Trivia.java | 2 +- .../skyblock/dungeon/puzzle/boulder/Boulder.java | 4 +- .../dungeon/puzzle/waterboard/Waterboard.java | 6 +- .../skyblock/dungeon/secrets/DungeonManager.java | 10 +- .../skyblocker/skyblock/dungeon/secrets/Room.java | 10 +- .../skyblock/dungeon/secrets/SecretWaypoint.java | 9 +- .../skyblock/dungeon/secrets/SecretsTracker.java | 2 +- .../skyblock/dungeon/terminal/ColorTerminal.java | 2 +- .../skyblock/dungeon/terminal/OrderTerminal.java | 2 +- .../dungeon/terminal/StartsWithTerminal.java | 2 +- .../skyblocker/skyblock/dwarven/CrystalsHud.java | 16 +- .../skyblock/dwarven/CrystalsHudConfigScreen.java | 6 +- .../skyblock/dwarven/CrystalsLocationsManager.java | 8 +- .../skyblock/dwarven/CrystalsWaypoint.java | 3 +- .../skyblocker/skyblock/dwarven/DwarvenHud.java | 36 +- .../skyblock/dwarven/DwarvenHudConfigScreen.java | 15 +- .../hysky/skyblocker/skyblock/dwarven/Fetchur.java | 2 +- .../skyblocker/skyblock/dwarven/MetalDetector.java | 6 +- .../hysky/skyblocker/skyblock/dwarven/Puzzler.java | 2 +- .../skyblock/end/EndHudConfigScreen.java | 6 +- .../skyblocker/skyblock/end/EndHudWidget.java | 8 +- .../hysky/skyblocker/skyblock/end/EnderNodes.java | 4 +- .../de/hysky/skyblocker/skyblock/end/TheEnd.java | 6 +- .../skyblock/entity/MobBoundingBoxes.java | 4 +- .../hysky/skyblocker/skyblock/entity/MobGlow.java | 12 +- .../skyblock/experiment/ChronomatronSolver.java | 3 +- .../skyblock/experiment/ExperimentSolver.java | 5 +- .../skyblock/experiment/SuperpairsSolver.java | 3 +- .../skyblock/experiment/UltrasequencerSolver.java | 3 +- .../skyblock/fancybars/FancyStatusBars.java | 7 +- .../skyblocker/skyblock/filters/MimicFilter.java | 2 +- .../skyblocker/skyblock/garden/FarmingHud.java | 4 +- .../skyblock/garden/FarmingHudConfigScreen.java | 6 +- .../skyblock/garden/FarmingHudWidget.java | 4 +- .../skyblock/garden/LowerSensitivity.java | 4 +- .../skyblocker/skyblock/garden/VisitorHelper.java | 2 +- .../skyblocker/skyblock/item/ItemCooldowns.java | 4 +- .../skyblock/item/ItemRarityBackgrounds.java | 3 +- .../skyblock/item/tooltip/ItemTooltip.java | 21 +- .../skyblock/item/tooltip/TooltipInfoType.java | 22 +- .../skyblocker/skyblock/quicknav/QuickNav.java | 15 +- .../skyblocker/skyblock/rift/EnigmaSouls.java | 5 +- .../skyblock/rift/MirrorverseWaypoints.java | 2 +- .../skyblock/searchoverlay/OverlayScreen.java | 10 +- .../skyblock/searchoverlay/SearchOverManager.java | 21 +- .../skyblock/tabhud/util/ScreenConst.java | 2 +- .../skyblock/tabhud/widget/PlayerListWidget.java | 3 +- .../skyblocker/skyblock/tabhud/widget/Widget.java | 2 +- .../tabhud/widget/component/PlayerComponent.java | 2 +- .../skyblocker/skyblock/waypoint/FairySouls.java | 7 +- .../skyblock/waypoint/MythologicalRitual.java | 2 +- .../hysky/skyblocker/skyblock/waypoint/Relics.java | 6 +- .../skyblocker/utils/chat/ChatFilterResult.java | 2 +- .../utils/discord/DiscordRPCManager.java | 27 +- .../utils/render/title/TitleContainer.java | 29 +- .../render/title/TitleContainerConfigScreen.java | 63 +- 120 files changed, 2836 insertions(+), 2646 deletions(-) create mode 100644 src/main/java/de/hysky/skyblocker/config/configs/CrimsonIsleConfig.java create mode 100644 src/main/java/de/hysky/skyblocker/config/configs/DungeonsConfig.java create mode 100644 src/main/java/de/hysky/skyblocker/config/configs/FarmingConfig.java create mode 100644 src/main/java/de/hysky/skyblocker/config/configs/GeneralConfig.java create mode 100644 src/main/java/de/hysky/skyblocker/config/configs/HelperConfig.java create mode 100644 src/main/java/de/hysky/skyblocker/config/configs/MessagesConfig.java create mode 100644 src/main/java/de/hysky/skyblocker/config/configs/MiningConfig.java create mode 100644 src/main/java/de/hysky/skyblocker/config/configs/MiscConfig.java create mode 100644 src/main/java/de/hysky/skyblocker/config/configs/OtherLocationsConfig.java create mode 100644 src/main/java/de/hysky/skyblocker/config/configs/QuickNavConfig.java create mode 100644 src/main/java/de/hysky/skyblocker/config/configs/SlayerConfig.java create mode 100644 src/main/java/de/hysky/skyblocker/config/configs/UiAndVisualsConfig.java (limited to 'src/main/java') diff --git a/src/main/java/de/hysky/skyblocker/config/HudConfigScreen.java b/src/main/java/de/hysky/skyblocker/config/HudConfigScreen.java index 41511732..328cbe18 100644 --- a/src/main/java/de/hysky/skyblocker/config/HudConfigScreen.java +++ b/src/main/java/de/hysky/skyblocker/config/HudConfigScreen.java @@ -62,7 +62,7 @@ public abstract class HudConfigScreen extends Screen { */ protected void renderWidget(DrawContext context, List widgets) { for (Widget widget : widgets) { - widget.render(context, SkyblockerConfigManager.get().general.tabHud.enableHudBackground); + widget.render(context, SkyblockerConfigManager.get().uiAndVisuals.tabHud.enableHudBackground); } } diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java index 2d113361..a45c9dd8 100644 --- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java @@ -1,1290 +1,45 @@ package de.hysky.skyblocker.config; -import de.hysky.skyblocker.SkyblockerMod; -import de.hysky.skyblocker.skyblock.item.CustomArmorAnimatedDyes; -import de.hysky.skyblocker.skyblock.item.CustomArmorTrims; -import de.hysky.skyblocker.utils.chat.ChatFilterResult; -import de.hysky.skyblocker.utils.waypoint.Waypoint; +import de.hysky.skyblocker.config.configs.*; import dev.isxander.yacl3.config.v2.api.SerialEntry; -import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; -import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; -import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; -import net.minecraft.client.resource.language.I18n; -import net.minecraft.text.Text; -import net.minecraft.util.Formatting; -import net.minecraft.util.Identifier; - -import java.util.ArrayList; -import java.util.List; public class SkyblockerConfig { @SerialEntry - public int version = 1; + public int version = 2; @SerialEntry - public General general = new General(); + public GeneralConfig general = new GeneralConfig(); @SerialEntry - public Locations locations = new Locations(); + public UiAndVisualsConfig uiAndVisuals = new UiAndVisualsConfig(); @SerialEntry - public Slayer slayer = new Slayer(); + public HelperConfig helper = new HelperConfig(); @SerialEntry - public QuickNav quickNav = new QuickNav(); + public DungeonsConfig dungeons = new DungeonsConfig(); @SerialEntry - public Messages messages = new Messages(); + public CrimsonIsleConfig crimsonIsle = new CrimsonIsleConfig(); @SerialEntry - public RichPresence richPresence = new RichPresence(); - - public static class QuickNav { - @SerialEntry - public boolean enableQuickNav = true; - - @SerialEntry - public QuickNavItem button1 = new QuickNavItem(true, new ItemData("diamond_sword"), "Your Skills", "/skills"); - - @SerialEntry - public QuickNavItem button2 = new QuickNavItem(true, new ItemData("painting"), "Collections", "/collection"); - - /* REGEX Explanation - * "Pets" : simple match on letters - * "(?: \\(\\d+\\/\\d+\\))?" : optional match on the non-capturing group for the page in the format " ($number/$number)" - */ - @SerialEntry - public QuickNavItem button3 = new QuickNavItem(true, new ItemData("bone"), "Pets(:? \\(\\d+\\/\\d+\\))?", "/pets"); - - /* REGEX Explanation - * "Wardrobe" : simple match on letters - * " \\([12]\\/2\\)" : match on the page either " (1/2)" or " (2/2)" - */ - @SerialEntry - public QuickNavItem button4 = new QuickNavItem(true, - new ItemData("leather_chestplate", 1, "tag:{display:{color:8991416}}"), "Wardrobe \\([12]/2\\)", - "/wardrobe"); - - @SerialEntry - public QuickNavItem button5 = new QuickNavItem(true, new ItemData("player_head", 1, - "tag:{SkullOwner:{Id:[I;-2081424676,-57521078,-2073572414,158072763],Properties:{textures:[{Value:\"ewogICJ0aW1lc3RhbXAiIDogMTU5MTMxMDU4NTYwOSwKICAicHJvZmlsZUlkIiA6ICI0MWQzYWJjMmQ3NDk0MDBjOTA5MGQ1NDM0ZDAzODMxYiIsCiAgInByb2ZpbGVOYW1lIiA6ICJNZWdha2xvb24iLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODBhMDc3ZTI0OGQxNDI3NzJlYTgwMDg2NGY4YzU3OGI5ZDM2ODg1YjI5ZGFmODM2YjY0YTcwNjg4MmI2ZWMxMCIKICAgIH0KICB9Cn0=\"}]}}}"), - "Sack of Sacks", "/sacks"); - - /* REGEX Explanation - * "(?:Rift )?" : optional match on the non-capturing group "Rift " - * "Storage" : simple match on letters - * "(?: \\([12]\\/2\\))?" : optional match on the non-capturing group " (1/2)" or " (2/2)" - */ - @SerialEntry - public QuickNavItem button6 = new QuickNavItem(true, new ItemData("ender_chest"), - "(?:Rift )?Storage(?: \\(1/2\\))?", "/storage"); - - @SerialEntry - public QuickNavItem button7 = new QuickNavItem(true, new ItemData("player_head", 1, - "tag:{SkullOwner:{Id:[I;-300151517,-631415889,-1193921967,-1821784279],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDdjYzY2ODc0MjNkMDU3MGQ1NTZhYzUzZTA2NzZjYjU2M2JiZGQ5NzE3Y2Q4MjY5YmRlYmVkNmY2ZDRlN2JmOCJ9fX0=\"}]}}}"), - "none", "/hub"); - - @SerialEntry - public QuickNavItem button8 = new QuickNavItem(true, new ItemData("player_head", 1, - "tag:{SkullOwner:{Id:[I;1605800870,415127827,-1236127084,15358548],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzg5MWQ1YjI3M2ZmMGJjNTBjOTYwYjJjZDg2ZWVmMWM0MGExYjk0MDMyYWU3MWU3NTQ3NWE1NjhhODI1NzQyMSJ9fX0=\"}]}}}"), - "none", "/warp dungeon_hub"); - - @SerialEntry - public QuickNavItem button9 = new QuickNavItem(true, new ItemData("player_head", 1, - "tag:{SkullOwner:{Id:[I;-562285948,532499670,-1705302742,775653035],Properties:{textures:[{Value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjVkZjU1NTkyNjQzMGQ1ZDc1YWRlZDIxZGQ5NjE5Yjc2YzViN2NhMmM3ZjU0MDE0NDA1MjNkNTNhOGJjZmFhYiJ9fX0=\"}]}}}"), - "Visit prtl", "/visit prtl"); - - @SerialEntry - public QuickNavItem button10 = new QuickNavItem(true, new ItemData("enchanting_table"), "Enchant Item", - "/etable"); - - - @SerialEntry - public QuickNavItem button11 = new QuickNavItem(true, new ItemData("anvil"), "Anvil", "/anvil"); - - @SerialEntry - public QuickNavItem button12 = new QuickNavItem(true, new ItemData("crafting_table"), "Craft Item", "/craft"); - } - - public static class QuickNavItem { - public QuickNavItem(Boolean render, ItemData itemData, String uiTitle, String clickEvent) { - this.render = render; - this.item = itemData; - this.clickEvent = clickEvent; - this.uiTitle = uiTitle; - } - - @SerialEntry - public Boolean render; - - @SerialEntry - public ItemData item; - - @SerialEntry - public String uiTitle; - - @SerialEntry - public String clickEvent; - } - - public static class ItemData { - public ItemData(String itemName, int count, String nbt) { - this.itemName = itemName; - this.count = count; - this.nbt = nbt; - } - - public ItemData(String itemName) { - this.itemName = itemName; - this.count = 1; - this.nbt = ""; - } - - @SerialEntry - public String itemName; - - @SerialEntry - public int count; - - @SerialEntry - public String nbt; - } - - public static class General { - @SerialEntry - public boolean enableTips = true; - - @SerialEntry - public boolean acceptReparty = true; - - @SerialEntry - public boolean betterPartyFinder = true; - - @SerialEntry - public boolean fancyCraftingTable = true; - - @SerialEntry - public boolean backpackPreviewWithoutShift = false; - - @SerialEntry - public boolean compactorDeletorPreview = true; - - @SerialEntry - public boolean hideEmptyTooltips = true; - - @SerialEntry - public boolean hideStatusEffectOverlay = false; - - @SerialEntry - public boolean dontStripSkinAlphaValues = true; - - @SerialEntry - public boolean dungeonQuality = true; - - @SerialEntry - public boolean enableNewYearCakesHelper = true; - - @SerialEntry - public TabHudConf tabHud = new TabHudConf(); - - @SerialEntry - public Bars bars = new Bars(); - - @SerialEntry - public Experiments experiments = new Experiments(); - - @SerialEntry - public Fishing fishing = new Fishing(); - - @SerialEntry - public FairySouls fairySouls = new FairySouls(); - - @SerialEntry - public MythologicalRitual mythologicalRitual = new MythologicalRitual(); - - @SerialEntry - public ItemCooldown itemCooldown = new ItemCooldown(); - - @SerialEntry - public Shortcuts shortcuts = new Shortcuts(); - - @SerialEntry - public Waypoints waypoints = new Waypoints(); - - @SerialEntry - public QuiverWarning quiverWarning = new QuiverWarning(); - - @SerialEntry - public ItemList itemList = new ItemList(); - - @SerialEntry - public ItemTooltip itemTooltip = new ItemTooltip(); - - @SerialEntry - public ItemInfoDisplay itemInfoDisplay = new ItemInfoDisplay(); - - @SerialEntry - public ItemProtection itemProtection = new ItemProtection(); - - @SerialEntry - public WikiLookup wikiLookup = new WikiLookup(); - - @SerialEntry - public ChestValue chestValue = new ChestValue(); - - @SerialEntry - public SpecialEffects specialEffects = new SpecialEffects(); - - @SerialEntry - public Hitbox hitbox = new Hitbox(); - - @SerialEntry - public TitleContainer titleContainer = new TitleContainer(); - - @SerialEntry - public TeleportOverlay teleportOverlay = new TeleportOverlay(); - - @SerialEntry - public FlameOverlay flameOverlay = new FlameOverlay(); - - @SerialEntry - public SearchOverlay searchOverlay = new SearchOverlay(); - - @SerialEntry - public FancyAuctionHouse fancyAuctionHouse = new FancyAuctionHouse(); - - @SerialEntry - public List lockedSlots = new ArrayList<>(); - - @SerialEntry - public ObjectOpenHashSet protectedItems = new ObjectOpenHashSet<>(); - - @SerialEntry - public Object2ObjectOpenHashMap customItemNames = new Object2ObjectOpenHashMap<>(); - - @SerialEntry - public Object2IntOpenHashMap customDyeColors = new Object2IntOpenHashMap<>(); - - @SerialEntry - public Object2ObjectOpenHashMap customArmorTrims = new Object2ObjectOpenHashMap<>(); - - @SerialEntry - public Object2ObjectOpenHashMap customAnimatedDyes = new Object2ObjectOpenHashMap<>(); - } - - public static class TabHudConf { - @SerialEntry - public boolean tabHudEnabled = true; - - @SerialEntry - public int tabHudScale = 100; - - @SerialEntry - public boolean enableHudBackground = true; - - @SerialEntry - public boolean plainPlayerNames = false; - - @SerialEntry - public NameSorting nameSorting = NameSorting.DEFAULT; - } - - public enum NameSorting { - DEFAULT, ALPHABETICAL; - - @Override - public String toString() { - return switch (this) { - case DEFAULT -> "Default"; - case ALPHABETICAL -> "Alphabetical"; - }; - } - } - - public static class Bars { - @SerialEntry - public boolean enableBars = true; - - // Kept in for backwards compatibility, remove if needed - @SerialEntry - public OldBarPositions barPositions = new OldBarPositions(); - } - - /** - * Backwards compat - */ - public static class OldBarPositions { - @SerialEntry - public OldBarPosition healthBarPosition = OldBarPosition.LAYER1; - - @SerialEntry - public OldBarPosition manaBarPosition = OldBarPosition.LAYER1; - - @SerialEntry - public OldBarPosition defenceBarPosition = OldBarPosition.LAYER1; - - @SerialEntry - public OldBarPosition experienceBarPosition = OldBarPosition.LAYER1; - - } - - /** - * Backwards compat - */ - public enum OldBarPosition { - LAYER1, LAYER2, RIGHT, NONE - } - - public static class Experiments { - @SerialEntry - public boolean enableChronomatronSolver = true; - - @SerialEntry - public boolean enableSuperpairsSolver = true; - - @SerialEntry - public boolean enableUltrasequencerSolver = true; - } - - public static class Fishing { - @SerialEntry - public boolean enableFishingHelper = true; - - @SerialEntry - public boolean enableFishingTimer = false; - - @SerialEntry - public boolean changeTimerColor = true; - - @SerialEntry - public float fishingTimerScale = 1f; - - @SerialEntry - public boolean hideOtherPlayersRods = false; - } - - public static class FairySouls { - @SerialEntry - public boolean enableFairySoulsHelper = false; - - @SerialEntry - public boolean highlightFoundSouls = true; - - @SerialEntry - public boolean highlightOnlyNearbySouls = false; - } - - public static class MythologicalRitual { - @SerialEntry - public boolean enableMythologicalRitualHelper = true; - } - - public static class ItemCooldown { - @SerialEntry - public boolean enableItemCooldowns = true; - } - - public static class Shortcuts { - @SerialEntry - public boolean enableShortcuts = true; - - @SerialEntry - public boolean enableCommandShortcuts = true; - - @SerialEntry - 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; - - @SerialEntry - public boolean enableQuiverWarningInDungeons = true; - - @SerialEntry - public boolean enableQuiverWarningAfterDungeon = true; - } - - public static class ItemList { - @SerialEntry - public boolean enableItemList = true; - } - - public static class ItemTooltip { - @SerialEntry - public boolean enableNPCPrice = true; - - @SerialEntry - public boolean enableMotesPrice = true; - - @SerialEntry - public boolean enableAvgBIN = true; - - @SerialEntry - public Average avg = Average.THREE_DAY; - - @SerialEntry - public boolean enableLowestBIN = true; - - @SerialEntry - public boolean enableBazaarPrice = true; - - @SerialEntry - public boolean enableObtainedDate = true; - - @SerialEntry - public boolean enableMuseumInfo = true; - - @SerialEntry - public boolean enableExoticTooltip = true; - - @SerialEntry - public boolean enableAccessoriesHelper = true; - } - - public enum Average { - ONE_DAY, THREE_DAY, BOTH; - - @Override - public String toString() { - return I18n.translate("text.autoconfig.skyblocker.option.general.itemTooltip.avg." + name()); - } - } - - public static class ItemInfoDisplay { - @SerialEntry - public boolean attributeShardInfo = true; - - @SerialEntry - public boolean itemRarityBackgrounds = false; - - @SerialEntry - public RarityBackgroundStyle itemRarityBackgroundStyle = RarityBackgroundStyle.CIRCULAR; - - @SerialEntry - public float itemRarityBackgroundsOpacity = 1f; - } - - public enum RarityBackgroundStyle { - CIRCULAR(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_circular")), - SQUARE(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_square")); - - public final Identifier tex; - - RarityBackgroundStyle(Identifier tex) { - this.tex = tex; - } - - @Override - public String toString() { - return switch (this) { - case CIRCULAR -> "Circular"; - case SQUARE -> "Square"; - }; - } - } - - public static class ItemProtection { - @SerialEntry - public SlotLockStyle slotLockStyle = SlotLockStyle.FANCY; - } - - public enum SlotLockStyle { - CLASSIC(new Identifier(SkyblockerMod.NAMESPACE, "textures/gui/slot_lock.png")), - FANCY(new Identifier(SkyblockerMod.NAMESPACE, "textures/gui/fancy_slot_lock.png")); - - public final Identifier tex; - - SlotLockStyle(Identifier tex) { - this.tex = tex; - } - - @Override - public String toString() { - return switch (this) { - case CLASSIC -> "Classic"; - case FANCY -> "FANCY"; - }; - } - } - - public static class WikiLookup { - @SerialEntry - public boolean enableWikiLookup = true; - - @SerialEntry - public boolean officialWiki = true; - } - - public static class ChestValue { - @SerialEntry - public boolean enableChestValue = true; - - @SerialEntry - public Formatting color = Formatting.DARK_GREEN; - - @SerialEntry - public Formatting incompleteColor = Formatting.BLUE; - } - - public static class SpecialEffects { - @SerialEntry - public boolean rareDungeonDropEffects = true; - } - - public static class Hitbox { - @SerialEntry - public boolean oldFarmlandHitbox = false; - - @SerialEntry - public boolean oldLeverHitbox = false; - } - - public static class TitleContainer { - @SerialEntry - public float titleContainerScale = 100; - - @SerialEntry - public int x = 540; - - @SerialEntry - public int y = 10; - - @SerialEntry - public Direction direction = Direction.HORIZONTAL; - - @SerialEntry - public Alignment alignment = Alignment.MIDDLE; - } - - public enum Direction { - HORIZONTAL, VERTICAL; - - @Override - public String toString() { - return switch (this) { - case HORIZONTAL -> "Horizontal"; - case VERTICAL -> "Vertical"; - }; - } - } - - public enum Alignment { - LEFT, RIGHT, MIDDLE; - - @Override - public String toString() { - return switch (this) { - case LEFT -> "Left"; - case RIGHT -> "Right"; - case MIDDLE -> "Middle"; - }; - } - } - - public static class TeleportOverlay { - @SerialEntry - public boolean enableTeleportOverlays = true; - - @SerialEntry - public boolean enableWeirdTransmission = true; - - @SerialEntry - public boolean enableInstantTransmission = true; - - @SerialEntry - public boolean enableEtherTransmission = true; - - @SerialEntry - public boolean enableSinrecallTransmission = true; - - @SerialEntry - public boolean enableWitherImpact = true; - } - - public static class FlameOverlay { - @SerialEntry - public int flameHeight = 100; - - @SerialEntry - public int flameOpacity = 100; - } - - public static class SearchOverlay { - @SerialEntry - public boolean enableBazaar = true; - - @SerialEntry - public boolean enableAuctionHouse = true; - - @SerialEntry - public boolean keepPreviousSearches = false; - - @SerialEntry - public int maxSuggestions = 3; - - @SerialEntry - public int historyLength = 3; - - @SerialEntry - public boolean enableCommands = false; - - @SerialEntry - public List bazaarHistory = new ArrayList<>(); - - @SerialEntry - public List auctionHistory = new ArrayList<>(); - } - - public static class FancyAuctionHouse { - @SerialEntry - public boolean enabled = true; - - @SerialEntry - public boolean highlightCheapBIN = true; - } - - public static class Locations { - @SerialEntry - public Barn barn = new Barn(); - - @SerialEntry - public CrimsonIsle crimsonIsle = new CrimsonIsle(); - - @SerialEntry - public Dungeons dungeons = new Dungeons(); - - @SerialEntry - public DwarvenMines dwarvenMines = new DwarvenMines(); - - @SerialEntry - public Rift rift = new Rift(); - - @SerialEntry - public TheEnd end = new TheEnd(); - - @SerialEntry - public SpidersDen spidersDen = new SpidersDen(); - - @SerialEntry - public Garden garden = new Garden(); - } - - public static class Dungeons { - @SerialEntry - public SecretWaypoints secretWaypoints = new SecretWaypoints(); - - @SerialEntry - public DoorHighlight doorHighlight = new DoorHighlight(); - - @SerialEntry - public DungeonScore dungeonScore = new DungeonScore(); - - @SerialEntry - public DungeonChestProfit dungeonChestProfit = new DungeonChestProfit(); + public MiningConfig mining = new MiningConfig(); - @SerialEntry - public MimicMessage mimicMessage = new MimicMessage(); - - @SerialEntry - public boolean croesusHelper = true; - - @SerialEntry - public boolean enableMap = true; - - @SerialEntry - public float mapScaling = 1f; - - @SerialEntry - public int mapX = 2; - - @SerialEntry - public int mapY = 2; - - @SerialEntry - public boolean playerSecretsTracker = false; - - @SerialEntry - public boolean starredMobGlow = false; - - @SerialEntry - public boolean starredMobBoundingBoxes = true; - - @SerialEntry - public boolean solveThreeWeirdos = true; - - @SerialEntry - public boolean blazeSolver = true; - - @SerialEntry - public boolean creeperSolver = true; - - @SerialEntry - public boolean solveTrivia = true; - - @SerialEntry - public boolean solveTicTacToe = true; - - @SerialEntry - public boolean solveWaterboard = true; - - @SerialEntry - public boolean solveBoulder = true; - - @SerialEntry - public boolean solveIceFill = true; - - @SerialEntry - public boolean solveSilverfish = true; - - @SerialEntry - public boolean fireFreezeStaffTimer = true; - - @SerialEntry - public boolean floor3GuardianHealthDisplay = true; - - @SerialEntry - public boolean allowDroppingProtectedItems = false; - - @SerialEntry - public LividColor lividColor = new LividColor(); - - @SerialEntry - public Terminals terminals = new Terminals(); - } - - public static class SecretWaypoints { - @SerialEntry - public boolean enableRoomMatching = true; - - @SerialEntry - public boolean enableSecretWaypoints = true; - - @SerialEntry - public Waypoint.Type waypointType = Waypoint.Type.WAYPOINT; - - @SerialEntry - public boolean showSecretText = true; - - @SerialEntry - public boolean enableEntranceWaypoints = true; - - @SerialEntry - public boolean enableSuperboomWaypoints = true; - - @SerialEntry - public boolean enableChestWaypoints = true; - - @SerialEntry - public boolean enableItemWaypoints = true; - - @SerialEntry - public boolean enableBatWaypoints = true; - - @SerialEntry - public boolean enableWitherWaypoints = true; - - @SerialEntry - public boolean enableLeverWaypoints = true; - - @SerialEntry - public boolean enableFairySoulWaypoints = true; - - @SerialEntry - public boolean enableStonkWaypoints = true; - - @SerialEntry - public boolean enableAotvWaypoints = true; - - @SerialEntry - public boolean enablePearlWaypoints = true; - - @SerialEntry - public boolean enableDefaultWaypoints = true; - } - - public static class DoorHighlight { - @SerialEntry - public boolean enableDoorHighlight = true; - - @SerialEntry - public Type doorHighlightType = Type.OUTLINED_HIGHLIGHT; - - public enum Type { - HIGHLIGHT, - OUTLINED_HIGHLIGHT, - OUTLINE; - - @Override - public String toString() { - return switch (this) { - case HIGHLIGHT -> "Highlight"; - case OUTLINED_HIGHLIGHT -> "Outlined Highlight"; - case OUTLINE -> "Outline"; - }; - } - } - } - - public static class DungeonScore { - @SerialEntry - public boolean enableDungeonScore270Message = false; - - @SerialEntry - public boolean enableDungeonScore270Title = false; - - @SerialEntry - public boolean enableDungeonScore270Sound = false; - - @SerialEntry - public String dungeonScore270Message = "270 Score Reached!"; - - @SerialEntry - public boolean enableDungeonScore300Message = true; - - @SerialEntry - public boolean enableDungeonScore300Title = true; - - @SerialEntry - public boolean enableDungeonScore300Sound = true; - - @SerialEntry - public String dungeonScore300Message = "300 Score Reached!"; - - @SerialEntry - public boolean enableDungeonCryptsMessage = true; - - @SerialEntry - public int dungeonCryptsMessageThreshold = 250; - - @SerialEntry - public String dungeonCryptsMessage = "We only have [crypts] crypts out of 5, we need more!"; - - @SerialEntry - public boolean enableScoreHUD = true; - - @SerialEntry - public int scoreX = 29; - - @SerialEntry - public int scoreY = 134; - - @SerialEntry - public float scoreScaling = 1f; - } - - public static class DungeonChestProfit { - @SerialEntry - public boolean enableProfitCalculator = true; - - @SerialEntry - public boolean includeKismet = false; - - @SerialEntry - public boolean includeEssence = true; - - @SerialEntry - public boolean croesusProfit = true; - - @SerialEntry - public int neutralThreshold = 1000; - - @SerialEntry - public Formatting neutralColor = Formatting.DARK_GRAY; - - @SerialEntry - public Formatting profitColor = Formatting.DARK_GREEN; - - @SerialEntry - public Formatting lossColor = Formatting.RED; - - @SerialEntry - public Formatting incompleteColor = Formatting.BLUE; - } - - public static class MimicMessage { - @SerialEntry - public boolean sendMimicMessage = true; - - @SerialEntry - public String mimicMessage = "Mimic dead!"; - } - - public static class LividColor { - @SerialEntry - public boolean enableLividColorGlow = true; - - @SerialEntry - public boolean enableLividColorText = true; - - @SerialEntry - public boolean enableLividColorTitle = true; - - @SerialEntry - public String lividColorText = "The livid color is [color]"; - } - - public static class Terminals { - @SerialEntry - public boolean solveColor = true; - - @SerialEntry - public boolean solveOrder = true; - - @SerialEntry - public boolean solveStartsWith = true; - } - - public static class DwarvenMines { - @SerialEntry - public boolean enableDrillFuel = true; - - @SerialEntry - public boolean solveFetchur = true; - - @SerialEntry - public boolean solvePuzzler = true; - - @SerialEntry - public boolean metalDetectorHelper = true; - - @SerialEntry - public DwarvenHud dwarvenHud = new DwarvenHud(); - - @SerialEntry - public CrystalsHud crystalsHud = new CrystalsHud(); - - @SerialEntry - public CrystalsWaypoints crystalsWaypoints = new CrystalsWaypoints(); - } - - public static class DwarvenHud { - @SerialEntry - public boolean enabledCommissions = true; - - @SerialEntry - public boolean enabledPowder = true; - - @SerialEntry - public DwarvenHudStyle style = DwarvenHudStyle.SIMPLE; - - @SerialEntry - public int x = 10; - - @SerialEntry - public int y = 10; - - @SerialEntry - public int powderX = 10; - - @SerialEntry - public int powderY = 70; - } - - public static class CrystalsHud { - @SerialEntry - public boolean enabled = true; - - @SerialEntry - public boolean showLocations = true; - - @SerialEntry - public int locationSize = 8; - - @SerialEntry - public int x = 10; - - @SerialEntry - public int y = 130; - - @SerialEntry - public float mapScaling = 1f; - } - - public static class CrystalsWaypoints { - @SerialEntry - public boolean enabled = true; - - @SerialEntry - public boolean findInChat = true; - } - - public enum DwarvenHudStyle { - SIMPLE, FANCY, CLASSIC; - - @Override - public String toString() { - return switch (this) { - case SIMPLE -> "Simple"; - case FANCY -> "Fancy"; - case CLASSIC -> "Classic"; - }; - } - } - - public static class Barn { - @SerialEntry - public boolean solveHungryHiker = true; - - @SerialEntry - public boolean solveTreasureHunter = true; - } - - public static class CrimsonIsle { - @SerialEntry - public Kuudra kuudra = new Kuudra(); - } - - public static class Kuudra { - @SerialEntry - public boolean supplyWaypoints = true; - - @SerialEntry - public boolean fuelWaypoints = true; - - @SerialEntry - public Waypoint.Type suppliesAndFuelWaypointType = Waypoint.Type.WAYPOINT; - - @SerialEntry - public boolean ballistaBuildWaypoints = true; - - @SerialEntry - public boolean safeSpotWaypoints = true; - - @SerialEntry - public boolean pearlWaypoints = true; - - @SerialEntry - public boolean noArrowPoisonWarning = true; - - @SerialEntry - public int arrowPoisonThreshold = 32; - } - - public static class Rift { - @SerialEntry - public boolean mirrorverseWaypoints = true; - - @SerialEntry - public boolean blobbercystGlow = true; - - @SerialEntry - public boolean enigmaSoulWaypoints = false; - - @SerialEntry - public boolean highlightFoundEnigmaSouls = true; - - @SerialEntry - public int mcGrubberStacks = 0; - } - - public static class TheEnd { - @SerialEntry - public boolean enableEnderNodeHelper = true; - - @SerialEntry - public boolean hudEnabled = true; - - @SerialEntry - public boolean zealotKillsEnabled = true; - - @SerialEntry - public boolean protectorLocationEnabled = true; - - @SerialEntry - public boolean waypoint = true; - - @SerialEntry - public int x = 10; - - @SerialEntry - public int y = 10; - } - - public static class SpidersDen { - @SerialEntry - public Relics relics = new Relics(); - } - - public static class Relics { - @SerialEntry - public boolean enableRelicsHelper = false; - - @SerialEntry - public boolean highlightFoundRelics = true; - } - - public static class Garden { - @SerialEntry - public FarmingHud farmingHud = new FarmingHud(); - - @SerialEntry - public boolean dicerTitlePrevent = true; - - @SerialEntry - public boolean visitorHelper = true; - - @SerialEntry - public boolean lockMouseTool = false; - - @SerialEntry - public boolean lockMouseGroundOnly = false; - } - - public static class FarmingHud { - @SerialEntry - public boolean enableHud = true; - - @SerialEntry - public int x; - - @SerialEntry - public int y; - } - - public static class Slayer { - @SerialEntry - public EndermanSlayer endermanSlayer = new EndermanSlayer(); - - @SerialEntry - public VampireSlayer vampireSlayer = new VampireSlayer(); - } - - public static class EndermanSlayer { - @SerialEntry - public boolean enableYangGlyphsNotification = true; - - @SerialEntry - public boolean highlightBeacons = true; - - @SerialEntry - public boolean highlightNukekubiHeads = true; - } - - public static class VampireSlayer { - @SerialEntry - public boolean enableEffigyWaypoints = true; - - @SerialEntry - public boolean compactEffigyWaypoints; - - @SerialEntry - public int effigyUpdateFrequency = 5; - - @SerialEntry - public boolean enableHolyIceIndicator = true; - - @SerialEntry - public int holyIceIndicatorTickDelay = 10; - - @SerialEntry - public int holyIceUpdateFrequency = 5; - - @SerialEntry - public boolean enableHealingMelonIndicator = true; - - @SerialEntry - public float healingMelonHealthThreshold = 4f; - - @SerialEntry - public boolean enableSteakStakeIndicator = true; - - @SerialEntry - public int steakStakeUpdateFrequency = 5; - - @SerialEntry - public boolean enableManiaIndicator = true; - - @SerialEntry - public int maniaUpdateFrequency = 5; - } - - public static class Messages { - @SerialEntry - public ChatFilterResult hideAbility = ChatFilterResult.PASS; - - @SerialEntry - public ChatFilterResult hideHeal = ChatFilterResult.PASS; - - @SerialEntry - public ChatFilterResult hideAOTE = ChatFilterResult.PASS; - - @SerialEntry - public ChatFilterResult hideImplosion = ChatFilterResult.PASS; - - @SerialEntry - public ChatFilterResult hideMoltenWave = ChatFilterResult.PASS; - - @SerialEntry - public ChatFilterResult hideAds = ChatFilterResult.PASS; - - @SerialEntry - public ChatFilterResult hideTeleportPad = ChatFilterResult.PASS; - - @SerialEntry - public ChatFilterResult hideCombo = ChatFilterResult.PASS; - - @SerialEntry - public ChatFilterResult hideAutopet = ChatFilterResult.PASS; - - @SerialEntry - public ChatFilterResult hideShowOff = ChatFilterResult.PASS; - - @SerialEntry - public ChatFilterResult hideToggleSkyMall = ChatFilterResult.PASS; - - @SerialEntry - public ChatFilterResult hideMimicKill = ChatFilterResult.PASS; - - @SerialEntry - public ChatFilterResult hideDeath = ChatFilterResult.PASS; - - @SerialEntry - public boolean hideMana = false; - - @SerialEntry - public ChatFilterResult hideDicer = ChatFilterResult.PASS; - - @SerialEntry - public ChatRuleConfig chatRuleConfig = new ChatRuleConfig(); - } - - public static class ChatRuleConfig { - @SerialEntry - public int announcementLength = 60; - @SerialEntry - public int announcementScale = 3; - } - - public static class RichPresence { - @SerialEntry - public boolean enableRichPresence = false; + @SerialEntry + public FarmingConfig farming = new FarmingConfig(); - @SerialEntry - public Info info = Info.LOCATION; + @SerialEntry + public OtherLocationsConfig otherLocations = new OtherLocationsConfig(); - @SerialEntry - public boolean cycleMode = false; + @SerialEntry + public SlayerConfig slayer = new SlayerConfig(); - @SerialEntry - public String customMessage = "Playing Skyblock"; - } + @SerialEntry + public MessagesConfig messages = new MessagesConfig(); - public enum Info { - PURSE, BITS, LOCATION; + @SerialEntry + public QuickNavConfig quickNav = new QuickNavConfig(); - @Override - public String toString() { - return I18n.translate("text.autoconfig.skyblocker.option.richPresence.info." + name()); - } - } + @SerialEntry + public MiscConfig misc = new MiscConfig(); } diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfigManager.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfigManager.java index 31f1357d..1c031a9c 100644 --- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfigManager.java +++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfigManager.java @@ -57,7 +57,7 @@ public class SkyblockerConfigManager { Screens.getButtons(screen).add(ButtonWidget .builder(Text.literal("\uD83D\uDD27"), buttonWidget -> client.setScreen(createGUI(screen))) .dimensions(((HandledScreenAccessor) genericContainerScreen).getX() + ((HandledScreenAccessor) genericContainerScreen).getBackgroundWidth() - 16, ((HandledScreenAccessor) genericContainerScreen).getY() + 4, 12, 12) - .tooltip(Tooltip.of(Text.translatable("text.autoconfig.skyblocker.title"))) + .tooltip(Tooltip.of(Text.translatable("skyblocker.title"))) .build()); } }); @@ -69,7 +69,7 @@ public class SkyblockerConfigManager { public static Screen createGUI(Screen parent) { return YetAnotherConfigLib.create(HANDLER, (defaults, config, builder) -> builder - .title(Text.translatable("text.autoconfig.skyblocker.title")) + .title(Text.translatable("skyblocker.title")) .category(GeneralCategory.create(defaults, config)) .category(DungeonsCategory.create(defaults, config)) .category(DwarvenMinesCategory.create(defaults, config)) diff --git a/src/main/java/de/hysky/skyblocker/config/categories/CrimsonIsleCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/CrimsonIsleCategory.java index 3c2dc3b6..a573a622 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/CrimsonIsleCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/CrimsonIsleCategory.java @@ -14,69 +14,69 @@ public class CrimsonIsleCategory { public static ConfigCategory create(SkyblockerConfig defaults, SkyblockerConfig config) { return ConfigCategory.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.category.crimsonIsle")) + .name(Text.translatable("skyblocker.category.crimsonIsle")) //Kuudra .group(OptionGroup.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.crimsonIsle.kuudra")) + .name(Text.translatable("skyblocker.option.locations.crimsonIsle.kuudra")) .collapsed(false) .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.crimsonIsle.kuudra.supplyWaypoints")) - .binding(defaults.locations.crimsonIsle.kuudra.supplyWaypoints, - () -> config.locations.crimsonIsle.kuudra.supplyWaypoints, - newValue -> config.locations.crimsonIsle.kuudra.supplyWaypoints = newValue) + .name(Text.translatable("skyblocker.option.locations.crimsonIsle.kuudra.supplyWaypoints")) + .binding(defaults.crimsonIsle.kuudra.supplyWaypoints, + () -> config.crimsonIsle.kuudra.supplyWaypoints, + newValue -> config.crimsonIsle.kuudra.supplyWaypoints = newValue) .controller(ConfigUtils::createBooleanController) .build()) .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.crimsonIsle.kuudra.fuelWaypoints")) - .binding(defaults.locations.crimsonIsle.kuudra.fuelWaypoints, - () -> config.locations.crimsonIsle.kuudra.fuelWaypoints, - newValue -> config.locations.crimsonIsle.kuudra.fuelWaypoints = newValue) + .name(Text.translatable("skyblocker.option.locations.crimsonIsle.kuudra.fuelWaypoints")) + .binding(defaults.crimsonIsle.kuudra.fuelWaypoints, + () -> config.crimsonIsle.kuudra.fuelWaypoints, + newValue -> config.crimsonIsle.kuudra.fuelWaypoints = newValue) .controller(ConfigUtils::createBooleanController) .build()) .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.crimsonIsle.kuudra.suppliesAndFuelWaypointType")) - .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.general.waypoints.waypointType.@Tooltip"))) - .binding(defaults.locations.crimsonIsle.kuudra.suppliesAndFuelWaypointType, - () -> config.locations.crimsonIsle.kuudra.suppliesAndFuelWaypointType, - newValue -> config.locations.crimsonIsle.kuudra.suppliesAndFuelWaypointType = newValue) + .name(Text.translatable("skyblocker.option.locations.crimsonIsle.kuudra.suppliesAndFuelWaypointType")) + .description(OptionDescription.of(Text.translatable("skyblocker.option.general.waypoints.waypointType.@Tooltip"))) + .binding(defaults.crimsonIsle.kuudra.suppliesAndFuelWaypointType, + () -> config.crimsonIsle.kuudra.suppliesAndFuelWaypointType, + newValue -> config.crimsonIsle.kuudra.suppliesAndFuelWaypointType = newValue) .controller(ConfigUtils::createEnumCyclingListController) .build()) .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.crimsonIsle.kuudra.ballistaBuildWaypoints")) - .binding(defaults.locations.crimsonIsle.kuudra.ballistaBuildWaypoints, - () -> config.locations.crimsonIsle.kuudra.ballistaBuildWaypoints, - newValue -> config.locations.crimsonIsle.kuudra.ballistaBuildWaypoints = newValue) + .name(Text.translatable("skyblocker.option.locations.crimsonIsle.kuudra.ballistaBuildWaypoints")) + .binding(defaults.crimsonIsle.kuudra.ballistaBuildWaypoints, + () -> config.crimsonIsle.kuudra.ballistaBuildWaypoints, + newValue -> config.crimsonIsle.kuudra.ballistaBuildWaypoints = newValue) .controller(ConfigUtils::createBooleanController) .build()) .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.crimsonIsle.kuudra.safeSpotWaypoints")) - .binding(defaults.locations.crimsonIsle.kuudra.safeSpotWaypoints, - () -> config.locations.crimsonIsle.kuudra.safeSpotWaypoints, - newValue -> config.locations.crimsonIsle.kuudra.safeSpotWaypoints = newValue) + .name(Text.translatable("skyblocker.option.locations.crimsonIsle.kuudra.safeSpotWaypoints")) + .binding(defaults.crimsonIsle.kuudra.safeSpotWaypoints, + () -> config.crimsonIsle.kuudra.safeSpotWaypoints, + newValue -> config.crimsonIsle.kuudra.safeSpotWaypoints = newValue) .controller(ConfigUtils::createBooleanController) .build()) .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.crimsonIsle.kuudra.pearlWaypoints")) - .binding(defaults.locations.crimsonIsle.kuudra.pearlWaypoints, - () -> config.locations.crimsonIsle.kuudra.pearlWaypoints, - newValue -> config.locations.crimsonIsle.kuudra.pearlWaypoints = newValue) + .name(Text.translatable("skyblocker.option.locations.crimsonIsle.kuudra.pearlWaypoints")) + .binding(defaults.crimsonIsle.kuudra.pearlWaypoints, + () -> config.crimsonIsle.kuudra.pearlWaypoints, + newValue -> config.crimsonIsle.kuudra.pearlWaypoints = newValue) .controller(ConfigUtils::createBooleanController) .build()) .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.crimsonIsle.kuudra.noArrowPoisonWarning")) - .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.locations.crimsonIsle.kuudra.noArrowPoisonWarning.@Tooltip"))) - .binding(defaults.locations.crimsonIsle.kuudra.noArrowPoisonWarning, - () -> config.locations.crimsonIsle.kuudra.noArrowPoisonWarning, - newValue -> config.locations.crimsonIsle.kuudra.noArrowPoisonWarning = newValue) + .name(Text.translatable("skyblocker.option.locations.crimsonIsle.kuudra.noArrowPoisonWarning")) + .description(OptionDescription.of(Text.translatable("skyblocker.option.locations.crimsonIsle.kuudra.noArrowPoisonWarning.@Tooltip"))) + .binding(defaults.crimsonIsle.kuudra.noArrowPoisonWarning, + () -> config.crimsonIsle.kuudra.noArrowPoisonWarning, + newValue -> config.crimsonIsle.kuudra.noArrowPoisonWarning = newValue) .controller(ConfigUtils::createBooleanController) .build()) .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.crimsonIsle.kuudra.arrowPoisonThreshold")) - .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.locations.crimsonIsle.kuudra.arrowPoisonThreshold.@Tooltip"))) - .binding(defaults.locations.crimsonIsle.kuudra.arrowPoisonThreshold, - () -> config.locations.crimsonIsle.kuudra.arrowPoisonThreshold, - newValue -> config.locations.crimsonIsle.kuudra.arrowPoisonThreshold = newValue) + .name(Text.translatable("skyblocker.option.locations.crimsonIsle.kuudra.arrowPoisonThreshold")) + .description(OptionDescription.of(Text.translatable("skyblocker.option.locations.crimsonIsle.kuudra.arrowPoisonThreshold.@Tooltip"))) + .binding(defaults.crimsonIsle.kuudra.arrowPoisonThreshold, + () -> config.crimsonIsle.kuudra.arrowPoisonThreshold, + newValue -> config.crimsonIsle.kuudra.arrowPoisonThreshold = newValue) .controller(IntegerFieldControllerBuilder::create) .build()) .build()) diff --git a/src/main/java/de/hysky/skyblocker/config/categories/DiscordRPCCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/DiscordRPCCategory.java index 907291ca..f69d6343 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/DiscordRPCCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/DiscordRPCCategory.java @@ -2,6 +2,7 @@ package de.hysky.skyblocker.config.categories; import de.hysky.skyblocker.config.ConfigUtils; import de.hysky.skyblocker.config.SkyblockerConfig; +import de.hysky.skyblocker.config.configs.MiscConfig; import dev.isxander.yacl3.api.ConfigCategory; import dev.isxander.yacl3.api.Option; import dev.isxander.yacl3.api.OptionDescription; @@ -12,36 +13,36 @@ public class DiscordRPCCategory { public static ConfigCategory create(SkyblockerConfig defaults, SkyblockerConfig config) { return ConfigCategory.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.category.richPresence")) + .name(Text.translatable("skyblocker.category.richPresence")) //Uncategorized Options .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.richPresence.enableRichPresence")) - .binding(defaults.richPresence.enableRichPresence, - () -> config.richPresence.enableRichPresence, - newValue -> config.richPresence.enableRichPresence = newValue) + .name(Text.translatable("skyblocker.option.richPresence.enableRichPresence")) + .binding(defaults.misc.richPresence.enableRichPresence, + () -> config.misc.richPresence.enableRichPresence, + newValue -> config.misc.richPresence.enableRichPresence = newValue) .controller(ConfigUtils::createBooleanController) .build()) - .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.richPresence.info")) - .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.richPresence.info.@Tooltip"))) - .binding(defaults.richPresence.info, - () -> config.richPresence.info, - newValue -> config.richPresence.info = newValue) + .option(Option.createBuilder() + .name(Text.translatable("skyblocker.option.richPresence.info")) + .description(OptionDescription.of(Text.translatable("skyblocker.option.richPresence.info.@Tooltip"))) + .binding(defaults.misc.richPresence.info, + () -> config.misc.richPresence.info, + newValue -> config.misc.richPresence.info = newValue) .controller(ConfigUtils::createEnumCyclingListController) .build()) .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.richPresence.cycleMode")) - .binding(defaults.richPresence.cycleMode, - () -> config.richPresence.cycleMode, - newValue -> config.richPresence.cycleMode = newValue) + .name(Text.translatable("skyblocker.option.richPresence.cycleMode")) + .binding(defaults.misc.richPresence.cycleMode, + () -> config.misc.richPresence.cycleMode, + newValue -> config.misc.richPresence.cycleMode = newValue) .controller(ConfigUtils::createBooleanController) .build()) .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.richPresence.customMessage")) - .binding(defaults.richPresence.customMessage, - () -> config.richPresence.customMessage, - newValue -> config.richPresence.customMessage = newValue) + .name(Text.translatable("skyblocker.option.richPresence.customMessage")) + .binding(defaults.misc.richPresence.customMessage, + () -> config.misc.richPresence.customMessage, + newValue -> config.misc.richPresence.customMessage = newValue) .controller(StringControllerBuilder::create) .build()) .build(); 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 77d2da6d..2137f380 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java @@ -2,6 +2,7 @@ package de.hysky.skyblocker.config.categories; import de.hysky.skyblocker.config.ConfigUtils; import de.hysky.skyblocker.config.SkyblockerConfig; +import de.hysky.skyblocker.config.configs.DungeonsConfig; import de.hysky.skyblocker.skyblock.dungeon.DungeonMapConfigScreen; import de.hysky.skyblocker.utils.waypoint.Waypoint.Type; import dev.isxander.yacl3.api.*; @@ -16,260 +17,260 @@ public class DungeonsCategory { public static ConfigCategory create(SkyblockerConfig defaults, SkyblockerConfig config) { return ConfigCategory.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons")) + .name(Text.translatable("skyblocker.option.locations.dungeons")) //Dungeon Secret Waypoints .group(OptionGroup.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints")) + .name(Text.translatable("skyblocker.option.locations.dungeons.secretWaypoints")) .collapsed(true) .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.enableRoomMatching")) - .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.enableRoomMatching.@Tooltip"))) - .binding(defaults.locations.dungeons.secretWaypoints.enableRoomMatching, - () -> config.locations.dungeons.secretWaypoints.enableRoomMatching, - newValue -> config.locations.dungeons.secretWaypoints.enableRoomMatching = newValue) + .name(Text.translatable("skyblocker.option.locations.dungeons.secretWaypoints.enableRoomMatching")) + .description(OptionDescription.of(Text.translatable("skyblocker.option.locations.dungeons.secretWaypoints.enableRoomMatching.@Tooltip"))) + .binding(defaults.dungeons.secretWaypoints.enableRoomMatching, + () -> config.dungeons.secretWaypoints.enableRoomMatching, + newValue -> config.dungeons.secretWaypoints.enableRoomMatching = newValue) .controller(ConfigUtils::createBooleanController) .flag(OptionFlag.GAME_RESTART) .build()) .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.enableSecretWaypoints")) - .binding(defaults.locations.dungeons.secretWaypoints.enableSecretWaypoints, - () -> config.locations.dungeons.secretWaypoints.enableSecretWaypoints, - newValue -> config.locations.dungeons.secretWaypoints.enableSecretWaypoints = newValue) + .name(Text.translatable("skyblocker.option.locations.dungeons.secretWaypoints.enableSecretWaypoints")) + .binding(defaults.dungeons.secretWaypoints.enableSecretWaypoints, + () -> config.dungeons.secretWaypoints.enableSecretWaypoints, + newValue -> config.dungeons.secretWaypoints.enableSecretWaypoints = newValue) .controller(ConfigUtils::createBooleanController) .build()) .option(Option.createBuilder() - .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) + .name(Text.translatable("skyblocker.option.general.waypoints.waypointType")) + .description(OptionDescription.of(Text.translatable("skyblocker.option.general.waypoints.waypointType.@Tooltip"))) + .binding(defaults.dungeons.secretWaypoints.waypointType, + () -> config.dungeons.secretWaypoints.waypointType, + newValue -> config.dungeons.secretWaypoints.waypointType = newValue) .controller(ConfigUtils::createEnumCyclingListController) .build()) .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.showSecretText")) - .binding(defaults.locations.dungeons.secretWaypoints.showSecretText, - () -> config.locations.dungeons.secretWaypoints.showSecretText, - newValue -> config.locations.dungeons.secretWaypoints.showSecretText = newValue) + .name(Text.translatable("skyblocker.option.locations.dungeons.secretWaypoints.showSecretText")) + .binding(defaults.dungeons.secretWaypoints.showSecretText, + () -> config.dungeons.secretWaypoints.showSecretText, + newValue -> config.dungeons.secretWaypoints.showSecretText = newValue) .controller(ConfigUtils::createBooleanController) .build()) .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.enableEntranceWaypoints")) - .binding(defaults.locations.dungeons.secretWaypoints.enableEntranceWaypoints, - () -> config.locations.dungeons.secretWaypoints.enableEntranceWaypoints, - newValue -> config.locations.dungeons.secretWaypoints.enableEntranceWaypoints = newValue) + .name(Text.translatable("skyblocker.option.locations.dungeons.secretWaypoints.enableEntranceWaypoints")) + .binding(defaults.dungeons.secretWaypoints.enableEntranceWaypoints, + () -> config.dungeons.secretWaypoints.enableEntranceWaypoints, + newValue -> config.dungeons.secretWaypoints.enableEntranceWaypoints = newValue) .controller(ConfigUtils::createBooleanController) .build()) .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.enableSuperboomWaypoints")) - .binding(defaults.locations.dungeons.secretWaypoints.enableSuperboomWaypoints, - () -> config.locations.dungeons.secretWaypoints.enableSuperboomWaypoints, - newValue -> config.locations.dungeons.secretWaypoints.enableSuperboomWaypoints = newValue) + .name(Text.translatable("skyblocker.option.locations.dungeons.secretWaypoints.enableSuperboomWaypoints")) + .binding(defaults.dungeons.secretWaypoints.enableSuperboomWaypoints, + () -> config.dungeons.secretWaypoints.enableSuperboomWaypoints, + newValue -> config.dungeons.secretWaypoints.enableSuperboomWaypoints = newValue) .controller(ConfigUtils::createBooleanController) .build()) .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.enableChestWaypoints")) - .binding(defaults.locations.dungeons.secretWaypoints.enableChestWaypoints, - () -> config.locations.dungeons.secretWaypoints.enableChestWaypoints, - newValue -> config.locations.dungeons.secretWaypoints.enableChestWaypoints = newValue) + .name(Text.translatable("skyblocker.option.locations.dungeons.secretWaypoints.enableChestWaypoints")) + .binding(defaults.dungeons.secretWaypoints.enableChestWaypoints, + () -> config.dungeons.secretWaypoints.enableChestWaypoints, + newValue -> config.dungeons.secretWaypoints.enableChestWaypoints = newValue) .controller(ConfigUtils::createBooleanController) .build()) .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.enableItemWaypoints")) - .binding(defaults.locations.dungeons.secretWaypoints.enableItemWaypoints, - () -> config.locations.dungeons.secretWaypoints.enableItemWaypoints, - newValue -> config.locations.dungeons.secretWaypoints.enableItemWaypoints = newValue) + .name(Text.translatable("skyblocker.option.locations.dungeons.secretWaypoints.enableItemWaypoints")) + .binding(defaults.dungeons.secretWaypoints.enableItemWaypoints, + () -> config.dungeons.secretWaypoints.enableItemWaypoints, + newValue -> config.dungeons.secretWaypoints.enableItemWaypoints = newValue) .controller(ConfigUtils::createBooleanController) .build()) .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.enableBatWaypoints")) - .binding(defaults.locations.dungeons.secretWaypoints.enableBatWaypoints, - () -> config.locations.dungeons.secretWaypoints.enableBatWaypoints, - newValue -> config.locations.dungeons.secretWaypoints.enableBatWaypoints = newValue) + .name(Text.translatable("skyblocker.option.locations.dungeons.secretWaypoints.enableBatWaypoints")) + .binding(defaults.dungeons.secretWaypoints.enableBatWaypoints, + () -> config.dungeons.secretWaypoints.enableBatWaypoints, + newValue -> config.dungeons.secretWaypoints.enableBatWaypoints = newValue) .controller(ConfigUtils::createBooleanController) .build()) .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.enableWitherWaypoints")) - .binding(defaults.locations.dungeons.secretWaypoints.enableWitherWaypoints, - () -> config.locations.dungeons.secretWaypoints.enableWitherWaypoints, - newValue -> config.locations.dungeons.secretWaypoints.enableWitherWaypoints = newValue) + .name(Text.translatable("skyblocker.optio