From 7df75c9469bedda34ffce42273abc96f952f613a Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Thu, 2 Nov 2023 22:20:32 +0100 Subject: Add visitor highlighter/blocker (#653) Added Highlight Visitors in SkyBlock. Block Interacting with Visitors. #653 --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 8a0805a77..e91fbb1ae 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -160,6 +160,7 @@ import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorColorNames import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorDropStatistics import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorFeatures import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorTimer +import at.hannibal2.skyhanni.features.garden.visitor.HighlightVisitorsOutsideOfGarden import at.hannibal2.skyhanni.features.garden.visitor.VisitorListener import at.hannibal2.skyhanni.features.inventory.AuctionsHighlighter import at.hannibal2.skyhanni.features.inventory.ChestValue @@ -354,6 +355,7 @@ class SkyHanniMod { loadModule(VisitorListener()) loadModule(OwnInventoryData()) loadModule(ToolTipData()) + loadModule(HighlightVisitorsOutsideOfGarden()) loadModule(GuiEditManager()) loadModule(UpdateManager) loadModule(CropAccessoryData()) -- cgit From c14cfe950c8d0959e7c6b6fed7fd091b0cf826fe Mon Sep 17 00:00:00 2001 From: "Erymanthus[#5074] | (u/)RayDeeUx" <51521765+RayDeeUx@users.noreply.github.com> Date: Thu, 2 Nov 2023 19:04:20 -0400 Subject: Feature: The Great Spook Display Utilities and Notif Sound (#660) Added support for showing the primal fear data from tab list as gui elements and play warning sound when the next primal fear can spawn. #660 --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 + .../skyhanni/config/features/EventConfig.java | 42 ++++++++++++++++ .../skyhanni/features/event/spook/TheGreatSpook.kt | 58 ++++++++++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 src/main/java/at/hannibal2/skyhanni/features/event/spook/TheGreatSpook.kt (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index e91fbb1ae..0ef311323 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -102,6 +102,7 @@ import at.hannibal2.skyhanni.features.event.diana.InquisitorWaypointShare import at.hannibal2.skyhanni.features.event.diana.SoopyGuessBurrow import at.hannibal2.skyhanni.features.event.jerry.HighlightJerries import at.hannibal2.skyhanni.features.event.jerry.frozentreasure.FrozenTreasureTracker +import at.hannibal2.skyhanni.features.event.spook.TheGreatSpook import at.hannibal2.skyhanni.features.fame.AccountUpgradeReminder import at.hannibal2.skyhanni.features.fame.CityProjectFeatures import at.hannibal2.skyhanni.features.fishing.ChumBucketHider @@ -457,6 +458,7 @@ class SkyHanniMod { loadModule(NonGodPotEffectDisplay()) loadModule(SoopyGuessBurrow()) loadModule(HighlightJerries()) + loadModule(TheGreatSpook()) loadModule(GriffinBurrowHelper) loadModule(GriffinBurrowParticleFinder()) loadModule(BurrowWarpHelper()) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/EventConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/EventConfig.java index 7b4d0211f..fe7e36440 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/EventConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/EventConfig.java @@ -329,6 +329,48 @@ public class EventConfig { } + @ConfigOption(name = "The Great Spook", desc = "") + @Accordion + @Expose + public GreatSpookConfig spook = new GreatSpookConfig(); + + public static class GreatSpookConfig { + + @Expose + @ConfigOption(name = "Primal Fear Timer", desc = "Shows cooldown timer for next primal fear.") + @ConfigEditorBoolean + @FeatureToggle + public boolean primalFearTimer = false; + + @Expose + @ConfigOption(name = "Primal Fear Notify", desc = "Plays a notification sound when the next primal fear can spawn.") + @ConfigEditorBoolean + @FeatureToggle + public boolean primalFearNotification = false; + + @Expose + public Position positionTimer = new Position(20, 20, false, true); + + @Expose + @ConfigOption(name = "Fear Stat Display", desc = "Shows your current Fear stat value.") + @ConfigEditorBoolean + @FeatureToggle + public boolean fearStatDisplay = false; + + @Expose + public Position positionFear = new Position(30, 30, false, true); + + @Expose + @ConfigOption(name = "IRL Time Left", desc = "Shows the IRL time left before The Great Spook ends.") + @ConfigEditorBoolean + @FeatureToggle + public boolean greatSpookTimeLeft = false; + + @Expose + public Position positionTimeLeft = new Position(40, 40, false, true); + + } + // comment in if the event is needed again // @ConfigOption(name = "300þ Anniversary Celebration", desc = "Features for the 300þ year of SkyBlock") @Accordion diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/spook/TheGreatSpook.kt b/src/main/java/at/hannibal2/skyhanni/features/event/spook/TheGreatSpook.kt new file mode 100644 index 000000000..f0334549e --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/event/spook/TheGreatSpook.kt @@ -0,0 +1,58 @@ +package at.hannibal2.skyhanni.features.event.spook + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.GuiRenderEvent +import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.RenderUtils.renderString +import at.hannibal2.skyhanni.utils.SoundUtils +import at.hannibal2.skyhanni.utils.TabListData +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +class TheGreatSpook { +// §r§cPrimal Fears§r§7: §r§6§lREADY!! + private val config get() = SkyHanniMod.feature.event.spook + private var displayTimer = "" + private var displayFearStat = "" + private var displayTimeLeft = "" + private var notificationSeconds = 0 + + @SubscribeEvent + fun onTick(event: LorenzTickEvent) { + if (isAllDisabled()) return + if (!event.repeatSeconds(1)) return + + if (isTimerEnabled() || isNotificationEnabled()) displayTimer = checkTabList(" §r§cPrimal Fears§r§7: ") + if (isFearStatEnabled()) displayFearStat = checkTabList(" §r§5Fear: ") + if (isTimeLeftEnabled()) displayTimeLeft = checkTabList(" §r§dEnds In§r§7: ") + if (isNotificationEnabled()) { + if (displayTimer.endsWith("READY!!")) { + if (notificationSeconds > 0) { + SoundUtils.playBeepSound() + notificationSeconds-- + } + } else if (displayTimer.isNotEmpty()) { + notificationSeconds = 5 + } + } + } + + private fun checkTabList(matchString: String): String { + return (TabListData.getTabList().find { it.contains(matchString) } ?: "").trim() + } + @SubscribeEvent + fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) { + if (isTimerEnabled()) config.positionTimer.renderString(displayTimer, posLabel = "Primal Fear Timer") + if (isFearStatEnabled()) config.positionFear.renderString(displayFearStat, posLabel = "Fear Stat Display") + if (isTimeLeftEnabled()) config.positionTimeLeft.renderString(displayTimeLeft, posLabel = "Time Left Display") + } + + private fun isTimerEnabled(): Boolean = LorenzUtils.inSkyBlock && config.primalFearTimer + + private fun isNotificationEnabled(): Boolean = LorenzUtils.inSkyBlock && config.primalFearNotification + private fun isFearStatEnabled(): Boolean = LorenzUtils.inSkyBlock && config.fearStatDisplay + private fun isTimeLeftEnabled(): Boolean = LorenzUtils.inSkyBlock && config.greatSpookTimeLeft + + private fun isAllDisabled(): Boolean = !isTimeLeftEnabled() && !isTimerEnabled() && !isFearStatEnabled() && + !isNotificationEnabled() +} -- cgit From 379b7ee6e42f758284e6871072cd52149ecb7d34 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 3 Nov 2023 00:22:10 +0100 Subject: 0.21 Beta 17 --- CHANGELOG.md | 23 +++++++++++++++++++--- FEATURES.md | 6 ++++++ build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 4 files changed, 28 insertions(+), 5 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e86f8588..ccf1ba1ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -71,6 +71,10 @@ + E.g. inside the SkyBlock leveling guide. + Added Chat **Translator** - NetheriteMiner + After enabling, click on any chat message sent by another player to translate it to English. ++ Added Highlight Visitors in SkyBlock. - nea + + Highlights Visitors outside the Garden. ++ Block Interacting with Visitors. - nea + + Blocks you from interacting with / unlocking Visitors to allow for Dedication Cycling. #### Events @@ -82,7 +86,8 @@ + Help with the 2023 Halloween visitor challenge (ephemeral dingsibumsi or something) - nea + New Visitor Ping: Pings you when you are less than 10 seconds away from getting a new visitor. + Accept Hotkey: Accept a visitor when you press this keybind while in the visitor GUI. - ++ Added support for showing the primal fear data from tab list as GUI elements. - Erymanthus ++ Play warning sound when the next Primal Fear can spawn. - thunderblade73 ### Changes @@ -119,9 +124,11 @@ + Only items with recipes are tab completed. + Added option to set the size of highlighted motes orbs in rift and make them smaller by default. - cimbraien + Disabled clicks on SkyHanni GUIs while inside NEU's or Skytils profile viewer. - hannibal2 -+ Removed armor stand checks for Trevor Solver. This fixes or nerfs the feature to not highlight mobs behind blocks sometimes. - hannibal2 ++ Removed armor stand checks for Trevor Solver. This fixes or nerfs the feature to not highlight mobs behind blocks + sometimes. - hannibal2 + Added diamond and gold essence support to PowderTracker. - walker -+ Change the fandom wiki search engine (under the /wiki command) from Google to the fandom wiki's built-in search engine - Erymanthus ++ Change the fandom wiki search engine (under the /wiki command) from Google to the fandom wiki's built-in search + engine - Erymanthus + Added option to hide Chest Value while the Estimated Item Value display is showing. - hannibal2 + No longer merging same items with different prices in Chest Value together. - hannibal2 + Adding Great Spook support for Non God Pot Effect display. - hannibal2 @@ -129,6 +136,8 @@ + Added support for detecting refreshed farming fortune century cake effect. - alexia + Show key to press below burrow warp. - hannibal2 + Makes the Compact Potion message open the Potion effects menu on click. - jani ++ Added option to show King Talisman Helper outside Dwarven Mines. - hannibal2 ++ In-Game Date: Adds support for reading the in-game scoreboard, and also allow sun/moon symbol customization. - Erymanthus ### Bug Fixes @@ -191,6 +200,13 @@ + SkyHanni Keybinds no longer work inside SkyHanni config. - hannibal2 + Fixed Great Spook potion not working in Non God Pot Effect feature. - jani + Fixed wrong Rhys (Deep Caverns NPC) items needed for Dwarven Mines unlock in Bingo Step Helper. - ReyMaratov ++ Fixed King Talisman Helper once again. - hannibal2 ++ Made the ESC -> Mod Options -> SkyHanni -> Config button not crash you. - hannibal2 ++ Disabled Diana Warp key and Inquis Share key while inside any GUI. - hannibal2 ++ Removed Diana warp data on world switch. - hannibal2 ++ Reset mouse sensitivity back to 100% if you log off with lock mouse look enabled. - hannibal2 ++ Fixed mouse sensitivity stuck after restarting by storing old sensitivity. - CalMWolfs ++ Fixed tool fortune. - CalMWolfs #### Config @@ -216,6 +232,7 @@ java config files (names, description, orderings and stuff). + Adding 100 lines to MobFinder.kt and making it better readable in the process. - walker + Making ChatFiler.kt way better, storing regex objects for reuse and preparing future repo support. - walker ++ Added command /shkingfix to reset the internal King Talisman Helper offset. - hannibal2 ## Version 0.20 diff --git a/FEATURES.md b/FEATURES.md index 459ac958a..527f7ed7a 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -480,6 +480,10 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + **Visual garden plot borders** - VixidDev + Press F3 + G to enable/disable the view. + /shmouselock command to lock mouse rotation for farming. - Cad ++ Added Highlight Visitors in SkyBlock. - nea + + Highlights Visitors outside the Garden. ++ Block Interacting with Visitors. - nea + + Blocks you from interacting with / unlocking Visitors to allow for Dedication Cycling.
@@ -582,6 +586,8 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Help with the 2023 Halloween visitor challenge (ephemeral dingsibumsi or something) - nea + New Visitor Ping: Pings you when you are less than 10 seconds away from getting a new visitor. + Accept Hotkey: Accept a visitor when you press this keybind while in the visitor GUI. ++ Added support for showing the primal fear data from tab list as GUI elements. - Erymanthus ++ Play warning sound when the next Primal Fear can spawn. - thunderblade73
diff --git a/build.gradle.kts b/build.gradle.kts index cc4fdc04b..7e3e98c54 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.21.Beta.16" +version = "0.21.Beta.17" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 0ef311323..ab2915ca8 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -322,7 +322,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.21.Beta.16", + version = "0.21.Beta.17", ) class SkyHanniMod { @Mod.EventHandler -- cgit From b3426297169836aceee7486bab89035c35c6d126 Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Fri, 3 Nov 2023 20:26:08 +0100 Subject: Change: Custom Keybinds for Harp Helper (#612) Add custom keybinds for Harp Helper. #612 --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- .../skyhanni/config/features/InventoryConfig.java | 38 ++++++++++++++++++ .../skyhanni/features/inventory/HarpFeatures.kt | 46 +++++++++++++++------- 3 files changed, 70 insertions(+), 16 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index ab2915ca8..544089711 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -591,7 +591,7 @@ class SkyHanniMod { loadModule(GriffinPetWarning()) loadModule(BestiaryData) loadModule(KingTalismanHelper()) - loadModule(HarpFeatures()) + loadModule(HarpFeatures) loadModule(EnderNodeTracker()) loadModule(CompactBestiaryChatMessage()) loadModule(WatchdogHider()) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java index 9a5f4759c..50128e85e 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java @@ -8,8 +8,10 @@ import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; import io.github.moulberry.moulconfig.annotations.ConfigOption; +import org.lwjgl.input.Keyboard; import java.util.ArrayList; import java.util.Arrays; @@ -331,6 +333,42 @@ public class InventoryConfig { @ConfigOption(name = "Show Numbers", desc = "In the Harp, show buttons as stack size (intended to be used with the Keybinds).") @ConfigEditorBoolean public boolean showNumbers = false; + + @Expose + @ConfigOption(name = "Keybinds", desc = "") + @Accordion + public HarpConfigKeyBinds harpKeybinds = new HarpConfigKeyBinds(); + + public static class HarpConfigKeyBinds { + @Expose + @ConfigOption(name = "Key 1", desc = "Key for the first Node") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_1) + public int key1 = Keyboard.KEY_1; + @Expose + @ConfigOption(name = "Key 2", desc = "Key for the second Node") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_2) + public int key2 = Keyboard.KEY_2; + @Expose + @ConfigOption(name = "Key 3", desc = "Key for the third Node") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_3) + public int key3 = Keyboard.KEY_3; + @Expose + @ConfigOption(name = "Key 4", desc = "Key for the fourth Node") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_4) + public int key4 = Keyboard.KEY_4; + @Expose + @ConfigOption(name = "Key 5", desc = "Key for the fifth Node") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_5) + public int key5 = Keyboard.KEY_5; + @Expose + @ConfigOption(name = "Key 6", desc = "Key for the sixth Node") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_6) + public int key6 = Keyboard.KEY_6; + @Expose + @ConfigOption(name = "Key 7", desc = "Key for the seventh Node") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_7) + public int key7 = Keyboard.KEY_7; + } } @Expose diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt index e793cd615..3c0a40870 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt @@ -12,23 +12,39 @@ import net.minecraft.client.gui.inventory.GuiChest import net.minecraft.item.Item import net.minecraftforge.client.event.GuiScreenEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -import org.lwjgl.input.Keyboard import kotlin.time.Duration.Companion.milliseconds // Delaying key presses by 300ms comes from NotEnoughUpdates -class HarpFeatures { - private val config get() = SkyHanniMod.feature.inventory.helper.harp +object HarpFeatures { + val config get() = SkyHanniMod.feature.inventory.helper.harp private var lastClick = SimpleTimeMark.farPast() - private val keys = listOf( - Keyboard.KEY_1, - Keyboard.KEY_2, - Keyboard.KEY_3, - Keyboard.KEY_4, - Keyboard.KEY_5, - Keyboard.KEY_6, - Keyboard.KEY_7 - ) + private object keys : + Iterable { + override fun iterator(): Iterator { + return object : Iterator { + private var currentIndex = 0 + + override fun hasNext(): Boolean { + return currentIndex < 7 + } + + override fun next(): Int { + return when (currentIndex++) { + 0 -> HarpFeatures.config.harpKeybinds.key1 + 1 -> HarpFeatures.config.harpKeybinds.key2 + 2 -> HarpFeatures.config.harpKeybinds.key3 + 3 -> HarpFeatures.config.harpKeybinds.key4 + 4 -> HarpFeatures.config.harpKeybinds.key5 + 5 -> HarpFeatures.config.harpKeybinds.key6 + 6 -> HarpFeatures.config.harpKeybinds.key7 + else -> throw NoSuchElementException() + } + } + } + } + + } private val buttonColors = listOf('d', 'e', 'a', '2', '5', '9', 'b') @@ -39,12 +55,12 @@ class HarpFeatures { if (!openInventoryName().startsWith("Harp")) return val chest = event.gui as? GuiChest ?: return - for (key in keys) { + for ((index, key) in keys.withIndex()) { if (key.isKeyHeld()) { if (lastClick.passedSince() > 200.milliseconds) { Minecraft.getMinecraft().playerController.windowClick( chest.inventorySlots.windowId, - 35 + key, + 37 + index, 2, 3, Minecraft.getMinecraft().thePlayer @@ -75,4 +91,4 @@ class HarpFeatures { event.move(2, "misc.harpKeybinds", "inventory.helper.harp.keybinds") event.move(2, "misc.harpNumbers", "inventory.helper.harp.showNumbers") } -} \ No newline at end of file +} -- cgit From 95e0487b3515c93acf3b28cbbda7b7d0bfd659c0 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 4 Nov 2023 00:02:11 +0100 Subject: 0.21 Beta 18 --- CHANGELOG.md | 10 ++++++++++ build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/CHANGELOG.md b/CHANGELOG.md index ccf1ba1ce..718921a2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,6 +75,8 @@ + Highlights Visitors outside the Garden. + Block Interacting with Visitors. - nea + Blocks you from interacting with / unlocking Visitors to allow for Dedication Cycling. ++ Added command /shpumpkin to toggle include/exclude Expired Pumpkin farming fortune in the /ff GUI and in the true ff display. - CalMWolfs ++ Added auto-detection of Expired Pumpkin farming fortune. - CalMWolfs #### Events @@ -138,6 +140,11 @@ + Makes the Compact Potion message open the Potion effects menu on click. - jani + Added option to show King Talisman Helper outside Dwarven Mines. - hannibal2 + In-Game Date: Adds support for reading the in-game scoreboard, and also allow sun/moon symbol customization. - Erymanthus ++ Added Estimated Item Value support to NEU Profile Viewer - hannibal2 ++ Added support to import SBE Visual Words into SkyHanni. - HiZe ++ Add custom keybinds for Harp Helper. - Thunderblade73 ++ Show the custom hotkey name in the Harp inventory. - hannibal2 ++ Added a GUI element to remind you while /shmouselock is enabled. - CalMWolfs ### Bug Fixes @@ -207,6 +214,8 @@ + Reset mouse sensitivity back to 100% if you log off with lock mouse look enabled. - hannibal2 + Fixed mouse sensitivity stuck after restarting by storing old sensitivity. - CalMWolfs + Fixed tool fortune. - CalMWolfs ++ Fixed Item Ability Cooldown display not activating for Sword of Bad Health. - hannibal2 ++ Fixed the crop name gets replaced to internal name in /shwords. - hannibal2 #### Config @@ -233,6 +242,7 @@ + Adding 100 lines to MobFinder.kt and making it better readable in the process. - walker + Making ChatFiler.kt way better, storing regex objects for reuse and preparing future repo support. - walker + Added command /shkingfix to reset the internal King Talisman Helper offset. - hannibal2 ++ Updated dependency version of junixsocket in DiscordIPC so that antivirus websites no longer show false positives. - NetheriteMiner ## Version 0.20 diff --git a/build.gradle.kts b/build.gradle.kts index cea2e04e1..cd2087210 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.21.Beta.17" +version = "0.21.Beta.18" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 544089711..9185f9c57 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -322,7 +322,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.21.Beta.17", + version = "0.21.Beta.18", ) class SkyHanniMod { @Mod.EventHandler -- cgit From dfa6c8e5304b36dc9de9c177934d6cbddbd9868d Mon Sep 17 00:00:00 2001 From: NetheriteMiner <88792142+NetheriteMiner@users.noreply.github.com> Date: Sun, 5 Nov 2023 04:46:45 -0500 Subject: Make Quest Item Helper only get amount needed and add Pablo Helper (#615) Added Pablo NPC Helper. #615 --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 ++ .../config/features/CrimsonIsleConfig.java | 6 ++++ .../skyhanni/features/nether/PabloHelper.kt | 39 ++++++++++++++++++++++ .../skyhanni/features/nether/QuestItemHelper.kt | 3 ++ 4 files changed, 50 insertions(+) create mode 100644 src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 9185f9c57..6765e67be 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -235,6 +235,7 @@ import at.hannibal2.skyhanni.features.misc.trevor.TrevorSolver import at.hannibal2.skyhanni.features.misc.trevor.TrevorTracker import at.hannibal2.skyhanni.features.misc.update.UpdateManager import at.hannibal2.skyhanni.features.misc.visualwords.ModifyVisualWords +import at.hannibal2.skyhanni.features.nether.PabloHelper import at.hannibal2.skyhanni.features.nether.QuestItemHelper import at.hannibal2.skyhanni.features.nether.ashfang.AshfangBlazes import at.hannibal2.skyhanni.features.nether.ashfang.AshfangBlazingSouls @@ -619,6 +620,7 @@ class SkyHanniMod { loadModule(ShiftClickEquipment()) loadModule(LockMouseLook) loadModule(DungeonFinderFeatures()) + loadModule(PabloHelper()) init() diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/CrimsonIsleConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/CrimsonIsleConfig.java index b9d00f8cd..7dc558b15 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/CrimsonIsleConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/CrimsonIsleConfig.java @@ -148,4 +148,10 @@ public class CrimsonIsleConfig { @ConfigEditorBoolean @FeatureToggle public boolean questItemHelper = false; + + @Expose + @ConfigOption(name = "Pablo NPC Helper", desc = "Similar to Quest Item Helper, shows a clickable message that grabs the flower needed from sacks.") + @ConfigEditorBoolean + @FeatureToggle + public boolean pabloHelper = false; } diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt new file mode 100644 index 000000000..f34931eb5 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt @@ -0,0 +1,39 @@ +package at.hannibal2.skyhanni.features.nether + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.data.IslandType +import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.utils.InventoryUtils +import at.hannibal2.skyhanni.utils.ItemUtils.name +import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.SimpleTimeMark +import at.hannibal2.skyhanni.utils.StringUtils.removeColor +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import kotlin.time.Duration.Companion.minutes + +// https://wiki.hypixel.net/Pablo +class PabloHelper { + + // There is a different message if the player asks Pablo with an item in their hand, but I don't think it's necessary + // I'll add it if requested + private val pabloMessagePattern = "\\[NPC] Pablo: Could you bring me an (?[\\w ]+).*".toPattern() + private var lastSentMessage = SimpleTimeMark.farPast() + + @SubscribeEvent + fun onChat(event: LorenzChatEvent) { + if (!isEnabled()) return + if (lastSentMessage.passedSince() < 5.minutes) return + val pabloMatcher = pabloMessagePattern.matcher(event.message.removeColor()) + + if (!pabloMatcher.matches()) return + val item = pabloMatcher.group("flower") + + if (InventoryUtils.countItemsInLowerInventory { it.name?.contains(item) == true } > 0) return + + LorenzUtils.clickableChat("§e[SkyHanni] Click here to grab an $item from sacks!", "gfs $item 1") + lastSentMessage = SimpleTimeMark.now() + } + + fun isEnabled() = + LorenzUtils.skyBlockIsland == IslandType.CRIMSON_ISLE && SkyHanniMod.feature.crimsonIsle.pabloHelper +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/QuestItemHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/QuestItemHelper.kt index 9c23ce8e3..24d47c317 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/QuestItemHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/QuestItemHelper.kt @@ -3,6 +3,8 @@ package at.hannibal2.skyhanni.features.nether import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent +import at.hannibal2.skyhanni.utils.InventoryUtils +import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.SimpleTimeMark @@ -29,6 +31,7 @@ class QuestItemHelper { if (!matches()) continue@items questItem = group("name") questAmount = group("amount").toInt() + questAmount -= InventoryUtils.countItemsInLowerInventory { it.name?.contains(questItem) == true } LorenzUtils.clickableChat( "§e[SkyHanni] Click here to grab x$questAmount $questItem from sacks!", "gfs $questItem $questAmount" -- cgit From adcd8ef05c81592716217a86544901783cb21f37 Mon Sep 17 00:00:00 2001 From: Kimbrian Marshall Date: Sun, 5 Nov 2023 17:16:25 +0700 Subject: Feature: Fish Bait Warning (#635) Added Fishing Bait Warnings. #635 --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 + .../skyhanni/config/features/FishingConfig.java | 19 +++++ .../skyhanni/features/fishing/BaitChangeWarning.kt | 89 ++++++++++++++++++++++ .../features/fishing/ShowFishingItemName.kt | 3 +- 4 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/features/fishing/BaitChangeWarning.kt (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 6765e67be..02d196cc3 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -105,6 +105,7 @@ import at.hannibal2.skyhanni.features.event.jerry.frozentreasure.FrozenTreasureT import at.hannibal2.skyhanni.features.event.spook.TheGreatSpook import at.hannibal2.skyhanni.features.fame.AccountUpgradeReminder import at.hannibal2.skyhanni.features.fame.CityProjectFeatures +import at.hannibal2.skyhanni.features.fishing.BaitChangeWarning import at.hannibal2.skyhanni.features.fishing.ChumBucketHider import at.hannibal2.skyhanni.features.fishing.FishingHookDisplay import at.hannibal2.skyhanni.features.fishing.FishingTimer @@ -621,6 +622,7 @@ class SkyHanniMod { loadModule(LockMouseLook) loadModule(DungeonFinderFeatures()) loadModule(PabloHelper()) + loadModule(BaitChangeWarning()); init() diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java index 6b47c6025..235b606f8 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java @@ -233,6 +233,25 @@ public class FishingConfig { public Position position = new Position(460, -240, 3.4f); } + @Expose + @ConfigOption(name = "Bait Warnings", desc = "") + @Accordion + public FishingBaitWarningsConfig fishingBaitWarning = new FishingBaitWarningsConfig(); + + public static class FishingBaitWarningsConfig { + @Expose + @ConfigOption(name = "Bait Change Warning", desc = "Show warning when fishing bait is changed") + @ConfigEditorBoolean + @FeatureToggle + public boolean baitChangeWarning = false; + + @Expose + @ConfigOption(name = "No Bait Warning", desc = "Show warning when no bait is used") + @ConfigEditorBoolean + @FeatureToggle + public boolean noBaitWarning = false; + } + @Expose @ConfigOption(name = "Rare Sea Creatures", desc = "") @Accordion diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/BaitChangeWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/BaitChangeWarning.kt new file mode 100644 index 000000000..3f0487639 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/BaitChangeWarning.kt @@ -0,0 +1,89 @@ +package at.hannibal2.skyhanni.features.fishing + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.utils.EntityUtils +import at.hannibal2.skyhanni.utils.ItemUtils.name +import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.SoundUtils +import at.hannibal2.skyhanni.utils.StringUtils.removeColor +import at.hannibal2.skyhanni.utils.getLorenzVec +import at.hannibal2.skyhanni.utils.toLorenzVec +import net.minecraft.client.Minecraft +import net.minecraft.entity.item.EntityItem +import net.minecraft.entity.projectile.EntityFishHook +import net.minecraftforge.event.entity.EntityJoinWorldEvent +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import kotlin.time.Duration.Companion.seconds + +class BaitChangeWarning { + private val config get() = SkyHanniMod.feature.fishing.fishingBaitWarning + private var bobber: EntityFishHook? = null + private var lastBait: String? = null + private var timeLastCast: Long = 0L + private var isUsingBait: Boolean = false + + @SubscribeEvent + fun onJoinWorld(event: EntityJoinWorldEvent){ + if(!isEnabled()) return + val entity = event.entity ?: return + if(entity !is EntityFishHook) return + if(entity.angler != Minecraft.getMinecraft().thePlayer) return + + bobber = entity; + timeLastCast = System.currentTimeMillis() + isUsingBait = false + } + + @SubscribeEvent + fun onTick(event: LorenzTickEvent){ + if(!isEnabled() || bobber == null) return + //Is there a way to get event sent time to be more accurate? + if(System.currentTimeMillis() - timeLastCast < 1000L) return + + if(!isUsingBait && config.noBaitWarning) showNoBaitWarning() + reset() + } + + fun reset(){ + bobber = null + isUsingBait = false + } + + @SubscribeEvent + fun onRenderWorld(event: LorenzRenderWorldEvent){ + if(!isEnabled() || !config.baitChangeWarning) return + if(bobber == null) return + for(entityItem in EntityUtils.getEntitiesNearby(bobber!!.getLorenzVec(), 1.5)){ + val itemStack = entityItem.entityItem + var name = itemStack.name ?: continue + name = name.removeColor() + + if((!name.endsWith(" Bait") && !name.startsWith("Obfuscated")) + || itemStack.stackSize != 1) continue + + isUsingBait = true + if(lastBait == null){ + lastBait = name.removeColor() + continue + } + if(name.removeColor() == lastBait) continue + showBaitChangeWarning(lastBait!!, name.removeColor()) + lastBait = name.removeColor() + } + } + + fun showBaitChangeWarning(before: String, after: String){ + SoundUtils.playClickSound() + LorenzUtils.sendTitle("§eBait changed!", 2.seconds) + LorenzUtils.chat("§e" + before + " -> " + after) + } + + fun showNoBaitWarning(){ + SoundUtils.playErrorSound() + LorenzUtils.sendTitle("§cNo bait is used!", 2.seconds) + } + + private fun isEnabled() = LorenzUtils.inSkyBlock && FishingAPI.hasFishingRodInHand() +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/ShowFishingItemName.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/ShowFishingItemName.kt index 179b6af20..99fcca5e4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/ShowFishingItemName.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/ShowFishingItemName.kt @@ -55,7 +55,8 @@ class ShowFishingItemName { if (name.removeColor() == "Stone") continue val size = itemStack.stackSize - val isBait = name.endsWith(" Bait") && size == 1 + val isBait = (name.removeColor().startsWith("Obfuscated") + || name.endsWith(" Bait")) && size == 1 val prefix = if (!isBait) { "§a§l+" } else { -- cgit From 9742360a3c1c9435692fb36febb565130e75e65e Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 5 Nov 2023 11:16:59 +0100 Subject: code cleanup and created ItemStack.isBait() --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 4 +- .../skyhanni/config/features/FishingConfig.java | 2 +- .../skyhanni/features/fishing/BaitChangeWarning.kt | 89 ---------------------- .../skyhanni/features/fishing/FishingAPI.kt | 8 ++ .../features/fishing/FishingBaitWarnings.kt | 85 +++++++++++++++++++++ .../features/fishing/ShowFishingItemName.kt | 5 +- 6 files changed, 98 insertions(+), 95 deletions(-) delete mode 100644 src/main/java/at/hannibal2/skyhanni/features/fishing/BaitChangeWarning.kt create mode 100644 src/main/java/at/hannibal2/skyhanni/features/fishing/FishingBaitWarnings.kt (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 02d196cc3..78828fe8e 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -105,8 +105,8 @@ import at.hannibal2.skyhanni.features.event.jerry.frozentreasure.FrozenTreasureT import at.hannibal2.skyhanni.features.event.spook.TheGreatSpook import at.hannibal2.skyhanni.features.fame.AccountUpgradeReminder import at.hannibal2.skyhanni.features.fame.CityProjectFeatures -import at.hannibal2.skyhanni.features.fishing.BaitChangeWarning import at.hannibal2.skyhanni.features.fishing.ChumBucketHider +import at.hannibal2.skyhanni.features.fishing.FishingBaitWarnings import at.hannibal2.skyhanni.features.fishing.FishingHookDisplay import at.hannibal2.skyhanni.features.fishing.FishingTimer import at.hannibal2.skyhanni.features.fishing.SeaCreatureFeatures @@ -622,7 +622,7 @@ class SkyHanniMod { loadModule(LockMouseLook) loadModule(DungeonFinderFeatures()) loadModule(PabloHelper()) - loadModule(BaitChangeWarning()); + loadModule(FishingBaitWarnings()); init() diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java index 235b606f8..11a21d083 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java @@ -236,7 +236,7 @@ public class FishingConfig { @Expose @ConfigOption(name = "Bait Warnings", desc = "") @Accordion - public FishingBaitWarningsConfig fishingBaitWarning = new FishingBaitWarningsConfig(); + public FishingBaitWarningsConfig fishingBaitWarnings = new FishingBaitWarningsConfig(); public static class FishingBaitWarningsConfig { @Expose diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/BaitChangeWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/BaitChangeWarning.kt deleted file mode 100644 index 3f0487639..000000000 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/BaitChangeWarning.kt +++ /dev/null @@ -1,89 +0,0 @@ -package at.hannibal2.skyhanni.features.fishing - -import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.utils.EntityUtils -import at.hannibal2.skyhanni.utils.ItemUtils.name -import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.SoundUtils -import at.hannibal2.skyhanni.utils.StringUtils.removeColor -import at.hannibal2.skyhanni.utils.getLorenzVec -import at.hannibal2.skyhanni.utils.toLorenzVec -import net.minecraft.client.Minecraft -import net.minecraft.entity.item.EntityItem -import net.minecraft.entity.projectile.EntityFishHook -import net.minecraftforge.event.entity.EntityJoinWorldEvent -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -import kotlin.time.Duration.Companion.seconds - -class BaitChangeWarning { - private val config get() = SkyHanniMod.feature.fishing.fishingBaitWarning - private var bobber: EntityFishHook? = null - private var lastBait: String? = null - private var timeLastCast: Long = 0L - private var isUsingBait: Boolean = false - - @SubscribeEvent - fun onJoinWorld(event: EntityJoinWorldEvent){ - if(!isEnabled()) return - val entity = event.entity ?: return - if(entity !is EntityFishHook) return - if(entity.angler != Minecraft.getMinecraft().thePlayer) return - - bobber = entity; - timeLastCast = System.currentTimeMillis() - isUsingBait = false - } - - @SubscribeEvent - fun onTick(event: LorenzTickEvent){ - if(!isEnabled() || bobber == null) return - //Is there a way to get event sent time to be more accurate? - if(System.currentTimeMillis() - timeLastCast < 1000L) return - - if(!isUsingBait && config.noBaitWarning) showNoBaitWarning() - reset() - } - - fun reset(){ - bobber = null - isUsingBait = false - } - - @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent){ - if(!isEnabled() || !config.baitChangeWarning) return - if(bobber == null) return - for(entityItem in EntityUtils.getEntitiesNearby(bobber!!.getLorenzVec(), 1.5)){ - val itemStack = entityItem.entityItem - var name = itemStack.name ?: continue - name = name.removeColor() - - if((!name.endsWith(" Bait") && !name.startsWith("Obfuscated")) - || itemStack.stackSize != 1) continue - - isUsingBait = true - if(lastBait == null){ - lastBait = name.removeColor() - continue - } - if(name.removeColor() == lastBait) continue - showBaitChangeWarning(lastBait!!, name.removeColor()) - lastBait = name.removeColor() - } - } - - fun showBaitChangeWarning(before: String, after: String){ - SoundUtils.playClickSound() - LorenzUtils.sendTitle("§eBait changed!", 2.seconds) - LorenzUtils.chat("§e" + before + " -> " + after) - } - - fun showNoBaitWarning(){ - SoundUtils.playErrorSound() - LorenzUtils.sendTitle("§cNo bait is used!", 2.seconds) - } - - private fun isEnabled() = LorenzUtils.inSkyBlock && FishingAPI.hasFishingRodInHand() -} diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt index bfe3cb5bb..ccadaec94 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt @@ -1,7 +1,15 @@ package at.hannibal2.skyhanni.features.fishing import at.hannibal2.skyhanni.utils.InventoryUtils +import at.hannibal2.skyhanni.utils.ItemUtils.name +import at.hannibal2.skyhanni.utils.StringUtils.removeColor +import net.minecraft.item.ItemStack object FishingAPI { fun hasFishingRodInHand() = InventoryUtils.itemInHandId.asString().contains("ROD") + + fun ItemStack.isBait(): Boolean { + val name = name ?: return false + return stackSize == 1 && (name.removeColor().startsWith("Obfuscated") || name.endsWith(" Bait")) + } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingBaitWarnings.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingBaitWarnings.kt new file mode 100644 index 000000000..3be74ea8a --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingBaitWarnings.kt @@ -0,0 +1,85 @@ +package at.hannibal2.skyhanni.features.fishing + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.features.fishing.FishingAPI.isBait +import at.hannibal2.skyhanni.utils.EntityUtils +import at.hannibal2.skyhanni.utils.ItemUtils.name +import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.SimpleTimeMark +import at.hannibal2.skyhanni.utils.SoundUtils +import at.hannibal2.skyhanni.utils.StringUtils.removeColor +import at.hannibal2.skyhanni.utils.getLorenzVec +import net.minecraft.client.Minecraft +import net.minecraft.entity.item.EntityItem +import net.minecraft.entity.projectile.EntityFishHook +import net.minecraftforge.event.entity.EntityJoinWorldEvent +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import kotlin.time.Duration.Companion.seconds + +class FishingBaitWarnings { + private val config get() = SkyHanniMod.feature.fishing.fishingBaitWarnings + private var bobber: EntityFishHook? = null + private var lastBait: String? = null + private var timeLastCast = SimpleTimeMark.farPast() + private var isUsingBait: Boolean = false + + @SubscribeEvent + fun onJoinWorld(event: EntityJoinWorldEvent) { + if (!isEnabled()) return + val entity = event.entity ?: return + if (entity !is EntityFishHook) return + if (entity.angler != Minecraft.getMinecraft().thePlayer) return + + bobber = entity + timeLastCast = SimpleTimeMark.now() + isUsingBait = false + } + + @SubscribeEvent + fun onTick(event: LorenzTickEvent) { + if (!isEnabled() || bobber == null) return + //Is there a way to get event sent time to be more accurate? + if (timeLastCast.passedSince() < 1.seconds) return + + if (!isUsingBait && config.noBaitWarning) showNoBaitWarning() + reset() + } + + fun reset() { + bobber = null + isUsingBait = false + } + + @SubscribeEvent + fun onRenderWorld(event: LorenzRenderWorldEvent) { + if (!isEnabled() || !config.baitChangeWarning) return + val bobber = bobber ?: return + for (entityItem in EntityUtils.getEntitiesNearby(bobber.getLorenzVec(), 1.5)) { + val itemStack = entityItem.entityItem + if (!itemStack.isBait()) continue + val name = itemStack.name?.removeColor() ?: continue + + isUsingBait = true + lastBait?.let { + if (name == it) continue + showBaitChangeWarning(it, name) + } + lastBait = name + } + } + + private fun showBaitChangeWarning(before: String, after: String) { + SoundUtils.playClickSound() + LorenzUtils.sendTitle("§eBait changed!", 2.seconds) + LorenzUtils.chat("§e[SkyHanni] Fishing Bait change detected: $before -> $after") + } + + private fun showNoBaitWarning() { + SoundUtils.playErrorSound() + LorenzUtils.sendTitle("§cNo bait is used!", 2.seconds) + } + + private fun isEnabled() = LorenzUtils.inSkyBlock && FishingAPI.hasFishingRodInHand() +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/ShowFishingItemName.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/ShowFishingItemName.kt index 99fcca5e4..a64d3da77 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/ShowFishingItemName.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/ShowFishingItemName.kt @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.fishing import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.features.fishing.FishingAPI.isBait import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.name @@ -55,9 +56,7 @@ class ShowFishingItemName { if (name.removeColor() == "Stone") continue val size = itemStack.stackSize - val isBait = (name.removeColor().startsWith("Obfuscated") - || name.endsWith(" Bait")) && size == 1 - val prefix = if (!isBait) { + val prefix = if (!itemStack.isBait()) { "§a§l+" } else { if (!config.showBaits) continue -- cgit From 14e72eb0fe2c542b014c9dcd70711ce18150445a Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 5 Nov 2023 12:32:30 +0100 Subject: creating FishingBobberCastEvent and removing code duplication --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 4 +++- .../skyhanni/events/FishingBobberCastEvent.kt | 5 +++++ .../skyhanni/features/fishing/FishingAPI.kt | 21 +++++++++++++++++++ .../features/fishing/FishingBaitWarnings.kt | 19 +++++------------ .../features/fishing/FishingHookDisplay.kt | 24 +++++++--------------- 5 files changed, 41 insertions(+), 32 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/events/FishingBobberCastEvent.kt (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 78828fe8e..fb75e37b5 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -106,6 +106,7 @@ import at.hannibal2.skyhanni.features.event.spook.TheGreatSpook import at.hannibal2.skyhanni.features.fame.AccountUpgradeReminder import at.hannibal2.skyhanni.features.fame.CityProjectFeatures import at.hannibal2.skyhanni.features.fishing.ChumBucketHider +import at.hannibal2.skyhanni.features.fishing.FishingAPI import at.hannibal2.skyhanni.features.fishing.FishingBaitWarnings import at.hannibal2.skyhanni.features.fishing.FishingHookDisplay import at.hannibal2.skyhanni.features.fishing.FishingTimer @@ -388,6 +389,7 @@ class SkyHanniMod { loadModule(RiftAPI) loadModule(SackAPI) loadModule(BingoAPI) + loadModule(FishingAPI) // features loadModule(BazaarOrderHelper()) @@ -622,7 +624,7 @@ class SkyHanniMod { loadModule(LockMouseLook) loadModule(DungeonFinderFeatures()) loadModule(PabloHelper()) - loadModule(FishingBaitWarnings()); + loadModule(FishingBaitWarnings()) init() diff --git a/src/main/java/at/hannibal2/skyhanni/events/FishingBobberCastEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/FishingBobberCastEvent.kt new file mode 100644 index 000000000..01ea0222e --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/events/FishingBobberCastEvent.kt @@ -0,0 +1,5 @@ +package at.hannibal2.skyhanni.events + +import net.minecraft.entity.projectile.EntityFishHook + +class FishingBobberCastEvent(val bobber: EntityFishHook) : LorenzEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt index 70bd0ea9b..550388893 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt @@ -1,16 +1,36 @@ package at.hannibal2.skyhanni.features.fishing +import at.hannibal2.skyhanni.events.FishingBobberCastEvent import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.name +import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.StringUtils.removeColor +import net.minecraft.client.Minecraft +import net.minecraft.entity.projectile.EntityFishHook import net.minecraft.init.Blocks import net.minecraft.item.ItemStack +import net.minecraftforge.event.entity.EntityJoinWorldEvent +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object FishingAPI { private val lavaBlocks = listOf(Blocks.lava, Blocks.flowing_lava) private val waterBlocks = listOf(Blocks.water, Blocks.flowing_water) + var lastCastTime = SimpleTimeMark.farPast() + + @SubscribeEvent + fun onJoinWorld(event: EntityJoinWorldEvent) { + if (!LorenzUtils.inSkyBlock || !hasFishingRodInHand()) return + val entity = event.entity ?: return + if (entity !is EntityFishHook) return + if (entity.angler != Minecraft.getMinecraft().thePlayer) return + + lastCastTime = SimpleTimeMark.now() + FishingBobberCastEvent(entity).postAndCatch() + } + fun hasFishingRodInHand() = InventoryUtils.itemInHandId.asString().contains("ROD") fun ItemStack.isBait(): Boolean { @@ -21,4 +41,5 @@ object FishingAPI { fun isLavaRod() = InventoryUtils.getItemInHand()?.getLore()?.any { it.contains("Lava Rod") } ?: false fun getAllowedBlocks() = if (isLavaRod()) lavaBlocks else waterBlocks + } diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingBaitWarnings.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingBaitWarnings.kt index 03e3e393b..8caf8cb20 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingBaitWarnings.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingBaitWarnings.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.fishing import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.FishingBobberCastEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.features.fishing.FishingAPI.isBait @@ -8,15 +9,12 @@ import at.hannibal2.skyhanni.utils.BlockUtils.getBlockAt import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.SoundUtils import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.getLorenzVec -import net.minecraft.client.Minecraft import net.minecraft.entity.item.EntityItem import net.minecraft.entity.projectile.EntityFishHook import net.minecraft.item.ItemStack -import net.minecraftforge.event.entity.EntityJoinWorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.seconds @@ -24,18 +22,11 @@ class FishingBaitWarnings { private val config get() = SkyHanniMod.feature.fishing.fishingBaitWarnings private var bobber: EntityFishHook? = null private var lastBait: String? = null - private var timeLastCast = SimpleTimeMark.farPast() private var isUsingBait: Boolean = false @SubscribeEvent - fun onJoinWorld(event: EntityJoinWorldEvent) { - if (!isEnabled()) return - val entity = event.entity ?: return - if (entity !is EntityFishHook) return - if (entity.angler != Minecraft.getMinecraft().thePlayer) return - - bobber = entity - timeLastCast = SimpleTimeMark.now() + fun onBobberThrow(event: FishingBobberCastEvent) { + bobber = event.bobber isUsingBait = false } @@ -48,10 +39,10 @@ class FishingBaitWarnings { return } if (!event.isMod(5)) return - if (timeLastCast.passedSince() < 1.seconds) return + if (FishingAPI.lastCastTime.passedSince() < 1.seconds) return val block = bobber.getLorenzVec().getBlockAt() - if (block in FishingAPI.getAllowedBlocks()) return + if (block !in FishingAPI.getAllowedBlocks()) return if (!isUsingBait && config.noBaitWarning) showNoBaitWarning() reset() diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt index c05ffcc80..be076222f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt @@ -2,30 +2,30 @@ package at.hannibal2.skyhanni.features.fishing import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.CheckRenderEntityEvent +import at.hannibal2.skyhanni.events.FishingBobberCastEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent -import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RenderUtils.renderString -import net.minecraft.client.entity.EntityPlayerSP import net.minecraft.entity.item.EntityArmorStand -import net.minecraft.entity.projectile.EntityFishHook import net.minecraftforge.event.entity.EntityJoinWorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class FishingHookDisplay { private val config get() = SkyHanniMod.feature.fishing.fishingHookDisplay - private var bobber: EntityFishHook? = null private var armorStand: EntityArmorStand? = null private val potentionArmorStands = mutableListOf() private val pattern = "§e§l(\\d+(\\.\\d+)?)".toPattern() @SubscribeEvent fun onWorldChange(event: LorenzWorldChangeEvent) { - bobber = null - armorStand = null - potentionArmorStands.clear() + reset() + } + + @SubscribeEvent + fun onBobberThrow(event: FishingBobberCastEvent) { + reset() } @SubscribeEvent @@ -38,16 +38,6 @@ class FishingHookDisplay { armorStand = filter[0] } } - - if (event.isMod(5)) { - val entities = EntityUtils.getEntities() - val foundBobber = entities.firstOrNull { it.angler is EntityPlayerSP } - if (foundBobber != bobber) { - bobber = foundBobber - reset() - } - } - } private fun reset() { -- cgit From 01a61929fffbad63c91f821244e9580b192129cf Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 5 Nov 2023 23:00:08 +0100 Subject: 0.21 Beta 19 --- CHANGELOG.md | 31 +++++++++++++++++++--- FEATURES.md | 6 +++++ build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 4 files changed, 36 insertions(+), 5 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/CHANGELOG.md b/CHANGELOG.md index 718921a2e..9ff1ca07c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,8 +75,14 @@ + Highlights Visitors outside the Garden. + Block Interacting with Visitors. - nea + Blocks you from interacting with / unlocking Visitors to allow for Dedication Cycling. -+ Added command /shpumpkin to toggle include/exclude Expired Pumpkin farming fortune in the /ff GUI and in the true ff display. - CalMWolfs ++ Added command **/shpumpkin** to toggle include/exclude Expired Pumpkin farming fortune in the /ff GUI and in the true ff + display. - CalMWolfs + Added auto-detection of Expired Pumpkin farming fortune. - CalMWolfs ++ Added Crimson Isle **Pablo NPC Helper**. - NetheriteMiner + + Similar to Quest Item Helper, shows a clickable message that grabs the flower needed from sacks. ++ Added **Fishing Bait Warnings.** - cimbraien + + Option to warn when no bait is used. + + Option to warn when used bait is changed. #### Events @@ -139,12 +145,15 @@ + Show key to press below burrow warp. - hannibal2 + Makes the Compact Potion message open the Potion effects menu on click. - jani + Added option to show King Talisman Helper outside Dwarven Mines. - hannibal2 -+ In-Game Date: Adds support for reading the in-game scoreboard, and also allow sun/moon symbol customization. - Erymanthus ++ In-Game Date: Adds support for reading the in-game scoreboard, and also allow sun/moon symbol customization. - + Erymanthus + Added Estimated Item Value support to NEU Profile Viewer - hannibal2 + Added support to import SBE Visual Words into SkyHanni. - HiZe + Add custom keybinds for Harp Helper. - Thunderblade73 + Show the custom hotkey name in the Harp inventory. - hannibal2 + Added a GUI element to remind you while /shmouselock is enabled. - CalMWolfs ++ Make Crimson Isle Quest Item Helper only get amount needed. - NetheriteMiner ++ Change config order to alphabetical. - walker ### Bug Fixes @@ -216,6 +225,13 @@ + Fixed tool fortune. - CalMWolfs + Fixed Item Ability Cooldown display not activating for Sword of Bad Health. - hannibal2 + Fixed the crop name gets replaced to internal name in /shwords. - hannibal2 ++ Show obfuscated fish as bait instead of caught item. - cimbraien ++ Fixed Estimated Item Value that renders twice inside NEU PV, by not rendering anything when the cursor is exactly in + between two items. - hannibal2 ++ fixed more error messages with The Great Spook data getting stored in the Reputation Helper quest config + accidentally. - hannibal2 ++ Hopefully fixed resets of Visitor Drops stats. - hannibal2 ++ Fixed typo in The Art Of Peace. - walker #### Config @@ -242,7 +258,16 @@ + Adding 100 lines to MobFinder.kt and making it better readable in the process. - walker + Making ChatFiler.kt way better, storing regex objects for reuse and preparing future repo support. - walker + Added command /shkingfix to reset the internal King Talisman Helper offset. - hannibal2 -+ Updated dependency version of junixsocket in DiscordIPC so that antivirus websites no longer show false positives. - NetheriteMiner ++ Updated dependency version of junixsocket in DiscordIPC so that antivirus websites no longer show false positives. - + NetheriteMiner ++ Changed wrong/missing neu version message to show NEU version 2.1.1-Pre-4 instead of beta versions. - CalMWolfs ++ Deleting the old "hidden" part of the config. - hannibal2 ++ This will reset parts of the config for users with 7-month-old SkyHanni versions that want to migrate into the + present. ++ Added a workaround for the NEU Profile Viewer bug where the ItemTooltipEvent gets called for two items when hovering + over the border between two items. - hannibal2 ++ Using visitorDrops.visitorRarities directly from the config instead of accessing the local field. Hopefully this will + prevent partial config resets in the future. - hannibal2 ## Version 0.20 diff --git a/FEATURES.md b/FEATURES.md index 527f7ed7a..2d2c53201 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -224,6 +224,10 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Display the Hypixel timer until the fishing hook can be pulled out of the water/lava, only bigger and on your screen. + Alerts when the player catches a Legendary Sea Creature. - Cad ++ **Fishing Bait Warnings.** - cimbraien + + Option to warn when no bait is used. + + Option to warn when used bait is changed. +
@@ -630,6 +634,8 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Quest Item Helper. (Crimson Isle) - NetheriteMiner + When you open the fetch item quest in the town board, it shows a clickable chat message that will grab the items needed from the sacks. ++ Crimson Isle **Pablo NPC Helper**. - NetheriteMiner + + Similar to Quest Item Helper, shows a clickable message that grabs the flower needed from sacks. + Red Scoreboard Numbers - Hides the red numbers in the scoreboard sidebar on the right side of the screen. + **Tia Relay Waypoint** - Show the next Relay waypoint for Tia The Fairy, where maintenance for the abiphone network needs to be done. diff --git a/build.gradle.kts b/build.gradle.kts index cd2087210..004e1338b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.21.Beta.18" +version = "0.21.Beta.19" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index fb75e37b5..defde6616 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -325,7 +325,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.21.Beta.18", + version = "0.21.Beta.19", ) class SkyHanniMod { @Mod.EventHandler -- cgit From 4954f93cd878d269582ebe6ccc5486a3f8a5918b Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Tue, 7 Nov 2023 01:46:18 +0100 Subject: tracker core (#697) Tracker API #697 --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 6 +- .../skyhanni/config/ConfigUpdaterMigrator.kt | 41 ++++- .../java/at/hannibal2/skyhanni/config/Storage.java | 31 +++- .../hannibal2/skyhanni/config/commands/Commands.kt | 6 +- .../features/garden/farming/DicerDropTracker.kt | 175 +++++++++++++++++++++ .../features/garden/farming/DicerRngDropCounter.kt | 150 ------------------ .../features/mining/powdertracker/PowderTracker.kt | 72 ++++----- .../features/slayer/SlayerItemProfitTracker.kt | 100 +++--------- .../skyhanni/utils/tracker/DisplayMode.kt | 7 + .../skyhanni/utils/tracker/SharedTracker.kt | 18 +++ .../skyhanni/utils/tracker/TrackerData.kt | 5 + .../skyhanni/utils/tracker/TrackerUtils.kt | 62 ++++++++ 12 files changed, 394 insertions(+), 279 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerDropTracker.kt delete mode 100644 src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropCounter.kt create mode 100644 src/main/java/at/hannibal2/skyhanni/utils/tracker/DisplayMode.kt create mode 100644 src/main/java/at/hannibal2/skyhanni/utils/tracker/SharedTracker.kt create mode 100644 src/main/java/at/hannibal2/skyhanni/utils/tracker/TrackerData.kt create mode 100644 src/main/java/at/hannibal2/skyhanni/utils/tracker/TrackerUtils.kt (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index defde6616..93342d26f 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -141,7 +141,7 @@ import at.hannibal2.skyhanni.features.garden.contest.JacobContestTimeNeeded import at.hannibal2.skyhanni.features.garden.contest.JacobFarmingContestsInventory import at.hannibal2.skyhanni.features.garden.farming.CropMoneyDisplay import at.hannibal2.skyhanni.features.garden.farming.CropSpeedMeter -import at.hannibal2.skyhanni.features.garden.farming.DicerRngDropCounter +import at.hannibal2.skyhanni.features.garden.farming.DicerDropTracker import at.hannibal2.skyhanni.features.garden.farming.FarmingArmorDrops import at.hannibal2.skyhanni.features.garden.farming.FarmingWeightDisplay import at.hannibal2.skyhanni.features.garden.farming.GardenBurrowingSporesNotifier @@ -500,7 +500,7 @@ class SkyHanniMod { loadModule(GardenDeskInSBMenu()) loadModule(GardenLevelDisplay()) loadModule(FarmingWeightDisplay()) - loadModule(DicerRngDropCounter()) + loadModule(DicerDropTracker) loadModule(CropMoneyDisplay) loadModule(JacobFarmingContestsInventory()) loadModule(GardenNextJacobContest) @@ -605,7 +605,7 @@ class SkyHanniMod { loadModule(GardenPlotBorders()) loadModule(CosmeticFollowingLine()) loadModule(SuperpairsClicksAlert()) - loadModule(PowderTracker()) + loadModule(PowderTracker) loadModule(ModifyVisualWords) loadModule(TabListReader) loadModule(TabListRenderer) diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt index 69a77d6df..a290b9bf9 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt @@ -9,7 +9,7 @@ import com.google.gson.JsonPrimitive object ConfigUpdaterMigrator { val logger = LorenzLogger("ConfigMigration") - val configVersion = 6 + val configVersion = 7 fun JsonElement.at(chain: List, init: Boolean): JsonElement? { if (chain.isEmpty()) return this if (this !is JsonObject) return null @@ -26,7 +26,14 @@ object ConfigUpdaterMigrator { val new: JsonObject, val oldVersion: Int, var movesPerformed: Int, + val dynamicPrefix: Map>, ) : LorenzEvent() { + init { + dynamicPrefix.entries.filter { it.value.isEmpty() }.forEach { + logger.log("Dynamic prefix ${it.key} does not resolve to anything.") + } + } + fun move(since: Int, oldPath: String, newPath: String, transform: (JsonElement) -> JsonElement = { it }) { if (since <= oldVersion) { logger.log("Skipping move from $oldPath to $newPath ($since <= $oldVersion)") @@ -41,6 +48,22 @@ object ConfigUpdaterMigrator { } val op = oldPath.split(".") val np = newPath.split(".") + if (op.first().startsWith("#")) { + require(np.first() == op.first()) + val realPrefixes = dynamicPrefix[op.first()] + if (realPrefixes == null) { + logger.log("Could not resolve dynamic prefix $oldPath") + return + } + for (realPrefix in realPrefixes) { + move( + since, + "$realPrefix.${oldPath.substringAfter('.')}", + "$realPrefix.${newPath.substringAfter('.')}", transform + ) + return + } + } val oldElem = old.at(op, false) if (oldElem == null) { logger.log("Skipping move from $oldPath to $newPath ($oldPath not present)") @@ -83,9 +106,23 @@ object ConfigUpdaterMigrator { if (lV == configVersion) return config return (lV until configVersion).fold(config) { acc, i -> logger.log("Starting config transformation from $i to ${i + 1}") + val storage = acc.get("storage")?.asJsonObject + val dynamicPrefix: Map> = mapOf( + "#profile" to + (storage?.get("players")?.asJsonObject?.entrySet() + ?.flatMap { player -> + player.value.asJsonObject.get("profiles")?.asJsonObject?.entrySet()?.map { + "storage.players.${player.key}.profiles.${it.key}" + } ?: listOf() + } + ?: listOf()), + "#player" to + (storage?.get("players")?.asJsonObject?.entrySet()?.map { "storage.players.${it.key}" } + ?: listOf()), + ) val migration = ConfigFixEvent(acc, JsonObject().also { it.add("lastVersion", JsonPrimitive(i + 1)) - }, i, 0).also { it.postAndCatch() } + }, i, 0, dynamicPrefix).also { it.postAndCatch() } logger.log("Transformations scheduled: ${migration.new}") val mergesPerformed = merge(migration.old, migration.new) logger.log("Migration done with $mergesPerformed merges and ${migration.movesPerformed} moves performed") diff --git a/src/main/java/at/hannibal2/skyhanni/config/Storage.java b/src/main/java/at/hannibal2/skyhanni/config/Storage.java index ad17625fd..5c4ef3c63 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Storage.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Storage.java @@ -17,6 +17,7 @@ import at.hannibal2.skyhanni.features.misc.visualwords.VisualWord; import at.hannibal2.skyhanni.features.rift.area.westvillage.KloonTerminal; import at.hannibal2.skyhanni.utils.LorenzVec; import at.hannibal2.skyhanni.utils.NEUInternalName; +import at.hannibal2.skyhanni.utils.tracker.TrackerData; import com.google.gson.annotations.Expose; import net.minecraft.item.ItemStack; @@ -143,7 +144,18 @@ public class Storage { public CropAccessory savedCropAccessory = null; @Expose - public Map dicerRngDrops = new HashMap<>(); + public DicerDropTracker dicerDropTracker = new DicerDropTracker(); + + public static class DicerDropTracker extends TrackerData { + + public void reset() { + drops.clear(); + } + + @Expose + public Map> drops = new HashMap<>(); + + } @Expose public long informedAboutLowMatter = 0; @@ -304,7 +316,13 @@ public class Storage { @Expose public Map powderTracker = new HashMap<>(); - public static class PowderTracker { + public static class PowderTracker extends TrackerData { + + public void reset() { + rewards.clear(); + totalChestPicked = 0; + } + @Expose public int totalChestPicked = 0; @@ -353,7 +371,14 @@ public class Storage { @Expose public Map slayerProfitData = new HashMap<>(); - public static class SlayerProfitList { + public static class SlayerProfitList extends TrackerData { + + public void reset() { + items.clear(); + mobKillCoins = 0; + slayerSpawnCost = 0; + slayerCompletedCount = 0; + } @Expose public Map items = new HashMap<>(); diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index cadd9fedc..c612a9742 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -20,11 +20,13 @@ import at.hannibal2.skyhanni.features.garden.GardenNextJacobContest import at.hannibal2.skyhanni.features.garden.composter.ComposterOverlay import at.hannibal2.skyhanni.features.garden.farming.CropMoneyDisplay import at.hannibal2.skyhanni.features.garden.farming.CropSpeedMeter +import at.hannibal2.skyhanni.features.garden.farming.DicerDropTracker import at.hannibal2.skyhanni.features.garden.farming.FarmingWeightDisplay import at.hannibal2.skyhanni.features.garden.farming.GardenStartLocation import at.hannibal2.skyhanni.features.garden.fortuneguide.CaptureFarmingGear import at.hannibal2.skyhanni.features.garden.fortuneguide.FFGuideGUI import at.hannibal2.skyhanni.features.mining.KingTalismanHelper +import at.hannibal2.skyhanni.features.mining.powdertracker.PowderTracker import at.hannibal2.skyhanni.features.minion.MinionFeatures import at.hannibal2.skyhanni.features.misc.CollectionTracker import at.hannibal2.skyhanni.features.misc.LockMouseLook @@ -158,7 +160,9 @@ object Commands { "shclearfarmingitems", "Clear farming items saved for the Farming Fortune Guide" ) { clearFarmingItems() } - registerCommand("shresetghostcounter", "Resets the ghost counter stats") { GhostUtil.reset() } + registerCommand("shresetghostcounter", "Resets the ghost counter") { GhostUtil.reset() } + registerCommand("shresetpowdertracker", "Resets the powder tracker") { PowderTracker.resetCommand(it) } + registerCommand("shresetdicertracker", "Resets the dicer counter") { DicerDropTracker.resetCommand(it) } registerCommand("shbingotoggle", "Toggle the bingo card display mode") { BingoCardDisplay.toggleCommand() } registerCommand( "shfarmingprofile", diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerDropTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerDropTracker.kt new file mode 100644 index 000000000..a3b4f73cb --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerDropTracker.kt @@ -0,0 +1,175 @@ +package at.hannibal2.skyhanni.features.garden.farming + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigManager +import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator +import at.hannibal2.skyhanni.config.Storage.ProfileSpecific.GardenStorage.DicerDropTracker +import at.hannibal2.skyhanni.data.ProfileStorageData +import at.hannibal2.skyhanni.events.GardenToolChangeEvent +import at.hannibal2.skyhanni.events.GuiRenderEvent +import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.PreProfileSwitchEvent +import at.hannibal2.skyhanni.features.garden.CropType +import at.hannibal2.skyhanni.features.garden.GardenAPI +import at.hannibal2.skyhanni.utils.ItemUtils.name +import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList +import at.hannibal2.skyhanni.utils.LorenzUtils.addOrPut +import at.hannibal2.skyhanni.utils.LorenzUtils.sortedDesc +import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators +import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems +import at.hannibal2.skyhanni.utils.tracker.DisplayMode +import at.hannibal2.skyhanni.utils.tracker.SharedTracker +import at.hannibal2.skyhanni.utils.tracker.TrackerUtils +import at.hannibal2.skyhanni.utils.tracker.TrackerUtils.addDisplayModeToggle +import at.hannibal2.skyhanni.utils.tracker.TrackerUtils.addSessionResetButton +import net.minecraft.client.Minecraft +import net.minecraft.client.gui.inventory.GuiInventory +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +object DicerDropTracker { + private var display = emptyList>() + private val itemDrops = mutableListOf() + private val config get() = SkyHanniMod.feature.garden.dicerCounters + private val currentSessionData = DicerDropTracker() + private var inventoryOpen = false + + init { + itemDrops.add(ItemDrop(CropType.MELON, DropRarity.UNCOMMON, "§a§lUNCOMMON DROP! §r§eDicer dropped §r§a(\\d+)x §r§aEnchanted Melon§r§e!".toRegex())) + itemDrops.add(ItemDrop(CropType.MELON, DropRarity.RARE, "§9§lRARE DROP! §r§eDicer dropped §r§a(\\d+)x §r§aEnchanted Melon§r§e!".toRegex())) + itemDrops.add(ItemDrop(CropType.MELON, DropRarity.CRAZY_RARE, "§d§lCRAZY RARE DROP! §r§eDicer dropped §r§[a|9](\\d+)x §r§[a|9]Enchanted Melon(?: Block)?§r§e!".toRegex())) + itemDrops.add(ItemDrop(CropType.MELON, DropRarity.PRAY_TO_RNGESUS, "§5§lPRAY TO RNGESUS DROP! §r§eDicer dropped §r§9(\\d+)x §r§9Enchanted Melon Block§r§e!".toRegex())) + + itemDrops.add(ItemDrop(CropType.PUMPKIN, DropRarity.UNCOMMON, "§a§lUNCOMMON DROP! §r§eDicer dropped §r§a(\\d+)x §r§aEnchanted Pumpkin§r§e!".toRegex())) + itemDrops.add(ItemDrop(CropType.PUMPKIN, DropRarity.RARE, "§9§lRARE DROP! §r§eDicer dropped §r§a(\\d+)x §r§aEnchanted Pumpkin§r§e!".toRegex())) + itemDrops.add(ItemDrop(CropType.PUMPKIN, DropRarity.CRAZY_RARE, "§d§lCRAZY RARE DROP! §r§eDicer dropped §r§a(\\d+)x §r§aEnchanted Pumpkin§r§e!".toRegex())) + itemDrops.add(ItemDrop(CropType.PUMPKIN, DropRarity.PRAY_TO_RNGESUS, "§5§lPRAY TO RNGESUS DROP! §r§eDicer dropped §r§[a|9](\\d+)x §r§(aEnchanted|9Polished) Pumpkin§r§e!".toRegex())) + } + + enum class DropRarity(val displayName: String) { + UNCOMMON("§a§lUNCOMMON DROP"), + RARE("§9§lRARE DROP"), + CRAZY_RARE("§d§lCRAZY RARE DROP"), + PRAY_TO_RNGESUS("§5§lPRAY TO RNGESUS DROP"), + } + + @SubscribeEvent + fun onPreProfileSwitch(event: PreProfileSwitchEvent) { + display = emptyList() + } + + @SubscribeEvent + fun onChat(event: LorenzChatEvent) { + if (!GardenAPI.inGarden()) return + if (!config.hideChat && !config.display) return + + val message = event.message + for (drop in itemDrops) { + if (drop.pattern.matches(message)) { + addDrop(drop.crop, drop.rarity) + if (config.hideChat) { + event.blockedReason = "dicer_drop_tracker" + } + return + } + } + } + + private fun update() { + currentDisplay()?.let { + display = drawDisplay(it) + } + } + + private fun drawDisplay(storage: DicerDropTracker) = buildList> { + val cropInHand = cropInHand ?: return@buildList + val items = storage.drops.getOrPut(cropInHand) { mutableMapOf() } + addAsSingletonList("§7Dicer Drop Tracker for $toolName§7:") + if (inventoryOpen) { + addDisplayModeToggle { + update() + } + } + for ((rarity, amount) in items.sortedDesc()) { + val displayName = rarity.displayName + addAsSingletonList(" §7- §e${amount.addSeparators()}x $displayName") + } + + if (inventoryOpen && TrackerUtils.currentDisplayMode == DisplayMode.CURRENT) { + addSessionResetButton("Dicer Drop Tracker", getSharedTracker()) { + update() + } + } + } + + private var cropInHand: CropType? = null + private var toolName = "" + + @SubscribeEvent + fun onGardenToolChange(event: GardenToolChangeEvent) { + val crop = event.crop + cropInHand = if (crop == CropType.MELON || crop == CropType.PUMPKIN) crop else null + if (cropInHand != null) { + toolName = event.toolItem!!.name!! + } + update() + } + + private fun addDrop(crop: CropType, rarity: DropRarity) { + val sharedTracker = getSharedTracker() ?: return + sharedTracker.modify { + val map = it.drops.getOrPut(crop) { mutableMapOf() } + map.addOrPut(rarity, 1) + } + update() + } + + @SubscribeEvent + fun onRenderOverlay(event: GuiRenderEvent) { + if (!isEnabled()) return + + val currentlyOpen = Minecraft.getMinecraft().currentScreen is GuiInventory + if (inventoryOpen != currentlyOpen) { + inventoryOpen = currentlyOpen + update() + } + config.pos.renderStringsAndItems(display, posLabel = "Dicer Drop Tracker") + } + + class ItemDrop(val crop: CropType, val rarity: DropRarity, val pattern: Regex) + + fun isEnabled() = GardenAPI.inGarden() && config.display + + @SubscribeEvent + fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { + event.move(3, "garden.dicerCounterDisplay", "garden.dicerCounters.display") + event.move(3, "garden.dicerCounterHideChat", "garden.dicerCounters.hideChat") + event.move(3, "garden.dicerCounterPos", "garden.dicerCounters.pos") + + event.move(7, "#profile.garden.dicerRngDrops", "#profile.garden.dicerDropTracker.drops") { old -> + val items: MutableMap> = mutableMapOf() + val oldItems = ConfigManager.gson.fromJson>(old, Map::class.java) + for ((internalName, amount) in oldItems) { + val split = internalName.split(".") + val crop = CropType.getByName(split[0]) + val rarityName = split[1] + val rarity = DropRarity.valueOf(rarityName) + items.getOrPut(crop) { mutableMapOf() }[rarity] = amount + } + + ConfigManager.gson.toJsonTree(items) + } + } + + private fun currentDisplay() = getSharedTracker()?.getCurrent() + + private fun getSharedTracker(): SharedTracker? { + val profileSpecific = ProfileStorageData.profileSpecific ?: return null + return SharedTracker(profileSpecific.garden.dicerDropTracker, currentSessionData) + } + + fun resetCommand(args: Array) { + TrackerUtils.resetCommand("Dicer Drop Tracker", "shresetdicertracker", args, getSharedTracker()) { + update() + } + } +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropCounter.kt deleted file mode 100644 index d72540720..000000000 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropCounter.kt +++ /dev/null @@ -1,150 +0,0 @@ -package at.hannibal2.skyhanni.features.garden.farming - -import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.events.ConfigLoadEvent -import at.hannibal2.skyhanni.events.GardenToolChangeEvent -import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.PreProfileSwitchEvent -import at.hannibal2.skyhanni.features.garden.CropType -import at.hannibal2.skyhanni.features.garden.GardenAPI -import at.hannibal2.skyhanni.utils.ItemUtils.name -import at.hannibal2.skyhanni.utils.LorenzUtils.sortedDesc -import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators -import at.hannibal2.skyhanni.utils.RenderUtils.renderStrings -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent - -class DicerRngDropCounter { - private var display = emptyList() - private val drops = mutableMapOf>() - private val itemDrops = mutableListOf() - private val config get() = SkyHanniMod.feature.garden.dicerCounters - - init { - initDrops() - itemDrops.add(ItemDrop(CropType.MELON, DropRarity.UNCOMMON, "§a§lUNCOMMON DROP! §r§eDicer dropped §r§a(\\d+)x §r§aEnchanted Melon§r§e!".toRegex())) - itemDrops.add(ItemDrop(CropType.MELON, DropRarity.RARE, "§9§lRARE DROP! §r§eDicer dropped §r§a(\\d+)x §r§aEnchanted Melon§r§e!".toRegex())) - itemDrops.add(ItemDrop(CropType.MELON, DropRarity.CRAZY_RARE, "§d§lCRAZY RARE DROP! §r§eDicer dropped §r§[a|9](\\d+)x §r§[a|9]Enchanted Melon(?: Block)?§r§e!".toRegex())) - itemDrops.add(ItemDrop(CropType.MELON, DropRarity.PRAY_TO_RNGESUS, "§5§lPRAY TO RNGESUS DROP! §r§eDicer dropped §r§9(\\d+)x §r§9Enchanted Melon Block§r§e!".toRegex())) - - itemDrops.add(ItemDrop(CropType.PUMPKIN, DropRarity.UNCOMMON, "§a§lUNCOMMON DROP! §r§eDicer dropped §r§a(\\d+)x §r§aEnchanted Pumpkin§r§e!".toRegex())) - itemDrops.add(ItemDrop(CropType.PUMPKIN, DropRarity.RARE, "§9§lRARE DROP! §r§eDicer dropped §r§a(\\d+)x §r§aEnchanted Pumpkin§r§e!".toRegex())) - itemDrops.add(ItemDrop(CropType.PUMPKIN, DropRarity.CRAZY_RARE, "§d§lCRAZY RARE DROP! §r§eDicer dropped §r§a(\\d+)x §r§aEnchanted Pumpkin§r§e!".toRegex())) - itemDrops.add(ItemDrop(CropType.PUMPKIN, DropRarity.PRAY_TO_RNGESUS, "§5§lPRAY TO RNGESUS DROP! §r§eDicer dropped §r§[a|9](\\d+)x §r§(aEnchanted|9Polished) Pumpkin§r§e!".toRegex())) - } - - private fun initDrops() { - drops[CropType.MELON] = mutableMapOf() - drops[CropType.PUMPKIN] = mutableMapOf() - } - - enum class DropRarity(val displayName: String) { - UNCOMMON("§a§lUNCOMMON DROP"), - RARE("§9§lRARE DROP"), - CRAZY_RARE("§d§lCRAZY RARE DROP"), - PRAY_TO_RNGESUS("§5§lPRAY TO RNGESUS DROP"), - } - - @SubscribeEvent - fun onPreProfileSwitch(event: PreProfileSwitchEvent) { - display = emptyList() - drops.clear() - initDrops() - } - - @SubscribeEvent - fun onChat(event: LorenzChatEvent) { - if (!GardenAPI.inGarden()) return - if (!config.hideChat && !config.display) return - - val message = event.message - for (drop in itemDrops) { - if (drop.pattern.matches(message)) { - addDrop(drop.crop, drop.rarity) - saveConfig() - update() - if (config.hideChat) { - event.blockedReason = "dicer_rng_drop_counter" - } - return - } - } - } - - private fun update() { - display = drawDisplay() - } - - private fun drawDisplay(): List { - val help = mutableListOf() - val items = drops[cropInHand] ?: return help - help.add("§7RNG Drops for $toolName§7:") - for ((rarity, amount) in items.sortedDesc()) { - val displayName = rarity.displayName - help.add(" §7- §e${amount.addSeparators()}x $displayName") - } - - return help - } - - private var cropInHand: CropType? = null - private var toolName = "" - - @SubscribeEvent - fun onGardenToolChange(event: GardenToolChangeEvent) { - val crop = event.crop - cropInHand = if (crop == CropType.MELON || crop == CropType.PUMPKIN) crop else null - if (cropInHand != null) { - toolName = event.toolItem!!.name!! - } - update() - } - - private fun addDrop(crop: CropType, rarity: DropRarity) { - val map = drops[crop]!! - val old = map[rarity] ?: 0 - map[rarity] = old + 1 - } - - @SubscribeEvent - fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) { - if (isEnabled()) { - config.pos.renderStrings(display, posLabel = "Dicer Counter") - } - } - - class ItemDrop(val crop: CropType, val rarity: DropRarity, val pattern: Regex) - - private fun saveConfig() { - val map = GardenAPI.storage?.dicerRngDrops ?: return - map.clear() - for (drop in drops) { - val crop = drop.key - for ((rarity, amount) in drop.value) { - map[crop.cropName + "." + rarity.name] = amount - } - } - } - - @SubscribeEvent - fun onConfigLoad(event: ConfigLoadEvent) { - val map = GardenAPI.storage?.dicerRngDrops ?: return - for ((internalName, amount) in map) { - val split = internalName.split(".") - val crop = CropType.getByName(split[0]) - val rarityName = split[1] - val rarity = DropRarity.valueOf(rarityName) - drops[crop]!![rarity] = amount - } - } - - fun isEnabled() = GardenAPI.inGarden() && config.display - - @SubscribeEvent - fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { - event.move(3, "garden.dicerCounterDisplay", "garden.dicerCounters.display") - event.move(3, "garden.dicerCounterHideChat", "garden.dicerCounters.hideChat") - event.move(3, "garden.dicerCounterPos", "garden.dicerCounters.pos") - } -} diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt index 9db8553aa..7269797cb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt @@ -12,19 +12,23 @@ import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList -import at.hannibal2.skyhanni.utils.LorenzUtils.addSelector import at.hannibal2.skyhanni.utils.LorenzUtils.afterChange import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.formatNumber import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher +import at.hannibal2.skyhanni.utils.tracker.DisplayMode +import at.hannibal2.skyhanni.utils.tracker.SharedTracker +import at.hannibal2.skyhanni.utils.tracker.TrackerUtils +import at.hannibal2.skyhanni.utils.tracker.TrackerUtils.addDisplayModeToggle +import at.hannibal2.skyhanni.utils.tracker.TrackerUtils.addSessionResetButton import net.minecraft.client.Minecraft import net.minecraft.client.gui.inventory.GuiInventory import net.minecraft.entity.boss.BossStatus import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.concurrent.fixedRateTimer -class PowderTracker { +object PowderTracker { private val config get() = SkyHanniMod.feature.mining.powderTracker private var display = emptyList>() @@ -42,7 +46,6 @@ class PowderTracker { private val chestInfo = ResourceInfo(0L, 0L, 0, 0.0, mutableListOf()) private var doublePowder = false private var powderTimer = "" - private var currentDisplayMode = DisplayMode.TOTAL private var inventoryOpen = false private var currentSessionData = mutableMapOf() private val gemstones = listOf( @@ -87,7 +90,7 @@ class PowderTracker { fun onChat(event: LorenzChatEvent) { if (!isEnabled()) return val msg = event.message - val both = currentLog() ?: return + val both = getSharedTracker() ?: return if (config.greatExplorerMaxed) { uncovered.matchMatcher(msg) { @@ -187,26 +190,25 @@ class PowderTracker { for (index in config.textFormat.get()) { add(map[index]) } + + if (inventoryOpen && TrackerUtils.currentDisplayMode == DisplayMode.CURRENT) { + addSessionResetButton("Powder Tracker", getSharedTracker()) { + saveAndUpdate() + } + } } private fun drawDisplay() = buildList> { addAsSingletonList("§b§lPowder Tracker") if (inventoryOpen) { - addSelector( - "§7Display Mode: ", - getName = { type -> type.displayName }, - isCurrent = { it == currentDisplayMode }, - onChange = { - currentDisplayMode = it - saveAndUpdate() - } - ) + addDisplayModeToggle { + saveAndUpdate() + } } else { addAsSingletonList("") } - val both = currentLog() ?: return@buildList - val display = both.get(currentDisplayMode) + val display = currentDisplay() ?: return@buildList val chestPerHour = format(chestInfo.perHour) addAsSingletonList("§d${display.totalChestPicked.addSeparators()} Total Chests Picked §7($chestPerHour/h)") @@ -262,13 +264,13 @@ class PowderTracker { val count = rewards.getOrDefault(reward, 0).addSeparators() addAsSingletonList("§b$count ${reward.displayName}") } - } private fun MutableList>.addPerHour( map: MutableMap, reward: PowderChestReward, - info: ResourceInfo) { + info: ResourceInfo + ) { val mithrilCount = map.getOrDefault(reward, 0).addSeparators() val mithrilPerHour = format(info.perHour) addAsSingletonList("§b$mithrilCount ${reward.displayName} §7($mithrilPerHour/h)") @@ -301,16 +303,14 @@ class PowderTracker { } private fun calculate(info: ResourceInfo, reward: PowderChestReward) { - val both = currentLog() ?: return - val display = both.get(currentDisplayMode) + val display = currentDisplay() ?: return val rewards = display.rewards info.estimated = 0 info.estimated += rewards.getOrDefault(reward, 0) } private fun calculateChest() { - val both = currentLog() ?: return - val display = both.get(currentDisplayMode) + val display = currentDisplay() ?: return chestInfo.estimated = 0 chestInfo.estimated += display.totalChestPicked } @@ -342,37 +342,23 @@ class PowderTracker { val perMin: MutableList ) - enum class DisplayMode(val displayName: String) { - TOTAL("Total"), - CURRENT("This Session"), - ; - } + private fun currentDisplay() = getSharedTracker()?.getCurrent() - private fun currentLog(): AbstractPowderTracker? { + private fun getSharedTracker(): SharedTracker? { val profileSpecific = ProfileStorageData.profileSpecific ?: return null - return AbstractPowderTracker( + return SharedTracker( profileSpecific.powderTracker.getOrPut(0) { Storage.ProfileSpecific.PowderTracker() }, currentSessionData.getOrPut(0) { Storage.ProfileSpecific.PowderTracker() } ) } - class AbstractPowderTracker( - private val total: Storage.ProfileSpecific.PowderTracker, - private val currentSession: Storage.ProfileSpecific.PowderTracker, - ) { - - fun modify(modifyFunction: (Storage.ProfileSpecific.PowderTracker) -> Unit) { - modifyFunction(total) - modifyFunction(currentSession) - } + private fun isEnabled() = + LorenzUtils.inSkyBlock && LorenzUtils.skyBlockIsland == IslandType.CRYSTAL_HOLLOWS && config.enabled - fun get(displayMode: DisplayMode) = when (displayMode) { - DisplayMode.TOTAL -> total - DisplayMode.CURRENT -> currentSession + fun resetCommand(args: Array) { + TrackerUtils.resetCommand("Powder Tracker", "shresetpowdertracker", args, getSharedTracker()) { + saveAndUpdate() } } - - private fun isEnabled() = - LorenzUtils.inSkyBlock && LorenzUtils.skyBlockIsland == IslandType.CRYSTAL_HOLLOWS && config.enabled } diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt index 2aebe7e57..71c990fc0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt @@ -33,6 +33,11 @@ import at.hannibal2.skyhanni.utils.StringUtils import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.jsonobjects.SlayerProfitTrackerItemsJson import at.hannibal2.skyhanni.utils.renderables.Renderable +import at.hannibal2.skyhanni.utils.tracker.DisplayMode +import at.hannibal2.skyhanni.utils.tracker.SharedTracker +import at.hannibal2.skyhanni.utils.tracker.TrackerUtils +import at.hannibal2.skyhanni.utils.tracker.TrackerUtils.addDisplayModeToggle +import at.hannibal2.skyhanni.utils.tracker.TrackerUtils.addSessionResetButton import com.google.common.cache.CacheBuilder import net.minecraft.client.Minecraft import net.minecraft.client.gui.inventory.GuiInventory @@ -53,12 +58,10 @@ object SlayerItemProfitTracker { private val logger = LorenzLogger("slayer/item_profit_tracker") private var inventoryOpen = false private var lastClickDelay = 0L - private var currentDisplayMode = DisplayMode.TOTAL private var currentSessionData = mutableMapOf() private fun addSlayerCosts(price: Int) { - val itemLog = currentLog() ?: return - itemLog.modify { + getSharedTracker()?.modify { it.slayerSpawnCost += price } update() @@ -94,18 +97,14 @@ object SlayerItemProfitTracker { } private fun addMobKillCoins(coins: Int) { - val itemLog = currentLog() ?: return - - itemLog.modify { + getSharedTracker()?.modify { it.mobKillCoins += coins } update() } private fun addItemPickup(internalName: NEUInternalName, stackSize: Int) { - val itemLog = currentLog() ?: return - - itemLog.modify { + getSharedTracker()?.modify { val slayerItemProfit = it.items.getOrPut(internalName) { SlayerProfitList.SlayerItemProfit() } slayerItemProfit.timesDropped++ @@ -115,12 +114,13 @@ object SlayerItemProfitTracker { update() } - private fun currentLog(): AbstractSlayerProfitList? { - if (itemLogCategory == "") return null + private fun currentDisplay() = getSharedTracker()?.getCurrent() + private fun getSharedTracker(): SharedTracker? { + if (itemLogCategory == "") return null val profileSpecific = ProfileStorageData.profileSpecific ?: return null - return AbstractSlayerProfitList( + return SharedTracker( profileSpecific.slayerProfitData.getOrPut(itemLogCategory) { SlayerProfitList() }, currentSessionData.getOrPut(itemLogCategory) { SlayerProfitList() } ) @@ -128,9 +128,7 @@ object SlayerItemProfitTracker { @SubscribeEvent fun onQuestComplete(event: SlayerQuestCompleteEvent) { - val itemLog = currentLog() ?: return - - itemLog.modify { + getSharedTracker()?.modify { it.slayerCompletedCount++ } @@ -202,20 +200,13 @@ object SlayerItemProfitTracker { } private fun drawDisplay() = buildList> { - val both = currentLog() ?: return@buildList - val itemLog = both.get(currentDisplayMode) + val itemLog = currentDisplay() ?: return@buildList addAsSingletonList("§e§l$itemLogCategory Profit Tracker") if (inventoryOpen) { - addSelector( - "§7Display Mode: ", - getName = { type -> type.displayName }, - isCurrent = { it == currentDisplayMode }, - onChange = { - currentDisplayMode = it - update() - } - ) + addDisplayModeToggle { + update() + } } var profit = 0.0 @@ -322,27 +313,13 @@ object SlayerItemProfitTracker { } ) } - if (inventoryOpen && currentDisplayMode == DisplayMode.CURRENT) { - addAsSingletonList( - Renderable.clickAndHover( - "§cReset session!", - listOf("§cThis will reset your", "§ccurrent session for", "§c$itemLogCategory"), - ) { - resetData(DisplayMode.CURRENT) - update() - }) + if (inventoryOpen && TrackerUtils.currentDisplayMode == DisplayMode.CURRENT) { + addSessionResetButton("$itemLogCategory Slayer", getSharedTracker()) { + update() + } } } - private fun resetData(displayMode: DisplayMode) { - val currentLog = currentLog() ?: return - val list = currentLog.get(displayMode) - list.items.clear() - list.mobKillCoins = 0 - list.slayerSpawnCost = 0 - list.slayerCompletedCount = 0 - } - private fun getPrice(internalName: NEUInternalName) = when (config.priceFrom) { 0 -> internalName.getBazaarData()?.sellPrice ?: internalName.getPriceOrNull() ?: 0.0 1 -> internalName.getBazaarData()?.buyPrice ?: internalName.getPriceOrNull() ?: 0.0 @@ -361,53 +338,22 @@ object SlayerItemProfitTracker { update() } - config.pos.renderStringsAndItems(display, posLabel = "Slayer Item Profit Tracker") } - enum class DisplayMode(val displayName: String) { - TOTAL("Total"), - CURRENT("This Session"), - ; - } - - class AbstractSlayerProfitList( - private val total: SlayerProfitList, - private val currentSession: SlayerProfitList, - ) { - - fun modify(modifyFunction: (SlayerProfitList) -> Unit) { - modifyFunction(total) - modifyFunction(currentSession) - } - - fun get(displayMode: DisplayMode) = when (displayMode) { - DisplayMode.TOTAL -> total - DisplayMode.CURRENT -> currentSession - } - } - fun isEnabled() = LorenzUtils.inSkyBlock && config.enabled fun clearProfitCommand(args: Array) { if (itemLogCategory == "") { LorenzUtils.chat( "§c[SkyHanni] No current slayer data found. " + - "Go to a slayer area and start the specific slayer type you want to reset the data of." + "Go to a slayer area and start the specific slayer type you want to reset the data of." ) return } - if (args.size == 1 && args[0].lowercase() == "confirm") { - resetData(DisplayMode.TOTAL) + TrackerUtils.resetCommand("$itemLogCategory Slayer", "shclearslayerprofits", args, getSharedTracker()) { update() - LorenzUtils.chat("§e[SkyHanni] You reset your $itemLogCategory slayer data!") - return } - - LorenzUtils.clickableChat( - "§e[SkyHanni] Are you sure you want to reset all your $itemLogCategory slayer data? Click here to confirm.", - "shclearslayerprofits confirm" - ) } } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/DisplayMode.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/DisplayMode.kt new file mode 100644 index 000000000..6c0e14439 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/DisplayMode.kt @@ -0,0 +1,7 @@ +package at.hannibal2.skyhanni.utils.tracker + +enum class DisplayMode(val displayName: String) { + TOTAL("Total"), + CURRENT("This Session"), + ; +} diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SharedTracker.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SharedTracker.kt new file mode 100644 index 000000000..341600467 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SharedTracker.kt @@ -0,0 +1,18 @@ +package at.hannibal2.skyhanni.utils.tracker + +class SharedTracker( + private val total: T, + private val currentSession: T, +) { + fun modify(modifyFunction: (T) -> Unit) { + modifyFunction(total) + modifyFunction(currentSession) + } + + fun get(displayMode: DisplayMode) = when (displayMode) { + DisplayMode.TOTAL -> total + DisplayMode.CURRENT -> currentSession + } + + fun getCurrent() = get(TrackerUtils.currentDisplayMode) +} diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/TrackerData.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/TrackerData.kt new file mode 100644 index 000000000..3c4a8bbd0 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/TrackerData.kt @@ -0,0 +1,5 @@ +package at.hannibal2.skyhanni.utils.tracker + +abstract class TrackerData { + abstract fun reset() +} diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/TrackerUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/TrackerUtils.kt new file mode 100644 index 000000000..c223f17e7 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/TrackerUtils.kt @@ -0,0 +1,62 @@ +package at.hannibal2.skyhanni.utils.tracker + +import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList +import at.hannibal2.skyhanni.utils.LorenzUtils.addSelector +import at.hannibal2.skyhanni.utils.renderables.Renderable + +object TrackerUtils { + var currentDisplayMode = DisplayMode.TOTAL + + fun MutableList>.addDisplayModeToggle(update: () -> Unit) { + addSelector( + "§7Display Mode: ", + getName = { type -> type.displayName }, + isCurrent = { it == currentDisplayMode }, + onChange = { + currentDisplayMode = it + update() + } + ) + } + + fun MutableList>.addSessionResetButton(name: String, data: SharedTracker<*>?, update: () -> Unit) { + addAsSingletonList( + Renderable.clickAndHover( + "§cReset session!", + listOf( + "§cThis will reset your", + "§ccurrent session for", + "§c$name" + ), + ) { + data?.get(DisplayMode.CURRENT)?.let { + reset(it) { + update() + } + } + }) + } + + fun resetCommand(name: String, command: String, args: Array, data: SharedTracker<*>?, update: () -> Unit) { + if (args.size == 1 && args[0].lowercase() == "confirm") { + reset(data?.get(DisplayMode.TOTAL)) { + update() + LorenzUtils.chat("§e[SkyHanni] You reset your $name data!") + } + return + } + + LorenzUtils.clickableChat( + "§e[SkyHanni] Are you sure you want to reset all your $name data? Click here to confirm.", + "$command confirm" + ) + } + + fun reset(data: TrackerData?, update: () -> Unit) { + data?.let { + it.reset() + update() + } + } +} -- cgit From 66659a7c56a8366ead36af522593019a35c251d3 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 7 Nov 2023 02:04:20 +0100 Subject: 0.21 Beta 20 --- CHANGELOG.md | 9 ++++++++- build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ff1ca07c..368bffb34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -154,6 +154,9 @@ + Added a GUI element to remind you while /shmouselock is enabled. - CalMWolfs + Make Crimson Isle Quest Item Helper only get amount needed. - NetheriteMiner + Change config order to alphabetical. - walker ++ Added commands /shresetpowdertracker and /shresetdicertracker to reset the Powder Tracker and Dicer Drop Tracker - hannibal2 ++ Added current session/total session switch for Dicer Drop Tracker. - hannibal2 ++ Added a button to reset the local session for Dicer Drop Tracker and for Powder Tracker. - hannibal2 ### Bug Fixes @@ -243,7 +246,7 @@ + Removed **Duplicate Hider**. + Hypixel now fixed the bug themselves and hides duplicate farming contests in the Jacob inventory. -#### Internal Changes +#### Technical Details + Add Repo TODOs to regex patterns. - walker + Moved many patterns from function scope to members. - hannibal2 @@ -268,6 +271,10 @@ over the border between two items. - hannibal2 + Using visitorDrops.visitorRarities directly from the config instead of accessing the local field. Hopefully this will prevent partial config resets in the future. - hannibal2 ++ Added a tracker API that can be used for all features in SkyHanni that currently track stuff that the user collects. - hannibal2 ++ Added the slayer profit tracker logic (command to reset, toggle between total view and session view, and button to delete session) to powder tracker and Dicer Drop Tracker. - hannibal2 ++ Added support for migrating parts of the player or session storage. - nea ++ Changed the config format for dicerRngDrops/dicerDropsTracker. - hannibal2 ## Version 0.20 diff --git a/build.gradle.kts b/build.gradle.kts index 004e1338b..2e2343a09 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.21.Beta.19" +version = "0.21.Beta.20" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 93342d26f..b31dbbc31 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -325,7 +325,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.21.Beta.19", + version = "0.21.Beta.20", ) class SkyHanniMod { @Mod.EventHandler -- cgit From bd1c148c5cfeee0d2e5d7e3ed04498a496a435b6 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 7 Nov 2023 21:51:46 +0100 Subject: renamed SlayerItemProfitTracker to SlayerProfitTracker --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 4 +- .../java/at/hannibal2/skyhanni/config/Storage.java | 4 +- .../hannibal2/skyhanni/config/commands/Commands.kt | 4 +- .../features/slayer/SlayerItemProfitTracker.kt | 387 --------------------- .../features/slayer/SlayerProfitTracker.kt | 387 +++++++++++++++++++++ 5 files changed, 393 insertions(+), 393 deletions(-) delete mode 100644 src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt create mode 100644 src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index b31dbbc31..81a82904a 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -273,9 +273,9 @@ import at.hannibal2.skyhanni.features.rift.everywhere.motes.RiftMotesOrb import at.hannibal2.skyhanni.features.rift.everywhere.motes.ShowMotesNpcSellPrice import at.hannibal2.skyhanni.features.slayer.HideMobNames import at.hannibal2.skyhanni.features.slayer.SlayerBossSpawnSoon -import at.hannibal2.skyhanni.features.slayer.SlayerItemProfitTracker import at.hannibal2.skyhanni.features.slayer.SlayerItemsOnGround import at.hannibal2.skyhanni.features.slayer.SlayerMiniBossFeatures +import at.hannibal2.skyhanni.features.slayer.SlayerProfitTracker import at.hannibal2.skyhanni.features.slayer.SlayerQuestWarning import at.hannibal2.skyhanni.features.slayer.SlayerRngMeterDisplay import at.hannibal2.skyhanni.features.slayer.VampireSlayerFeatures @@ -554,7 +554,7 @@ class SkyHanniMod { loadModule(WarpTabComplete) loadModule(PlayerTabComplete) loadModule(GetFromSacksTabComplete) - loadModule(SlayerItemProfitTracker) + loadModule(SlayerProfitTracker) loadModule(SlayerItemsOnGround()) loadModule(RestorePieceOfWizardPortalLore()) loadModule(QuickModMenuSwitch) diff --git a/src/main/java/at/hannibal2/skyhanni/config/Storage.java b/src/main/java/at/hannibal2/skyhanni/config/Storage.java index edab10936..cf8bd827a 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Storage.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Storage.java @@ -16,7 +16,7 @@ import at.hannibal2.skyhanni.features.mining.powdertracker.PowderTracker; import at.hannibal2.skyhanni.features.misc.trevor.TrevorTracker; import at.hannibal2.skyhanni.features.misc.visualwords.VisualWord; import at.hannibal2.skyhanni.features.rift.area.westvillage.KloonTerminal; -import at.hannibal2.skyhanni.features.slayer.SlayerItemProfitTracker; +import at.hannibal2.skyhanni.features.slayer.SlayerProfitTracker; import at.hannibal2.skyhanni.utils.LorenzVec; import at.hannibal2.skyhanni.utils.NEUInternalName; import com.google.gson.annotations.Expose; @@ -345,7 +345,7 @@ public class Storage { } @Expose - public Map slayerProfitData = new HashMap<>(); + public Map slayerProfitData = new HashMap<>(); @Expose public Map slayerRngMeter = new HashMap<>(); diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index c612a9742..47d267bbc 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -34,7 +34,7 @@ import at.hannibal2.skyhanni.features.misc.MarkedPlayerManager import at.hannibal2.skyhanni.features.misc.discordrpc.DiscordRPCManager import at.hannibal2.skyhanni.features.misc.massconfiguration.DefaultConfigFeatures import at.hannibal2.skyhanni.features.misc.visualwords.VisualWordGui -import at.hannibal2.skyhanni.features.slayer.SlayerItemProfitTracker +import at.hannibal2.skyhanni.features.slayer.SlayerProfitTracker import at.hannibal2.skyhanni.test.PacketTest import at.hannibal2.skyhanni.test.SkyHanniConfigSearchResetCommand import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests @@ -151,7 +151,7 @@ object Commands { registerCommand( "shclearslayerprofits", "Clearing the total slayer profit for the current slayer type" - ) { SlayerItemProfitTracker.clearProfitCommand(it) } + ) { SlayerProfitTracker.clearProfitCommand(it) } registerCommand( "shimportghostcounterdata", "Manually importing the ghost counter data from GhostCounterV3" diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt deleted file mode 100644 index 7c5cb5b6c..000000000 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt +++ /dev/null @@ -1,387 +0,0 @@ -package at.hannibal2.skyhanni.features.slayer - -import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.config.Storage -import at.hannibal2.skyhanni.data.SlayerAPI -import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.PacketEvent -import at.hannibal2.skyhanni.events.PurseChangeCause -import at.hannibal2.skyhanni.events.PurseChangeEvent -import at.hannibal2.skyhanni.events.RepositoryReloadEvent -import at.hannibal2.skyhanni.events.SackChangeEvent -import at.hannibal2.skyhanni.events.SlayerChangeEvent -import at.hannibal2.skyhanni.events.SlayerQuestCompleteEvent -import at.hannibal2.skyhanni.features.bazaar.BazaarApi.Companion.getBazaarData -import at.hannibal2.skyhanni.test.PriceSource -import at.hannibal2.skyhanni.utils.EntityUtils -import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull -import at.hannibal2.skyhanni.utils.ItemUtils.name -import at.hannibal2.skyhanni.utils.KeyboardManager -import at.hannibal2.skyhanni.utils.LorenzLogger -import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList -import at.hannibal2.skyhanni.utils.LorenzUtils.addSelector -import at.hannibal2.skyhanni.utils.LorenzUtils.sortedDesc -import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUItems.getNpcPriceOrNull -import at.hannibal2.skyhanni.utils.NEUItems.getPriceOrNull -import at.hannibal2.skyhanni.utils.NumberUtil -import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators -import at.hannibal2.skyhanni.utils.StringUtils -import at.hannibal2.skyhanni.utils.StringUtils.removeColor -import at.hannibal2.skyhanni.utils.jsonobjects.SlayerProfitTrackerItemsJson -import at.hannibal2.skyhanni.utils.renderables.Renderable -import at.hannibal2.skyhanni.utils.tracker.SkyHanniTracker -import at.hannibal2.skyhanni.utils.tracker.TrackerData -import com.google.common.cache.CacheBuilder -import com.google.gson.annotations.Expose -import net.minecraft.entity.item.EntityItem -import net.minecraft.network.play.server.S0DPacketCollectItem -import net.minecraftforge.fml.common.eventhandler.EventPriority -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -import java.util.concurrent.TimeUnit -import kotlin.time.Duration.Companion.seconds - -object SlayerItemProfitTracker { - private val config get() = SkyHanniMod.feature.slayer.itemProfitTracker - private var collectedCache = CacheBuilder.newBuilder().expireAfterWrite(2, TimeUnit.SECONDS).build() - - private var itemLogCategory = "" - private var baseSlayerType = "" - private var display = emptyList>() - private val logger = LorenzLogger("slayer/profit_tracker") - private var lastClickDelay = 0L - private val trackers = mutableMapOf>() - - class Data : TrackerData() { - override fun reset() { - items.clear() - mobKillCoins = 0 - slayerSpawnCost = 0 - slayerCompletedCount = 0 - } - - @Expose - var items: MutableMap = HashMap() - - @Expose - var mobKillCoins: Long = 0 - - @Expose - var slayerSpawnCost: Long = 0 - - @Expose - var slayerCompletedCount = 0 - - class SlayerItemProfit { - @Expose - var internalName: NEUInternalName? = null - - @Expose - var timesDropped: Long = 0 - - @Expose - var totalAmount: Long = 0 - - @Expose - var hidden = false - - override fun toString() = "SlayerItemProfit{" + - "internalName='" + internalName + '\'' + - ", timesDropped=" + timesDropped + - ", totalAmount=" + totalAmount + - ", hidden=" + hidden + - '}' - } - - override fun toString() = "SlayerProfitList{" + - "items=" + items + - ", mobKillCoins=" + mobKillCoins + - ", slayerSpawnCost=" + slayerSpawnCost + - ", slayerCompletedCount=" + slayerCompletedCount + - '}' - } - - private fun addSlayerCosts(price: Int) { - getTracker()?.modify { - it.slayerSpawnCost += price - } - update() - } - - private var allowedItems = mapOf>() - - @SubscribeEvent - fun onRepoReload(event: RepositoryReloadEvent) { - allowedItems = event.getConstant("SlayerProfitTrackerItems").slayers - } - - @SubscribeEvent - fun onPurseChange(event: PurseChangeEvent) { - if (!isEnabled()) return - val coins = event.coins - if (event.reason == PurseChangeCause.GAIN_MOB_KILL && SlayerAPI.isInCorrectArea) { - logger.log("Coins gained for killing mobs: ${coins.addSeparators()}") - addMobKillCoins(coins.toInt()) - } - if (event.reason == PurseChangeCause.LOSE_SLAYER_QUEST_STARTED) { - logger.log("Coins paid for starting slayer quest: ${coins.addSeparators()}") - addSlayerCosts(coins.toInt()) - } - } - - @SubscribeEvent - fun onSlayerChange(event: SlayerChangeEvent) { - val newSlayer = event.newSlayer - itemLogCategory = newSlayer.removeColor() - baseSlayerType = itemLogCategory.substringBeforeLast(" ") - update() - } - - private fun addMobKillCoins(coins: Int) { - getTracker()?.modify { - it.mobKillCoins += coins - } - update() - } - - private fun addItemPickup(internalName: NEUInternalName, stackSize: Int) { - getTracker()?.modify { - val slayerItemProfit = it.items.getOrPut(internalName) { Data.SlayerItemProfit() } - - slayerItemProfit.timesDropped++ - slayerItemProfit.totalAmount += stackSize - } - - update() - } - - private fun getTracker(): SkyHanniTracker? { - if (itemLogCategory == "") return null - - return trackers.getOrPut(itemLogCategory) { - val getStorage: (Storage.ProfileSpecific) -> Data = { - it.slayerProfitData.getOrPut( - itemLogCategory - ) { Data() } - } - SkyHanniTracker("$itemLogCategory Profit Tracker", Data(), getStorage) { update() } - } - } - - @SubscribeEvent - fun onQuestComplete(event: SlayerQuestCompleteEvent) { - getTracker()?.modify { - it.slayerCompletedCount++ - } - - update() - } - - @SubscribeEvent - fun onSackChange(event: SackChangeEvent) { - if (!isEnabled()) return - if (!SlayerAPI.isInCorrectArea) return - if (!SlayerAPI.hasActiveSlayerQuest()) return - - for (sackChange in event.sackChanges) { - val change = sackChange.delta - if (change > 0) { - val internalName = sackChange.internalName - addItem(internalName, change) - } - } - } - - @SubscribeEvent(priority = EventPriority.LOW, receiveCanceled = true) - fun onChatPacket(event: PacketEvent.ReceiveEvent) { - if (!isEnabled()) return - if (!SlayerAPI.isInCorrectArea) return - if (!SlayerAPI.hasActiveSlayerQuest()) return - - val packet = event.packet - if (packet !is S0DPacketCollectItem) return - - val entityID = packet.collectedItemEntityID - val item = EntityUtils.getEntityByID(entityID) ?: return - if (item !is EntityItem) return - - if (collectedCache.getIfPresent(entityID) != null) return - collectedCache.put(entityID, Unit) - - val itemStack = item.entityItem - val name = itemStack.name ?: return - if (SlayerAPI.ignoreSlayerDrop(name)) return - val internalName = itemStack.getInternalNameOrNull() ?: return - addItem(internalName, itemStack.stackSize) - } - - private fun addItem(internalName: NEUInternalName, amount: Int) { - if (!isAllowedItem(internalName)) { - LorenzUtils.debug("Ignored non-slayer item pickup: '$internalName' '$itemLogCategory'") - return - } - - val (itemName, price) = SlayerAPI.getItemNameAndPrice(internalName, amount) - addItemPickup(internalName, amount) - logger.log("Coins gained for picking up an item ($itemName) ${price.addSeparators()}") - if (config.priceInChat && price > config.minimumPrice) { - LorenzUtils.chat("§e[SkyHanni] §a+Slayer Drop§7: §r$itemName") - } - if (config.titleWarning && price > config.minimumPriceWarning) { - LorenzUtils.sendTitle("§a+ $itemName", 5.seconds) - } - } - - private fun isAllowedItem(internalName: NEUInternalName): Boolean { - val allowedList = allowedItems[baseSlayerType] ?: return false - return internalName in allowedList - } - - fun update() { - val tracker = getTracker() ?: return - display = drawDisplay(tracker) - } - - private fun drawDisplay(tracker: SkyHanniTracker) = buildList> { - val itemLog = tracker.currentDisplay() ?: return@buildList - - addAsSingletonList("§e§l$itemLogCategory Profit Tracker") - tracker.addDisplayModeToggle(this) - - var profit = 0.0 - val map = mutableMapOf() - for ((internalName, itemProfit) in itemLog.items) { - val amount = itemProfit.totalAmount - - val price = (getPrice(internalName) * amount).toLong() - - val cleanName = SlayerAPI.getNameWithEnchantmentFor(internalName) - var name = cleanName - val priceFormat = NumberUtil.format(price) - val hidden = itemProfit.hidden - if (hidden) { - while (name.startsWith("§f")) { - name = name.substring(2) - } - name = StringUtils.addFormat(name, "§m") - } - val text = " §7${amount.addSeparators()}x $name§7: §6$priceFormat" - - val timesDropped = itemProfit.timesDropped - val percentage = timesDropped.toDouble() / itemLog.slayerCompletedCount - val perBoss = LorenzUtils.formatPercentage(percentage.coerceAtMost(1.0)) - - val renderable = if (tracker.isInventoryOpen()) Renderable.clickAndHover( - text, listOf( - "§7Dropped §e${timesDropped.addSeparators()} §7times.", - "§7Your drop rate: §c$perBoss", - "", - "§eClick to " + (if (hidden) "show" else "hide") + "!", - "§eControl + Click to remove this item!", - ) - ) { - if (System.currentTimeMillis() > lastClickDelay + 150) { - - if (KeyboardManager.isControlKeyDown()) { - itemLog.items.remove(internalName) - LorenzUtils.chat("§e[SkyHanni] Removed $cleanName §efrom slayer profit display.") - lastClickDelay = System.currentTimeMillis() + 500 - } else { - itemProfit.hidden = !hidden - lastClickDelay = System.currentTimeMillis() - } - update() - } - } else Renderable.string(text) - if (tracker.isInventoryOpen() || !hidden) { - map[renderable] = price - } - profit += price - } - val mobKillCoins = itemLog.mobKillCoins - if (mobKillCoins != 0L) { - val mobKillCoinsFormat = NumberUtil.format(mobKillCoins) - map[Renderable.hoverTips( - " §7Mob kill coins: §6$mobKillCoinsFormat", - listOf( - "§7Killing mobs gives you coins (more with scavenger)", - "§7You got §e$mobKillCoinsFormat §7coins in total this way" - ) - )] = mobKillCoins - profit += mobKillCoins - } - val slayerSpawnCost = itemLog.slayerSpawnCost - if (slayerSpawnCost != 0L) { - val mobKillCoinsFormat = NumberUtil.format(slayerSpawnCost) - map[Renderable.hoverTips( - " §7Slayer Spawn Costs: §c$mobKillCoinsFormat", - listOf("§7You paid §c$mobKillCoinsFormat §7in total", "§7for starting the slayer quests.") - )] = slayerSpawnCost - profit += slayerSpawnCost - } - - for (text in map.sortedDesc().keys) { - addAsSingletonList(text) - } - - val slayerCompletedCount = itemLog.slayerCompletedCount - addAsSingletonList( - Renderable.hoverTips( - "§7Bosses killed: §e${slayerCompletedCount.addSeparators()}", - listOf("§7You killed the $itemLogCategory boss", "§e${slayerCompletedCount.addSeparators()} §7times.") - ) - ) - - val profitFormat = NumberUtil.format(profit) - val profitPrefix = if (profit < 0) "§c" else "§6" - - val profitPerBoss = profit / itemLog.slayerCompletedCount - val profitPerBossFormat = NumberUtil.format(profitPerBoss) - - val text = "§eTotal Profit: $profitPrefix$profitFormat" - addAsSingletonList(Renderable.hoverTips(text, listOf("§7Profit per boss: $profitPrefix$profitPerBossFormat"))) - - if (tracker.isInventoryOpen()) { - addSelector( - "", - getName = { type -> type.displayName }, - isCurrent = { it.ordinal == config.priceFrom }, - onChange = { - config.priceFrom = it.ordinal - update() - } - ) - } - tracker.addSessionResetButton(this) - } - - private fun getPrice(internalName: NEUInternalName) = when (config.priceFrom) { - 0 -> internalName.getBazaarData()?.sellPrice ?: internalName.getPriceOrNull() ?: 0.0 - 1 -> internalName.getBazaarData()?.buyPrice ?: internalName.getPriceOrNull() ?: 0.0 - - else -> internalName.getNpcPriceOrNull() ?: 0.0 - } - - @SubscribeEvent - fun onRenderOverlay(event: GuiRenderEvent) { - if (!isEnabled()) return - if (!SlayerAPI.isInCorrectArea) return - - getTracker()?.renderDisplay(config.pos, display) - } - - fun isEnabled() = LorenzUtils.inSkyBlock && config.enabled - - fun clearProfitCommand(args: Array) { - if (itemLogCategory == "") { - LorenzUtils.chat( - "§c[SkyHanni] No current slayer data found. " + - "Go to a slayer area and start the specific slayer type you want to reset the data of." - ) - return - } - - getTracker()?.resetCommand(args, "shclearslayerprofits") - } -} diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt new file mode 100644 index 000000000..b5848a2d6 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt @@ -0,0 +1,387 @@ +package at.hannibal2.skyhanni.features.slayer + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.Storage +import at.hannibal2.skyhanni.data.SlayerAPI +import at.hannibal2.skyhanni.events.GuiRenderEvent +import at.hannibal2.skyhanni.events.PacketEvent +import at.hannibal2.skyhanni.events.PurseChangeCause +import at.hannibal2.skyhanni.events.PurseChangeEvent +import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SackChangeEvent +import at.hannibal2.skyhanni.events.SlayerChangeEvent +import at.hannibal2.skyhanni.events.SlayerQuestCompleteEvent +import at.hannibal2.skyhanni.features.bazaar.BazaarApi.Companion.getBazaarData +import at.hannibal2.skyhanni.test.PriceSource +import at.hannibal2.skyhanni.utils.EntityUtils +import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull +import at.hannibal2.skyhanni.utils.ItemUtils.name +import at.hannibal2.skyhanni.utils.KeyboardManager +import at.hannibal2.skyhanni.utils.LorenzLogger +import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList +import at.hannibal2.skyhanni.utils.LorenzUtils.addSelector +import at.hannibal2.skyhanni.utils.LorenzUtils.sortedDesc +import at.hannibal2.skyhanni.utils.NEUInternalName +import at.hannibal2.skyhanni.utils.NEUItems.getNpcPriceOrNull +import at.hannibal2.skyhanni.utils.NEUItems.getPriceOrNull +import at.hannibal2.skyhanni.utils.NumberUtil +import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators +import at.hannibal2.skyhanni.utils.StringUtils +import at.hannibal2.skyhanni.utils.StringUtils.removeColor +import at.hannibal2.skyhanni.utils.jsonobjects.SlayerProfitTrackerItemsJson +import at.hannibal2.skyhanni.utils.renderables.Renderable +import at.hannibal2.skyhanni.utils.tracker.SkyHanniTracker +import at.hannibal2.skyhanni.utils.tracker.TrackerData +import com.google.common.cache.CacheBuilder +import com.google.gson.annotations.Expose +import net.minecraft.entity.item.EntityItem +import net.minecraft.network.play.server.S0DPacketCollectItem +import net.minecraftforge.fml.common.eventhandler.EventPriority +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import java.util.concurrent.TimeUnit +import kotlin.time.Duration.Companion.seconds + +object SlayerProfitTracker { + private val config get() = SkyHanniMod.feature.slayer.itemProfitTracker + private var collectedCache = CacheBuilder.newBuilder().expireAfterWrite(2, TimeUnit.SECONDS).build() + + private var itemLogCategory = "" + private var baseSlayerType = "" + private var display = emptyList>() + private val logger = LorenzLogger("slayer/profit_tracker") + private var lastClickDelay = 0L + private val trackers = mutableMapOf>() + + class Data : TrackerData() { + override fun reset() { + items.clear() + mobKillCoins = 0 + slayerSpawnCost = 0 + slayerCompletedCount = 0 + } + + @Expose + var items: MutableMap = HashMap() + + @Expose + var mobKillCoins: Long = 0 + + @Expose + var slayerSpawnCost: Long = 0 + + @Expose + var slayerCompletedCount = 0 + + class SlayerItemProfit { + @Expose + var internalName: NEUInternalName? = null + + @Expose + var timesDropped: Long = 0 + + @Expose + var totalAmount: Long = 0 + + @Expose + var hidden = false + + override fun toString() = "SlayerItemProfit{" + + "internalName='" + internalName + '\'' + + ", timesDropped=" + timesDropped + + ", totalAmount=" + totalAmount + + ", hidden=" + hidden + + '}' + } + + override fun toString() = "SlayerProfitList{" + + "items=" + items + + ", mobKillCoins=" + mobKillCoins + + ", slayerSpawnCost=" + slayerSpawnCost + + ", slayerCompletedCount=" + slayerCompletedCount + + '}' + } + + private fun addSlayerCosts(price: Int) { + getTracker()?.modify { + it.slayerSpawnCost += price + } + update() + } + + private var allowedItems = mapOf>() + + @SubscribeEvent + fun onRepoReload(event: RepositoryReloadEvent) { + allowedItems = event.getConstant("SlayerProfitTrackerItems").slayers + } + + @SubscribeEvent + fun onPurseChange(event: PurseChangeEvent) { + if (!isEnabled()) return + val coins = event.coins + if (event.reason == PurseChangeCause.GAIN_MOB_KILL && SlayerAPI.isInCorrectArea) { + logger.log("Coins gained for killing mobs: ${coins.addSeparators()}") + addMobKillCoins(coins.toInt()) + } + if (event.reason == PurseChangeCause.LOSE_SLAYER_QUEST_STARTED) { + logger.log("Coins paid for starting slayer quest: ${coins.addSeparators()}") + addSlayerCosts(coins.toInt()) + } + } + + @SubscribeEvent + fun onSlayerChange(event: SlayerChangeEvent) { + val newSlayer = event.newSlayer + itemLogCategory = newSlayer.removeColor() + baseSlayerType = itemLogCategory.substringBeforeLast(" ") + update() + } + + private fun addMobKillCoins(coins: Int) { + getTracker()?.modify { + it.mobKillCoins += coins + } + update() + } + + private fun addItemPickup(internalName: NEUInternalName, stackSize: Int) { + getTracker()?.modify { + val slayerItemProfit = it.items.getOrPut(internalName) { Data.SlayerItemProfit() } + + slayerItemProfit.timesDropped++ + slayerItemProfit.totalAmount += stackSize + } + + update() + } + + private fun getTracker(): SkyHanniTracker? { + if (itemLogCategory == "") return null + + return trackers.getOrPut(itemLogCategory) { + val getStorage: (Storage.ProfileSpecific) -> Data = { + it.slayerProfitData.getOrPut( + itemLogCategory + ) { Data() } + } + SkyHanniTracker("$itemLogCategory Profit Tracker", Data(), getStorage) { update() } + } + } + + @SubscribeEvent + fun onQuestComplete(event: SlayerQuestCompleteEvent) { + getTracker()?.modify { + it.slayerCompletedCount++ + } + + update() + } + + @SubscribeEvent + fun onSackChange(event: SackChangeEvent) { + if (!isEnabled()) return + if (!SlayerAPI.isInCorrectArea) return + if (!SlayerAPI.hasActiveSlayerQuest()) return + + for (sackChange in event.sackChanges) { + val change = sackChange.delta + if (change > 0) { + val internalName = sackChange.internalName + addItem(internalName, change) + } + } + } + + @SubscribeEvent(priority = EventPriority.LOW, receiveCanceled = true) + fun onChatPacket(event: PacketEvent.ReceiveEvent) { + if (!isEnabled()) return + if (!SlayerAPI.isInCorrectArea) return + if (!SlayerAPI.hasActiveSlayerQuest()) return + + val packet = event.packet + if (packet !is S0DPacketCollectItem) return + + val entityID = packet.collectedItemEntityID + val item = EntityUtils.getEntityByID(entityID) ?: return + if (item !is EntityItem) return + + if (collectedCache.getIfPresent(entityID) != null) return + collectedCache.put(entityID, Unit) + + val itemStack = item.entityItem + val name = itemStack.name ?: return + if (SlayerAPI.ignoreSlayerDrop(name)) return + val internalName = itemStack.getInternalNameOrNull() ?: return + addItem(internalName, itemStack.stackSize) + } + + private fun addItem(internalName: NEUInternalName, amount: Int) { + if (!isAllowedItem(internalName)) { + LorenzUtils.debug("Ignored non-slayer item pickup: '$internalName' '$itemLogCategory'") + return + } + + val (itemName, price) = SlayerAPI.getItemNameAndPrice(internalName, amount) + addItemPickup(internalName, amount) + logger.log("Coins gained for picking up an item ($itemName) ${price.addSeparators()}") + if (config.priceInChat && price > config.minimumPrice) { + LorenzUtils.chat("§e[SkyHanni] §a+Slayer Drop§7: §r$itemName") + } + if (config.titleWarning && price > config.minimumPriceWarning) { + LorenzUtils.sendTitle("§a+ $itemName", 5.seconds) + } + } + + private fun isAllowedItem(internalName: NEUInternalName): Boolean { + val allowedList = allowedItems[baseSlayerType] ?: return false + return internalName in allowedList + } + + fun update() { + val tracker = getTracker() ?: return + display = drawDisplay(tracker) + } + + private fun drawDisplay(tracker: SkyHanniTracker) = buildList> { + val itemLog = tracker.currentDisplay() ?: return@buildList + + addAsSingletonList("§e§l$itemLogCategory Profit Tracker") + tracker.addDisplayModeToggle(this) + + var profit = 0.0 + val map = mutableMapOf() + for ((internalName, itemProfit) in itemLog.items) { + val amount = itemProfit.totalAmount + + val price = (getPrice(internalName) * amount).toLong() + + val cleanName = SlayerAPI.getNameWithEnchantmentFor(internalName) + var name = cleanName + val priceFormat = NumberUtil.format(price) + val hidden = itemProfit.hidden + if (hidden) { + while (name.startsWith("§f")) { + name = name.substring(2) + } + name = StringUtils.addFormat(name, "§m") + } + val text = " §7${amount.addSeparators()}x $name§7: §6$priceFormat" + + val timesDropped = itemProfit.timesDropped + val percentage = timesDropped.toDouble() / itemLog.slayerCompletedCount + val perBoss = LorenzUtils.formatPercentage(percentage.coerceAtMost(1.0)) + + val renderable = if (tracker.isInventoryOpen()) Renderable.clickAndHover( + text, listOf( + "§7Dropped §e${timesDropped.addSeparators()} §7times.", + "§7Your drop rate: §c$perBoss", + "", + "§eClick to " + (if (hidden) "show" else "hide") + "!", + "§eControl + Click to remove this item!", + ) + ) { + if (System.currentTimeMillis() > lastClickDelay + 150) { + + if (KeyboardManager.isControlKeyDown()) { + itemLog.items.remove(internalName) + LorenzUtils.chat("§e[SkyHanni] Removed $cleanName §efrom slayer profit display.") + lastClickDelay = System.currentTimeMillis() + 500 + } else { + itemProfit.hidden = !hidden + lastClickDelay = System.currentTimeMillis() + } + update() + } + } else Renderable.string(text) + if (tracker.isInventoryOpen() || !hidden) { + map[renderable] = price + } + profit += price + } + val mobKillCoins = itemLog.mobKillCoins + if (mobKillCoins != 0L) { + val mobKillCoinsFormat = NumberUtil.format(mobKillCoins) + map[Renderable.hoverTips( + " §7Mob kill coins: §6$mobKillCoinsFormat", + listOf( + "§7Killing mobs gives you coins (more with scavenger)", + "§7You got §e$mobKillCoinsFormat §7coins in total this way" + ) + )] = mobKillCoins + profit += mobKillCoins + } + val slayerSpawnCost = itemLog.slayerSpawnCost + if (slayerSpawnCost != 0L) { + val mobKillCoinsFormat = NumberUtil.format(slayerSpawnCost) + map[Renderable.hoverTips( + " §7Slayer Spawn Costs: §c$mobKillCoinsFormat", + listOf("§7You paid §c$mobKillCoinsFormat §7in total", "§7for starting the slayer quests.") + )] = slayerSpawnCost + profit += slayerSpawnCost + } + + for (text in map.sortedDesc().keys) { + addAsSingletonList(text) + } + + val slayerCompletedCount = itemLog.slayerCompletedCount + addAsSingletonList( + Renderable.hoverTips( + "§7Bosses killed: §e${slayerCompletedCount.addSeparators()}", + listOf("§7You killed the $itemLogCategory boss", "§e${slayerCompletedCount.addSeparators()} §7times.") + ) + ) + + val profitFormat = NumberUtil.format(profit) + val profitPrefix = if (profit < 0) "§c" else "§6" + + val profitPerBoss = profit / itemLog.slayerCompletedCount + val profitPerBossFormat = NumberUtil.format(profitPerBoss) + + val text = "§eTotal Profit: $profitPrefix$profitFormat" + addAsSingletonList(Renderable.hoverTips(text, listOf("§7Profit per boss: $profitPrefix$profitPerBossFormat"))) + + if (tracker.isInventoryOpen()) { + addSelector( + "", + getName = { type -> type.displayName }, + isCurrent = { it.ordinal == config.priceFrom }, + onChange = { + config.priceFrom = it.ordinal + update() + } + ) + } + tracker.addSessionResetButton(this) + } + + private fun getPrice(internalName: NEUInternalName) = when (config.priceFrom) { + 0 -> internalName.getBazaarData()?.sellPrice ?: internalName.getPriceOrNull() ?: 0.0 + 1 -> internalName.getBazaarData()?.buyPrice ?: internalName.getPriceOrNull() ?: 0.0 + + else -> internalName.getNpcPriceOrNull() ?: 0.0 + } + + @SubscribeEvent + fun onRenderOverlay(event: GuiRenderEvent) { + if (!isEnabled()) return + if (!SlayerAPI.isInCorrectArea) return + + getTracker()?.renderDisplay(config.pos, display) + } + + fun isEnabled() = LorenzUtils.inSkyBlock && config.enabled + + fun clearProfitCommand(args: Array) { + if (itemLogCategory == "") { + LorenzUtils.chat( + "§c[SkyHanni] No current slayer data found. " + + "Go to a slayer area and start the specific slayer type you want to reset the data of." + ) + return + } + + getTracker()?.resetCommand(args, "shclearslayerprofits") + } +} -- cgit From 4c4a0f2dbd15dfc4afa92e3a4c5ca90c0465976f Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 7 Nov 2023 22:27:15 +0100 Subject: Added more Ender Node Tracker features. Added command /shresetendernodetracker to reset the full data, added session support and added button to reset the current session. --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- .../java/at/hannibal2/skyhanni/config/Storage.java | 15 +--- .../hannibal2/skyhanni/config/commands/Commands.kt | 9 ++- .../combat/endernodetracker/EnderNodeTracker.kt | 80 +++++++++++++++------- .../skyhanni/utils/tracker/SkyHanniTracker.kt | 1 + 5 files changed, 66 insertions(+), 41 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 81a82904a..cd2a752d0 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -596,7 +596,7 @@ class SkyHanniMod { loadModule(BestiaryData) loadModule(KingTalismanHelper()) loadModule(HarpFeatures) - loadModule(EnderNodeTracker()) + loadModule(EnderNodeTracker) loadModule(CompactBestiaryChatMessage()) loadModule(WatchdogHider()) loadModule(AccountUpgradeReminder()) diff --git a/src/main/java/at/hannibal2/skyhanni/config/Storage.java b/src/main/java/at/hannibal2/skyhanni/config/Storage.java index cf8bd827a..75c9cde83 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Storage.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Storage.java @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.config; import at.hannibal2.skyhanni.data.model.ComposterUpgrade; -import at.hannibal2.skyhanni.features.combat.endernodetracker.EnderNode; +import at.hannibal2.skyhanni.features.combat.endernodetracker.EnderNodeTracker; import at.hannibal2.skyhanni.features.combat.ghostcounter.GhostData; import at.hannibal2.skyhanni.features.dungeon.DungeonAPI; import at.hannibal2.skyhanni.features.event.jerry.frozentreasure.FrozenTreasure; @@ -321,18 +321,7 @@ public class Storage { } @Expose - public EnderNodeTracker enderNodeTracker = new EnderNodeTracker(); - - public static class EnderNodeTracker { - @Expose - public int totalNodesMined = 0; - - @Expose - public int totalEndermiteNests = 0; - - @Expose - public Map lootCount = new HashMap<>(); - } + public EnderNodeTracker.Data enderNodeTracker = new EnderNodeTracker.Data(); @Expose public RiftStorage rift = new RiftStorage(); diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index 47d267bbc..3933ed081 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -8,6 +8,7 @@ import at.hannibal2.skyhanni.data.PartyAPI import at.hannibal2.skyhanni.features.bingo.BingoCardDisplay import at.hannibal2.skyhanni.features.bingo.BingoNextStepHelper import at.hannibal2.skyhanni.features.chat.Translator +import at.hannibal2.skyhanni.features.combat.endernodetracker.EnderNodeTracker import at.hannibal2.skyhanni.features.combat.ghostcounter.GhostUtil import at.hannibal2.skyhanni.features.commands.PartyCommands import at.hannibal2.skyhanni.features.event.diana.BurrowWarpHelper @@ -161,8 +162,12 @@ object Commands { "Clear farming items saved for the Farming Fortune Guide" ) { clearFarmingItems() } registerCommand("shresetghostcounter", "Resets the ghost counter") { GhostUtil.reset() } - registerCommand("shresetpowdertracker", "Resets the powder tracker") { PowderTracker.resetCommand(it) } - registerCommand("shresetdicertracker", "Resets the dicer counter") { DicerDropTracker.resetCommand(it) } + registerCommand("shresetpowdertracker", "Resets the Powder Tracker") { PowderTracker.resetCommand(it) } + registerCommand("shresetdicertracker", "Resets the Dicer Drop Tracker") { DicerDropTracker.resetCommand(it) } + registerCommand( + "shresetendernodetracker", + "Resets the Ender Node Tracker" + ) { EnderNodeTracker.resetCommand(it) } registerCommand("shbingotoggle", "Toggle the bingo card display mode") { BingoCardDisplay.toggleCommand() } registerCommand( "shfarmingprofile", diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt index 4d336d326..d73123c23 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt @@ -2,7 +2,6 @@ package at.hannibal2.skyhanni.features.combat.endernodetracker import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.config.Storage import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.ConfigLoadEvent @@ -14,20 +13,21 @@ import at.hannibal2.skyhanni.events.SackChangeEvent import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList +import at.hannibal2.skyhanni.utils.LorenzUtils.addOrPut import at.hannibal2.skyhanni.utils.LorenzUtils.afterChange -import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy import at.hannibal2.skyhanni.utils.NEUItems.getNpcPriceOrNull import at.hannibal2.skyhanni.utils.NEUItems.getPriceOrNull import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.format -import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems +import at.hannibal2.skyhanni.utils.tracker.SkyHanniTracker +import at.hannibal2.skyhanni.utils.tracker.TrackerData +import com.google.gson.annotations.Expose import io.github.moulberry.notenoughupdates.util.MinecraftExecutor import net.minecraft.client.Minecraft import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class EnderNodeTracker { +object EnderNodeTracker { private val config get() = SkyHanniMod.feature.combat.enderNodeTracker - private val storage get() = ProfileStorageData.profileSpecific?.enderNodeTracker private var miteGelInInventory = 0 private var display = emptyList>() @@ -36,6 +36,26 @@ class EnderNodeTracker { private val enderNodeRegex = Regex("""ENDER NODE!.+You found (\d+x )?§r(.+)§r§f!""") private val endermanRegex = Regex("""(RARE|PET) DROP! §r(.+) §r§b\(""") + private val tracker = SkyHanniTracker("Ender Node Tracker", Data(), { it.enderNodeTracker }) { update() } + + class Data : TrackerData() { + + override fun reset() { + totalNodesMined = 0 + totalEndermiteNests = 0 + lootCount.clear() + } + + @Expose + var totalNodesMined = 0 + + @Expose + var totalEndermiteNests = 0 + + @Expose + var lootCount: MutableMap = mutableMapOf() + } + @SubscribeEvent fun onChat(event: LorenzChatEvent) { if (!config.enabled) return @@ -46,11 +66,12 @@ class EnderNodeTracker { val message = event.message.trim() var item: String? = null var amount = 1 - val storage = storage ?: return // check whether the loot is from an ender node or an enderman enderNodeRegex.find(message)?.let { - storage.totalNodesMined++ + tracker.modify { storage -> + storage.totalNodesMined++ + } amount = it.groups[1]?.value?.substringBefore("x")?.toIntOrNull() ?: 1 item = it.groups[2]?.value } ?: endermanRegex.find(message)?.let { @@ -61,15 +82,16 @@ class EnderNodeTracker { when { item == null -> return item == "§cEndermite Nest" -> { - storage.totalEndermiteNests++ + tracker.modify { storage -> + storage.totalEndermiteNests++ + } } } // increment the count of the specific item found EnderNode.entries.find { it.displayName == item }?.let { - val old = storage.lootCount[it] ?: 0 - storage.lootCount = storage.lootCount.editCopy { - this[it] = old + amount + tracker.modify { storage -> + storage.lootCount.addOrPut(it, amount) } } update() @@ -89,15 +111,15 @@ class EnderNodeTracker { if (!config.enabled) return if (!ProfileStorageData.loaded) return if (!isInTheEnd()) return - val storage = storage ?: return val change = event.sackChanges .firstOrNull { it.internalName == EnderNode.MITE_GEL.internalName && it.delta > 0 } ?: return - val old = storage.lootCount[EnderNode.MITE_GEL] ?: 0 - storage.lootCount = storage.lootCount.editCopy { - this[EnderNode.MITE_GEL] = old + change.delta + + tracker.modify { storage -> + storage.lootCount.addOrPut(EnderNode.MITE_GEL, change.delta) } + update() } @@ -106,7 +128,6 @@ class EnderNodeTracker { if (!config.enabled) return if (!isInTheEnd()) return if (!ProfileStorageData.loaded) return - val storage = storage ?: return MinecraftExecutor.OnThread.execute { val newMiteGelInInventory = Minecraft.getMinecraft().thePlayer.inventory.mainInventory @@ -114,9 +135,8 @@ class EnderNodeTracker { .sumOf { it.stackSize } val change = newMiteGelInInventory - miteGelInInventory if (change > 0) { - val old = storage.lootCount[EnderNode.MITE_GEL] ?: 0 - storage.lootCount = storage.lootCount.editCopy { - this[EnderNode.MITE_GEL] = old + change + tracker.modify { storage -> + storage.lootCount.addOrPut(EnderNode.MITE_GEL, change) } update() } @@ -125,10 +145,11 @@ class EnderNodeTracker { } @SubscribeEvent - fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) { + fun onRenderOverlay(event: GuiRenderEvent) { if (!config.enabled) return if (!isInTheEnd()) return - config.position.renderStringsAndItems(display, posLabel = "Ender Node Tracker") + + tracker.renderDisplay(config.position, display) } @SubscribeEvent @@ -144,7 +165,7 @@ class EnderNodeTracker { event.move(2, "misc.enderNodeTracker", "combat.enderNodeTracker") } - private fun calculateProfit(storage: Storage.ProfileSpecific.EnderNodeTracker): Map { + private fun calculateProfit(storage: Data): Map { if (!ProfileStorageData.loaded) return emptyMap() val newProfit = mutableMapOf() @@ -163,7 +184,7 @@ class EnderNodeTracker { } private fun update() { - val storage = storage ?: return + val storage = tracker.currentDisplay() ?: return lootProfit = calculateProfit(storage) display = formatDisplay(drawDisplay(storage)) } @@ -190,10 +211,13 @@ class EnderNodeTracker { else -> null } - private fun drawDisplay(storage: Storage.ProfileSpecific.EnderNodeTracker) = buildList> { + private fun drawDisplay(storage: Data) = buildList> { if (!ProfileStorageData.loaded) return emptyList>() addAsSingletonList("§5§lEnder Node Tracker") + + tracker.addDisplayModeToggle(this) + addAsSingletonList("§d${storage.totalNodesMined.addSeparators()} Ender Nodes mined") addAsSingletonList("§6${format(lootProfit.values.sum())} Coins made") addAsSingletonList(" ") @@ -220,9 +244,11 @@ class EnderNodeTracker { val (c, u, r, e, l) = EnderNode.entries.subList(16, 21).map { (storage.lootCount[it] ?: 0).addSeparators() } val profit = format(EnderNode.entries.subList(16, 21).sumOf { lootProfit[it] ?: 0.0 }) addAsSingletonList("§f$c§7-§a$u§7-§9$r§7-§5$e§7-§6$l §fEnderman Pet §7(§6$profit§7)") + + tracker.addSessionResetButton(this) } - private fun calculateEnderArmor(storage: Storage.ProfileSpecific.EnderNodeTracker) = + private fun calculateEnderArmor(storage: Data) = storage.lootCount.filter { isEnderArmor(it.key) } .map { it.value } .sum() @@ -236,4 +262,8 @@ class EnderNodeTracker { } return newList } + + fun resetCommand(args: Array) { + tracker.resetCommand(args, "shresetendernodetracker") + } } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt index 4d7b74243..6ff8febc7 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt @@ -45,6 +45,7 @@ class SkyHanniTracker( } } + // rename fun currentDisplay() = getSharedTracker()?.getCurrent() fun resetCommand(args: Array, command: String) { -- cgit From fccea080f5b8eaf561e83dc62b84a3cd5ded5a8f Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 7 Nov 2023 22:54:04 +0100 Subject: Added more Armor Drop Tracker features. Added command /shresetarmordroptracker to reset the full data, added session support and added button to reset the current session. --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 4 +- .../java/at/hannibal2/skyhanni/config/Storage.java | 4 +- .../hannibal2/skyhanni/config/commands/Commands.kt | 5 + .../features/garden/farming/ArmorDropTracker.kt | 174 +++++++++++++++++++++ .../features/garden/farming/CropMoneyDisplay.kt | 2 +- .../features/garden/farming/FarmingArmorDrops.kt | 148 ------------------ .../skyhanni/utils/tracker/DisplayMode.kt | 2 +- .../skyhanni/utils/tracker/SharedTracker.kt | 4 +- .../skyhanni/utils/tracker/SkyHanniTracker.kt | 5 +- .../skyhanni/utils/tracker/TrackerUtils.kt | 2 +- 10 files changed, 189 insertions(+), 161 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt delete mode 100644 src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingArmorDrops.kt (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index cd2a752d0..ca743ed50 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -139,10 +139,10 @@ import at.hannibal2.skyhanni.features.garden.contest.JacobContestFFNeededDisplay import at.hannibal2.skyhanni.features.garden.contest.JacobContestStatsSummary import at.hannibal2.skyhanni.features.garden.contest.JacobContestTimeNeeded import at.hannibal2.skyhanni.features.garden.contest.JacobFarmingContestsInventory +import at.hannibal2.skyhanni.features.garden.farming.ArmorDropTracker import at.hannibal2.skyhanni.features.garden.farming.CropMoneyDisplay import at.hannibal2.skyhanni.features.garden.farming.CropSpeedMeter import at.hannibal2.skyhanni.features.garden.farming.DicerDropTracker -import at.hannibal2.skyhanni.features.garden.farming.FarmingArmorDrops import at.hannibal2.skyhanni.features.garden.farming.FarmingWeightDisplay import at.hannibal2.skyhanni.features.garden.farming.GardenBurrowingSporesNotifier import at.hannibal2.skyhanni.features.garden.farming.GardenCropMilestoneDisplay @@ -505,7 +505,7 @@ class SkyHanniMod { loadModule(JacobFarmingContestsInventory()) loadModule(GardenNextJacobContest) loadModule(WrongFungiCutterWarning()) - loadModule(FarmingArmorDrops()) + loadModule(ArmorDropTracker) loadModule(JoinCrystalHollows()) loadModule(CrystalHollowsNamesInCore()) loadModule(GardenVisitorColorNames) diff --git a/src/main/java/at/hannibal2/skyhanni/config/Storage.java b/src/main/java/at/hannibal2/skyhanni/config/Storage.java index 75c9cde83..26fdd365a 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Storage.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Storage.java @@ -8,8 +8,8 @@ import at.hannibal2.skyhanni.features.event.jerry.frozentreasure.FrozenTreasure; import at.hannibal2.skyhanni.features.fishing.trophy.TrophyRarity; import at.hannibal2.skyhanni.features.garden.CropAccessory; import at.hannibal2.skyhanni.features.garden.CropType; +import at.hannibal2.skyhanni.features.garden.farming.ArmorDropTracker; import at.hannibal2.skyhanni.features.garden.farming.DicerDropTracker; -import at.hannibal2.skyhanni.features.garden.farming.FarmingArmorDrops; import at.hannibal2.skyhanni.features.garden.fortuneguide.FarmingItems; import at.hannibal2.skyhanni.features.garden.visitor.VisitorReward; import at.hannibal2.skyhanni.features.mining.powdertracker.PowderTracker; @@ -160,7 +160,7 @@ public class Storage { public long nextSixthVisitorArrival = 0; @Expose - public Map farmArmorDrops = new HashMap<>(); + public ArmorDropTracker.Data armorDropTracker = new ArmorDropTracker.Data(); @Expose public Map composterUpgrades = new HashMap<>(); diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index 3933ed081..c96dbab65 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -19,6 +19,7 @@ import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.features.garden.GardenCropTimeCommand import at.hannibal2.skyhanni.features.garden.GardenNextJacobContest import at.hannibal2.skyhanni.features.garden.composter.ComposterOverlay +import at.hannibal2.skyhanni.features.garden.farming.ArmorDropTracker import at.hannibal2.skyhanni.features.garden.farming.CropMoneyDisplay import at.hannibal2.skyhanni.features.garden.farming.CropSpeedMeter import at.hannibal2.skyhanni.features.garden.farming.DicerDropTracker @@ -168,6 +169,10 @@ object Commands { "shresetendernodetracker", "Resets the Ender Node Tracker" ) { EnderNodeTracker.resetCommand(it) } + registerCommand( + "shresetarmordroptracker", + "Resets the Armor Drop Tracker" + ) { ArmorDropTracker.resetCommand(it) } registerCommand("shbingotoggle", "Toggle the bingo card display mode") { BingoCardDisplay.toggleCommand() } registerCommand( "shfarmingprofile", diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt new file mode 100644 index 000000000..0d5bcbf19 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt @@ -0,0 +1,174 @@ +package at.hannibal2.skyhanni.features.garden.farming + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator +import at.hannibal2.skyhanni.events.ConfigLoadEvent +import at.hannibal2.skyhanni.events.GuiRenderEvent +import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.PreProfileSwitchEvent +import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.features.garden.CropType +import at.hannibal2.skyhanni.features.garden.GardenAPI +import at.hannibal2.skyhanni.utils.InventoryUtils +import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName +import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList +import at.hannibal2.skyhanni.utils.LorenzUtils.addOrPut +import at.hannibal2.skyhanni.utils.LorenzUtils.sortedDesc +import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators +import at.hannibal2.skyhanni.utils.SimpleTimeMark +import at.hannibal2.skyhanni.utils.jsonobjects.ArmorDropsJson +import at.hannibal2.skyhanni.utils.jsonobjects.ArmorDropsJson.DropInfo +import at.hannibal2.skyhanni.utils.tracker.SkyHanniTracker +import at.hannibal2.skyhanni.utils.tracker.TrackerData +import com.google.gson.JsonObject +import com.google.gson.annotations.Expose +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import kotlin.time.Duration.Companion.seconds + +object ArmorDropTracker { + private var display = emptyList>() + + private var hasArmor = false + private val armorPattern = "(FERMENTO|CROPIE|SQUASH|MELON)_(LEGGINGS|CHESTPLATE|BOOTS|HELMET)".toPattern() + private val config get() = SkyHanniMod.feature.garden.farmingArmorDrop + + private val tracker = SkyHanniTracker("Armor Drop Tracker", Data(), { it.garden.armorDropTracker }) { update() } + + class Data : TrackerData() { + override fun reset() { + drops.clear() + } + + @Expose + var drops: MutableMap = mutableMapOf() + } + + enum class ArmorDropType(val dropName: String, val chatMessage: String) { + CROPIE("§9Cropie", "§6§lRARE CROP! §r§f§r§9Cropie §r§b(Armor Set Bonus)"), + SQUASH("§5Squash", "§6§lRARE CROP! §r§f§r§5Squash §r§b(Armor Set Bonus)"), + FERMENTO("§6Fermento", "§6§lRARE CROP! §r§f§r§6Fermento §r§b(Armor Set Bonus)"), + } + + @SubscribeEvent + fun onPreProfileSwitch(event: PreProfileSwitchEvent) { + display = emptyList() + hasArmor = false + } + + @SubscribeEvent + fun onChat(event: LorenzChatEvent) { + for (dropType in ArmorDropType.entries) { + if (dropType.chatMessage == event.message) { + addDrop(dropType) + if (config.hideChat) { + event.blockedReason = "farming_armor_drops" + } + } + } + } + + private fun addDrop(drop: ArmorDropType) { + tracker.modify { + it.drops.addOrPut(drop, 1) + } + update() + } + + private fun update() { + display = drawDisplay() + } + + private fun drawDisplay() = buildList> { + val drops = tracker.currentDisplay()?.drops ?: return@buildList + + addAsSingletonList("§7RNG Drops for Farming Armor:") + tracker.addDisplayModeToggle(this) + for ((drop, amount) in drops.sortedDesc()) { + val dropName = drop.dropName + addAsSingletonList(" §7- §e${amount.addSeparators()}x $dropName") + } + + tracker.addSessionResetButton(this) + } + + @SubscribeEvent + fun onConfigLoad(event: ConfigLoadEvent) { + update() + } + + @SubscribeEvent + fun onRenderOverlay(event: GuiRenderEvent) { + if (!GardenAPI.inGarden()) return + if (!config.enabled) return + if (!hasArmor) return + + tracker.renderDisplay(config.pos, display) + } + + @SubscribeEvent + fun onTick(event: LorenzTickEvent) { + if (!GardenAPI.inGarden()) return + if (!config.enabled) return + + if (event.isMod(30)) { + checkArmor() + } + } + + private fun checkArmor() { + val armorPieces = InventoryUtils.getArmor() + .mapNotNull { it?.getInternalName()?.asString() } + .count { armorPattern.matcher(it).matches() } + hasArmor = armorPieces > 1 + } + + @SubscribeEvent + fun onRepoReload(event: RepositoryReloadEvent) { + val data = event.getConstant("ArmorDrops") + armorDropInfo = data.special_crops + } + + private var armorDropInfo = mapOf() + private var currentArmorDropChance = 0.0 + private var lastCalculationTime = SimpleTimeMark.farPast() + + fun getDropsPerHour(crop: CropType?): Double { + if (crop == null) return 0.0 + + if (lastCalculationTime.passedSince() > 5.seconds) { + lastCalculationTime = SimpleTimeMark.now() + + val armorDropName = crop.specialDropType + val armorName = armorDropInfo[armorDropName]?.armor_type ?: return 0.0 + val pieceCount = InventoryUtils.getArmor() + .mapNotNull { it?.getInternalName()?.asString() } + .count { it.contains(armorName) || it.contains("FERMENTO") } + + val dropRates = armorDropInfo[armorDropName]?.chance ?: return 0.0 + var dropRate = 0.0 + if (pieceCount > 0 && dropRates.size >= pieceCount) { + dropRate = dropRates[pieceCount - 1] + } + currentArmorDropChance = (dropRate * 60 * 60.0) / 100 + } + return currentArmorDropChance + } + + @SubscribeEvent + fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { + event.move(3, "garden.farmingArmorDropsEnabled", "garden.farmingArmorDrop.enabled") + event.move(3, "garden.farmingArmorDropsHideChat", "garden.farmingArmorDrop.hideChat") + event.move(3, "garden.farmingArmorDropsPos", "garden.farmingArmorDrop.pos") + + event.move(8, "#profile.garden.farmArmorDrops", "#profile.garden.armorDropTracker") { old -> + val new = JsonObject() + new.add("drops", old) + new + } + } + + fun resetCommand(args: Array) { + tracker.resetCommand(args, "shresetarmordroptracker") + } +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt index 0cc07f7e7..91abf10a4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt @@ -155,7 +155,7 @@ object CropMoneyDisplay { if (config.armor) { val amountPerHour = - it.multiplier * GardenCropSpeed.getRecentBPS() * FarmingArmorDrops.getDropsPerHour(it) + it.multiplier * GardenCropSpeed.getRecentBPS() * ArmorDropTracker.getDropsPerHour(it) extraArmorCoins = amountPerHour * it.specialDropType.asInternalName().getNpcPrice() } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingArmorDrops.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingArmorDrops.kt deleted file mode 100644 index 2617ad329..000000000 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingArmorDrops.kt +++ /dev/null @@ -1,148 +0,0 @@ -package at.hannibal2.skyhanni.features.garden.farming - -import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.events.ConfigLoadEvent -import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.PreProfileSwitchEvent -import at.hannibal2.skyhanni.events.RepositoryReloadEvent -import at.hannibal2.skyhanni.features.garden.CropType -import at.hannibal2.skyhanni.features.garden.GardenAPI -import at.hannibal2.skyhanni.utils.InventoryUtils -import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName -import at.hannibal2.skyhanni.utils.LorenzUtils.sortedDesc -import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators -import at.hannibal2.skyhanni.utils.RenderUtils.renderStrings -import at.hannibal2.skyhanni.utils.SimpleTimeMark -import at.hannibal2.skyhanni.utils.jsonobjects.ArmorDropsJson -import at.hannibal2.skyhanni.utils.jsonobjects.ArmorDropsJson.DropInfo -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -import kotlin.time.Duration.Companion.seconds - -class FarmingArmorDrops { - private var display = emptyList() - private val storage get() = GardenAPI.storage - - private var hasArmor = false - private val armorPattern = "(FERMENTO|CROPIE|SQUASH|MELON)_(LEGGINGS|CHESTPLATE|BOOTS|HELMET)".toPattern() - private val config get() = SkyHanniMod.feature.garden.farmingArmorDrop - - enum class ArmorDropType(val dropName: String, val chatMessage: String) { - CROPIE("§9Cropie", "§6§lRARE CROP! §r§f§r§9Cropie §r§b(Armor Set Bonus)"), - SQUASH("§5Squash", "§6§lRARE CROP! §r§f§r§5Squash §r§b(Armor Set Bonus)"), - FERMENTO("§6Fermento", "§6§lRARE CROP! §r§f§r§6Fermento §r§b(Armor Set Bonus)"), - } - - @SubscribeEvent - fun onPreProfileSwitch(event: PreProfileSwitchEvent) { - display = emptyList() - hasArmor = false - } - - @SubscribeEvent - fun onChat(event: LorenzChatEvent) { - for (dropType in ArmorDropType.entries) { - if (dropType.chatMessage == event.message) { - addDrop(dropType) - if (config.hideChat) { - event.blockedReason = "farming_armor_drops" - } - } - } - } - - private fun addDrop(drop: ArmorDropType) { - val drops = storage?.farmArmorDrops ?: return - val old = drops[drop] ?: 0 - drops[drop] = old + 1 - update() - } - - private fun update() { - display = drawDisplay() - } - - private fun drawDisplay() = buildList { - val drops = storage?.farmArmorDrops ?: return@buildList - - add("§7RNG Drops for Farming Armor:") - for ((drop, amount) in drops.sortedDesc()) { - val dropName = drop.dropName - add(" §7- §e${amount.addSeparators()}x $dropName") - } - } - - @SubscribeEvent - fun onConfigLoad(event: ConfigLoadEvent) { - update() - } - - @SubscribeEvent - fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) { - if (!GardenAPI.inGarden()) return - if (!config.enabled) return - if (!hasArmor) return - - config.pos.renderStrings(display, posLabel = "Farming Armor Drops") - } - - @SubscribeEvent - fun onTick(event: LorenzTickEvent) { - if (!GardenAPI.inGarden()) return - if (!config.enabled) return - - if (event.isMod(30)) { - checkArmor() - } - } - - private fun checkArmor() { - val armorPieces = InventoryUtils.getArmor() - .mapNotNull { it?.getInternalName()?.asString() } - .count { armorPattern.matcher(it).matches() } - hasArmor = armorPieces > 1 - } - - @SubscribeEvent - fun onRepoReload(event: RepositoryReloadEvent) { - val data = event.getConstant("ArmorDrops") - armorDropInfo = data.special_crops - } - - companion object { - var armorDropInfo = mapOf() - private var currentArmorDropChance = 0.0 - private var lastCalculationTime = SimpleTimeMark.farPast() - - fun getDropsPerHour(crop: CropType?): Double { - if (crop == null) return 0.0 - - if (lastCalculationTime.passedSince() > 5.seconds) { - lastCalculationTime = SimpleTimeMark.now() - - val armorDropName = crop.specialDropType - val armorName = armorDropInfo[armorDropName]?.armor_type ?: return 0.0 - val pieceCount = InventoryUtils.getArmor() - .mapNotNull { it?.getInternalName()?.asString() } - .count { it.contains(armorName) || it.contains("FERMENTO") } - - val dropRates = armorDropInfo[armorDropName]?.chance ?: return 0.0 - var dropRate = 0.0 - if (pieceCount > 0 && dropRates.size >= pieceCount) { - dropRate = dropRates[pieceCount - 1] - } - currentArmorDropChance = (dropRate * 60 * 60.0) / 100 - } - return currentArmorDropChance - } - } - - @SubscribeEvent - fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { - event.move(3, "garden.farmingArmorDropsEnabled", "garden.farmingArmorDrop.enabled") - event.move(3, "garden.farmingArmorDropsHideChat", "garden.farmingArmorDrop.hideChat") - event.move(3, "garden.farmingArmorDropsPos", "garden.farmingArmorDrop.pos") - } -} diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/DisplayMode.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/DisplayMode.kt index 6c0e14439..55441953c 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/DisplayMode.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/DisplayMode.kt @@ -2,6 +2,6 @@ package at.hannibal2.skyhanni.utils.tracker enum class DisplayMode(val displayName: String) { TOTAL("Total"), - CURRENT("This Session"), + SESSION("This Session"), ; } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SharedTracker.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SharedTracker.kt index 341600467..9b5ae1d90 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SharedTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SharedTracker.kt @@ -11,8 +11,6 @@ class SharedTracker( fun get(displayMode: DisplayMode) = when (displayMode) { DisplayMode.TOTAL -> total - DisplayMode.CURRENT -> currentSession + DisplayMode.SESSION -> currentSession } - - fun getCurrent() = get(TrackerUtils.currentDisplayMode) } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt index 6ff8febc7..e1b4c42ad 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt @@ -26,7 +26,7 @@ class SkyHanniTracker( } fun addSessionResetButton(list: MutableList>) { - if (inventoryOpen && TrackerUtils.currentDisplayMode == DisplayMode.CURRENT) { + if (inventoryOpen && TrackerUtils.currentDisplayMode == DisplayMode.SESSION) { list.addSessionResetButton(name, getSharedTracker()) { update() } @@ -45,8 +45,7 @@ class SkyHanniTracker( } } - // rename - fun currentDisplay() = getSharedTracker()?.getCurrent() + fun currentDisplay() = getSharedTracker()?.get(TrackerUtils.currentDisplayMode) fun resetCommand(args: Array, command: String) { TrackerUtils.resetCommand(name, command, args, getSharedTracker()) { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/TrackerUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/TrackerUtils.kt index cc2dab37f..ec527c9e5 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/TrackerUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/TrackerUtils.kt @@ -30,7 +30,7 @@ object TrackerUtils { "§c$name" ), ) { - data?.get(DisplayMode.CURRENT)?.let { + data?.get(DisplayMode.SESSION)?.let { reset(it) { update() } -- cgit From b32a56fce987c8939aca56338fa5e6a1cf669736 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 8 Nov 2023 00:24:17 +0100 Subject: 0.21 Beta 21 --- CHANGELOG.md | 7 +++++++ build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/CHANGELOG.md b/CHANGELOG.md index 368bffb34..ea1c3e96d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -157,6 +157,10 @@ + Added commands /shresetpowdertracker and /shresetdicertracker to reset the Powder Tracker and Dicer Drop Tracker - hannibal2 + Added current session/total session switch for Dicer Drop Tracker. - hannibal2 + Added a button to reset the local session for Dicer Drop Tracker and for Powder Tracker. - hannibal2 ++ Added more features for Ender Node Tracker and Armor Drop Tracker. - hannibal2 + + Added session/display mode support, added a button to reset the current session, and added the commands /shresetendernodetracker and /shresetarmordroptracker to reset the full data. ++ Added support for different current sessions per profile for all new trackers: Ender Node, Armor Drop, Dicer Drop, Powder and Slayer Profit Tracker ++ Added the option to change the Blaze Slayer Dagger GUI positions. - hannibal2 ### Bug Fixes @@ -235,6 +239,8 @@ accidentally. - hannibal2 + Hopefully fixed resets of Visitor Drops stats. - hannibal2 + Fixed typo in The Art Of Peace. - walker ++ Fixed compatibility problems with ChatTriggers that caused flickering in the Estimated Item Value while inside the NEU Profile Viewer. - hannibal2 ++ Fixed Quest Item Helper showing negative numbers. - hannibal2 #### Config @@ -275,6 +281,7 @@ + Added the slayer profit tracker logic (command to reset, toggle between total view and session view, and button to delete session) to powder tracker and Dicer Drop Tracker. - hannibal2 + Added support for migrating parts of the player or session storage. - nea + Changed the config format for dicerRngDrops/dicerDropsTracker. - hannibal2 ++ Created SkyHanniTracker, the core API for working with tracker stuff. This should be used everywhere someday in the future. - hannibal2 ## Version 0.20 diff --git a/build.gradle.kts b/build.gradle.kts index 2e2343a09..7c86c21f0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.21.Beta.20" +version = "0.21.Beta.21" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index ca743ed50..a509f3c88 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -325,7 +325,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.21.Beta.20", + version = "0.21.Beta.21", ) class SkyHanniMod { @Mod.EventHandler -- cgit From d2d6162ce5830099418e85b69f02b958625ad6a7 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 9 Nov 2023 17:53:32 +0100 Subject: Used SkyHanniTracker in FrozenTreasureTracker --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- .../java/at/hannibal2/skyhanni/config/Storage.java | 15 +---- .../hannibal2/skyhanni/config/commands/Commands.kt | 7 +- .../combat/endernodetracker/EnderNodeTracker.kt | 9 ++- .../jerry/frozentreasure/FrozenTreasureTracker.kt | 78 +++++++++++++++------- .../skyhanni/utils/tracker/SkyHanniTracker.kt | 18 ++--- 6 files changed, 74 insertions(+), 55 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index a509f3c88..b4a9a1c12 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -560,7 +560,7 @@ class SkyHanniMod { loadModule(QuickModMenuSwitch) loadModule(ArachneChatMessageHider()) loadModule(ShowItemUuid()) - loadModule(FrozenTreasureTracker()) + loadModule(FrozenTreasureTracker) loadModule(SlayerRngMeterDisplay()) loadModule(GhostCounter) loadModule(RiftTimer()) diff --git a/src/main/java/at/hannibal2/skyhanni/config/Storage.java b/src/main/java/at/hannibal2/skyhanni/config/Storage.java index 26fdd365a..21a54735e 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Storage.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Storage.java @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.data.model.ComposterUpgrade; import at.hannibal2.skyhanni.features.combat.endernodetracker.EnderNodeTracker; import at.hannibal2.skyhanni.features.combat.ghostcounter.GhostData; import at.hannibal2.skyhanni.features.dungeon.DungeonAPI; -import at.hannibal2.skyhanni.features.event.jerry.frozentreasure.FrozenTreasure; +import at.hannibal2.skyhanni.features.event.jerry.frozentreasure.FrozenTreasureTracker; import at.hannibal2.skyhanni.features.fishing.trophy.TrophyRarity; import at.hannibal2.skyhanni.features.garden.CropAccessory; import at.hannibal2.skyhanni.features.garden.CropType; @@ -307,18 +307,7 @@ public class Storage { public PowderTracker.Data powderTracker = new PowderTracker.Data(); @Expose - public FrozenTreasureTracker frozenTreasureTracker = new FrozenTreasureTracker(); - - public static class FrozenTreasureTracker { - @Expose - public int treasuresMined = 0; - - @Expose - public int compactProcs = 0; - - @Expose - public Map treasureCount = new HashMap<>(); - } + public FrozenTreasureTracker.Data frozenTreasureTracker = new FrozenTreasureTracker.Data(); @Expose public EnderNodeTracker.Data enderNodeTracker = new EnderNodeTracker.Data(); diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index c96dbab65..89885ec4d 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -13,6 +13,7 @@ import at.hannibal2.skyhanni.features.combat.ghostcounter.GhostUtil import at.hannibal2.skyhanni.features.commands.PartyCommands import at.hannibal2.skyhanni.features.event.diana.BurrowWarpHelper import at.hannibal2.skyhanni.features.event.diana.InquisitorWaypointShare +import at.hannibal2.skyhanni.features.event.jerry.frozentreasure.FrozenTreasureTracker import at.hannibal2.skyhanni.features.fame.AccountUpgradeReminder import at.hannibal2.skyhanni.features.fame.CityProjectFeatures import at.hannibal2.skyhanni.features.garden.GardenAPI @@ -169,10 +170,8 @@ object Commands { "shresetendernodetracker", "Resets the Ender Node Tracker" ) { EnderNodeTracker.resetCommand(it) } - registerCommand( - "shresetarmordroptracker", - "Resets the Armor Drop Tracker" - ) { ArmorDropTracker.resetCommand(it) } + registerCommand("shresetarmordroptracker", "Resets the Armor Drop Tracker") { ArmorDropTracker.resetCommand(it) } + registerCommand("shresetfrozentreasuretracker", "Resets the Frozen Treasure Tracker") { FrozenTreasureTracker.resetCommand(it) } registerCommand("shbingotoggle", "Toggle the bingo card display mode") { BingoCardDisplay.toggleCommand() } registerCommand( "shfarmingprofile", diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt index 802e593e9..1b10bf7eb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt @@ -215,9 +215,6 @@ object EnderNodeTracker { if (!ProfileStorageData.loaded) return emptyList>() addAsSingletonList("§5§lEnder Node Tracker") - - tracker.addDisplayModeToggle(this) - addAsSingletonList("§d${storage.totalNodesMined.addSeparators()} Ender Nodes mined") addAsSingletonList("§6${format(lootProfit.values.sum())} Coins made") addAsSingletonList(" ") @@ -244,8 +241,6 @@ object EnderNodeTracker { val (c, u, r, e, l) = EnderNode.entries.subList(16, 21).map { (storage.lootCount[it] ?: 0).addSeparators() } val profit = format(EnderNode.entries.subList(16, 21).sumOf { lootProfit[it] ?: 0.0 }) addAsSingletonList("§f$c§7-§a$u§7-§9$r§7-§5$e§7-§6$l §fEnderman Pet §7(§6$profit§7)") - - tracker.addSessionResetButton(this) } private fun calculateEnderArmor(storage: Data) = @@ -259,7 +254,11 @@ object EnderNodeTracker { val newList = mutableListOf>() for (index in config.textFormat.get()) { newList.add(map[index]) + if (newList.size == 1) { + tracker.addDisplayModeToggle(newList) + } } + tracker.addSessionResetButton(newList) return newList } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt index ee72bec69..fa10aa501 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt @@ -2,7 +2,6 @@ package at.hannibal2.skyhanni.features.event.jerry.frozentreasure import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.config.Storage import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.data.ScoreboardData @@ -11,17 +10,19 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.PreProfileSwitchEvent import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList -import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy +import at.hannibal2.skyhanni.utils.LorenzUtils.addOrPut import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.NumberUtil import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators -import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.removeColor +import at.hannibal2.skyhanni.utils.tracker.SkyHanniTracker +import at.hannibal2.skyhanni.utils.tracker.TrackerData +import com.google.gson.annotations.Expose import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.concurrent.fixedRateTimer -class FrozenTreasureTracker { +object FrozenTreasureTracker { private val config get() = SkyHanniMod.feature.event.winter.frozenTreasureTracker private var display = emptyList>() private var estimatedIce = 0L @@ -30,6 +31,8 @@ class FrozenTreasureTracker { private var icePerHour = 0 private var stoppedChecks = 0 private var compactPattern = "COMPACT! You found an Enchanted Ice!".toPattern() + private val tracker = SkyHanniTracker("Frozen Treasure Tracker", { Data() }, { it.frozenTreasureTracker }) + { saveAndUpdate() } init { fixedRateTimer(name = "skyhanni-frozen-treasure-tracker", period = 1000) { @@ -38,6 +41,24 @@ class FrozenTreasureTracker { } } + class Data : TrackerData() { + + override fun reset() { + treasureCount.clear() + treasuresMined = 0 + compactProcs = 0 + } + + @Expose + var treasuresMined = 0 + + @Expose + var compactProcs = 0 + + @Expose + var treasureCount: MutableMap = mutableMapOf() + } + @SubscribeEvent fun onWorldChange(event: LorenzWorldChangeEvent) { icePerHour = 0 @@ -78,7 +99,11 @@ class FrozenTreasureTracker { val newList = mutableListOf>() for (index in config.textFormat) { newList.add(map[index]) + if (newList.size == 1) { + tracker.addDisplayModeToggle(newList) + } } + tracker.addSessionResetButton(newList) return newList } @@ -88,19 +113,21 @@ class FrozenTreasureTracker { if (!onJerryWorkshop()) return val message = event.message.removeColor().trim() - val storage = ProfileStorageData.profileSpecific?.frozenTreasureTracker ?: return compactPattern.matchMatcher(message) { - storage.compactProcs += 1 + tracker.modify { + it.compactProcs += 1 + } saveAndUpdate() if (config.hideMessages) event.blockedReason = "frozen treasure tracker" } for (treasure in FrozenTreasure.entries) { if ("FROZEN TREASURE! You found ${treasure.displayName.removeColor()}!".toRegex().matches(message)) { - storage.treasuresMined += 1 - val old = storage.treasureCount[treasure] ?: 0 - storage.treasureCount = storage.treasureCount.editCopy { this[treasure] = old + 1 } + tracker.modify { + it.treasuresMined += 1 + it.treasureCount.addOrPut(treasure, 1) + } saveAndUpdate() if (config.hideMessages) event.blockedReason = "frozen treasure tracker" } @@ -112,16 +139,16 @@ class FrozenTreasureTracker { display = emptyList() } - private fun drawTreasureDisplay(storage: Storage.ProfileSpecific.FrozenTreasureTracker) = buildList> { + private fun drawTreasureDisplay(data: Data) = buildList> { addAsSingletonList("§1§lFrozen Treasure Tracker") - addAsSingletonList("§6${formatNumber(storage.treasuresMined)} Treasures Mined") + addAsSingletonList("§6${formatNumber(data.treasuresMined)} Treasures Mined") addAsSingletonList("§3${formatNumber(estimatedIce)} Total Ice") addAsSingletonList("§3${formatNumber(icePerHour)} Ice/hr") - addAsSingletonList("§8${formatNumber(storage.treasuresMined)} Compact Procs") + addAsSingletonList("§8${formatNumber(data.treasuresMined)} Compact Procs") addAsSingletonList("") for (treasure in FrozenTreasure.entries) { - val count = (storage.treasureCount[treasure] ?: 0) * if (config.showAsDrops) treasure.defaultAmount else 1 + val count = (data.treasureCount[treasure] ?: 0) * if (config.showAsDrops) treasure.defaultAmount else 1 addAsSingletonList("§b${formatNumber(count)} ${treasure.displayName}") } addAsSingletonList("") @@ -134,26 +161,26 @@ class FrozenTreasureTracker { } private fun saveAndUpdate() { - val storage = ProfileStorageData.profileSpecific?.frozenTreasureTracker ?: return - calculateIce(storage) - display = formatDisplay(drawTreasureDisplay(storage)) + val data = tracker.currentDisplay() ?: return + calculateIce(data) + display = formatDisplay(drawTreasureDisplay(data)) } - private fun calculateIce(storage: Storage.ProfileSpecific.FrozenTreasureTracker) { - estimatedIce = 0 - estimatedIce += storage.compactProcs * 160 + private fun calculateIce(data: Data) { + estimatedIce = data.compactProcs * 160L for (treasure in FrozenTreasure.entries) { - val amount = storage.treasureCount[treasure] ?: 0 + val amount = data.treasureCount[treasure] ?: 0 estimatedIce += amount * treasure.defaultAmount * treasure.iceMultiplier } } @SubscribeEvent - fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) { + fun onRenderOverlay(event: GuiRenderEvent) { if (!config.enabled) return if (!onJerryWorkshop()) return if (config.onlyInCave && !inGlacialCave()) return - config.position.renderStringsAndItems(display, posLabel = "Frozen Treasure Tracker") + + tracker.renderDisplay(config.position, display) } @SubscribeEvent @@ -163,5 +190,10 @@ class FrozenTreasureTracker { private fun onJerryWorkshop() = IslandType.WINTER.isInIsland() - private fun inGlacialCave() = onJerryWorkshop() && ScoreboardData.sidebarLinesFormatted.contains(" §7⏣ §3Glacial Cave") + private fun inGlacialCave() = + onJerryWorkshop() && ScoreboardData.sidebarLinesFormatted.contains(" §7⏣ §3Glacial Cave") + + fun resetCommand(args: Array) { + tracker.resetCommand(args, "shresetfrozentreasuretracker") + } } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt index 4cf1f8e5f..ec0fc4848 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt @@ -23,14 +23,6 @@ class SkyHanniTracker( fun isInventoryOpen() = inventoryOpen - private fun getSharedTracker(): SharedTracker? { - val profileSpecific = ProfileStorageData.profileSpecific ?: return null - return SharedTracker(getStorage(profileSpecific), getCurrentSession(profileSpecific)) - } - - private fun getCurrentSession(profileSpecific: Storage.ProfileSpecific) = - currentSessions.getOrPut(profileSpecific) { createNewSession() } - fun addSessionResetButton(list: MutableList>) { if (!inventoryOpen || displayMode != DisplayMode.SESSION) return @@ -89,6 +81,14 @@ class SkyHanniTracker( position.renderStringsAndItems(display, posLabel = name) } + private fun getSharedTracker(): SharedTracker? { + val profileSpecific = ProfileStorageData.profileSpecific ?: return null + return SharedTracker(getStorage(profileSpecific), getCurrentSession(profileSpecific)) + } + + private fun getCurrentSession(profileSpecific: Storage.ProfileSpecific) = + currentSessions.getOrPut(profileSpecific) { createNewSession() } + private fun reset(displayMode: DisplayMode, message: String) { getSharedTracker()?.get(displayMode)?.let { it.reset() @@ -97,7 +97,7 @@ class SkyHanniTracker( } } - class SharedTracker(private val total: Data, private val currentSession: Data, ) { + class SharedTracker(private val total: Data, private val currentSession: Data) { fun modify(modifyFunction: (Data) -> Unit) { modifyFunction(total) modifyFunction(currentSession) -- cgit From 20cbb7d8e48757ae21230a650dcee06a56aaa190 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 11 Nov 2023 11:40:24 +0100 Subject: added hot swap detection messages --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 3 ++ .../skyhanni/config/features/DevConfig.java | 11 +++-- .../at/hannibal2/skyhanni/test/HotSwapDetection.kt | 53 ++++++++++++++++++++++ 3 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/test/HotSwapDetection.kt (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index b4a9a1c12..4006df431 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -289,6 +289,7 @@ import at.hannibal2.skyhanni.features.summonings.SummoningMobManager import at.hannibal2.skyhanni.features.summonings.SummoningSoulsName import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.test.HighlightMissingRepoItems +import at.hannibal2.skyhanni.test.HotSwapDetection import at.hannibal2.skyhanni.test.PacketTest import at.hannibal2.skyhanni.test.ParkourWaypointSaver import at.hannibal2.skyhanni.test.ShowItemUuid @@ -639,6 +640,8 @@ class SkyHanniMod { loadModule(HighlightMissingRepoItems()) loadModule(ParkourWaypointSaver()) loadModule(TestShowSlotNumber()) + loadModule(SkyHanniDebugsAndTests) + loadModule(HotSwapDetection) } @Mod.EventHandler diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/DevConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/DevConfig.java index be43a7526..4ee5f9469 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/DevConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/DevConfig.java @@ -34,9 +34,9 @@ public class DevConfig { @Expose @ConfigOption( - name = "Mod Menu Log", - desc = "Enables debug messages when the currently opened GUI changes, with the path to the gui class. " + - "Useful for adding more mods to quick mod menu switch." + name = "Mod Menu Log", + desc = "Enables debug messages when the currently opened GUI changes, with the path to the gui class. " + + "Useful for adding more mods to quick mod menu switch." ) @ConfigEditorBoolean public boolean modMenuLog = false; @@ -95,6 +95,11 @@ public class DevConfig { @ConfigOption(name = "Highlight Missing Repo Items", desc = "Highlights each item in the current inventory that is not in your current NEU repo.") @ConfigEditorBoolean public boolean highlightMissingRepo = false; + + @Expose + @ConfigOption(name = "Hot Swap Detection", desc = "Show chat messages when Hot Swap starts and ends.") + @ConfigEditorBoolean + public boolean hotSwapDetection = false; } @Expose diff --git a/src/main/java/at/hannibal2/skyhanni/test/HotSwapDetection.kt b/src/main/java/at/hannibal2/skyhanni/test/HotSwapDetection.kt new file mode 100644 index 000000000..e3acc25e7 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/test/HotSwapDetection.kt @@ -0,0 +1,53 @@ +package at.hannibal2.skyhanni.test + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.data.MinecraftData +import at.hannibal2.skyhanni.utils.LorenzUtils +import kotlin.concurrent.fixedRateTimer + +object HotSwapDetection { + private val config get() = SkyHanniMod.feature.dev.debug + + private var latestTick = 0 + private var lastTps = 0 + private var hotswap = false + + init { + fixedRateTimer(name = "skyhanni-tps-counter-seconds", period = 1000L) { + val currentTick = MinecraftData.totalTicks + val diff = currentTick - latestTick + latestTick = currentTick + + // we count 2 client ticks per tick, we are bad + handleTps(diff / 2) + } + } + + private fun handleTps(tps: Int) { + if (!config.hotSwapDetection) return + + // ignore below one minute + if (latestTick < 20 * 60) return + + println("diff: $tps") + + if (tps < 5) { + LorenzUtils.debug("Lags! Only $tps tps") + } + + if (!hotswap) { + if (tps < 2) { + if (lastTps > 15) { + LorenzUtils.debug("Detected hotswap now!") + hotswap = true + } + } + } else { + if (tps > 15) { + hotswap = false + LorenzUtils.debug("Detected hotswap end!") + } + } + lastTps = tps + } +} -- cgit From 9937b2902ca5204cd5ee33b66b6ca885e21b945b Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 11 Nov 2023 13:55:09 +0100 Subject: 0.21 Beta 22 --- CHANGELOG.md | 19 +++++++++++++++++++ build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/CHANGELOG.md b/CHANGELOG.md index ea1c3e96d..f9e1c15cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -161,6 +161,11 @@ + Added session/display mode support, added a button to reset the current session, and added the commands /shresetendernodetracker and /shresetarmordroptracker to reset the full data. + Added support for different current sessions per profile for all new trackers: Ender Node, Armor Drop, Dicer Drop, Powder and Slayer Profit Tracker + Added the option to change the Blaze Slayer Dagger GUI positions. - hannibal2 ++ Added more features to the Frozen Treasure Tracker. - hannibal2 + + Added session/display mode support, added a button to reset the current session, and added the commands /shresetfrozentreasuretracker to reset the full data. ++ Added Slayer Profit Tracker support for loot from area mini-bosses. - hannibal2 ++ No longer opening the empty /shdefaultoptions GUI. - walker ++ Added the SkyHanni icon and a link to the GitHub page for MC launchers like Prism to display. - hannibal2 ### Bug Fixes @@ -241,6 +246,14 @@ + Fixed typo in The Art Of Peace. - walker + Fixed compatibility problems with ChatTriggers that caused flickering in the Estimated Item Value while inside the NEU Profile Viewer. - hannibal2 + Fixed Quest Item Helper showing negative numbers. - hannibal2 ++ Fixed YouTuber and Admin ranks getting lost in the tab list. - walker ++ Added a cooldown to the current session tracker reset button to fix the chat spam. - hannibal2 ++ Changed the color of the "Slayer boss soon!" warning from red to yellow. - hannibal2 ++ Fixed a bug where some items were counted twice in the Slayer Profit Tracker. - hannibal2 ++ Fixed item rarity errors in the museum. - hannibal2 ++ Fixed mob highlighting problems with Blaze Slayer and Skytils. - hannibal2 ++ Pablo Helper: Fixed some messages not showing the "get from sack" clickable message. - hannibal2 ++ Fixed scoreboard date number suffixes are missing sometimes. - Erymanthus #### Config @@ -282,6 +295,12 @@ + Added support for migrating parts of the player or session storage. - nea + Changed the config format for dicerRngDrops/dicerDropsTracker. - hannibal2 + Created SkyHanniTracker, the core API for working with tracker stuff. This should be used everywhere someday in the future. - hannibal2 ++ Used SkyHanniTracker in FrozenTreasureTracker. - hannibal2 ++ Added /shdebugwaypoint as a test/debug command. - hannibal2 ++ Added debug messages to detect hot swaps. - hannibal2 ++ Added /shdebugtablist ++ Set your clipboard as a fake tab list. - hannibal2 ++ /shversion now copies the SkyHanni version into the clipboard as well. - hannibal2 ## Version 0.20 diff --git a/build.gradle.kts b/build.gradle.kts index 7c86c21f0..6bb802740 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.21.Beta.21" +version = "0.21.Beta.22" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 4006df431..3f973707d 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -326,7 +326,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.21.Beta.21", + version = "0.21.Beta.22", ) class SkyHanniMod { @Mod.EventHandler -- cgit From a634e3326a484f2048259fb64cba623dbcde4370 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 11 Nov 2023 14:30:29 +0100 Subject: Fixed the leftStronghold area not getting detected. --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 ++ .../java/at/hannibal2/skyhanni/data/HypixelData.kt | 18 ++---------------- .../at/hannibal2/skyhanni/data/LocationData.kt | 22 ++++++++++++++++++++++ 3 files changed, 26 insertions(+), 16 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/data/LocationData.kt (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 3f973707d..d3b123c7f 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -22,6 +22,7 @@ import at.hannibal2.skyhanni.data.HypixelData import at.hannibal2.skyhanni.data.ItemClickData import at.hannibal2.skyhanni.data.ItemRenderBackground import at.hannibal2.skyhanni.data.ItemTipHelper +import at.hannibal2.skyhanni.data.LocationData import at.hannibal2.skyhanni.data.MayorElection import at.hannibal2.skyhanni.data.MinecraftData import at.hannibal2.skyhanni.data.OtherInventoryData @@ -337,6 +338,7 @@ class SkyHanniMod { loadModule(this) loadModule(ChatManager) loadModule(HypixelData()) + loadModule(LocationData) loadModule(DungeonAPI()) loadModule(ScoreboardData()) loadModule(SeaCreatureFeatures()) diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt index 31bb7c047..8b58086a9 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt @@ -7,24 +7,18 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent -import at.hannibal2.skyhanni.utils.LocationUtils.isPlayerInside import at.hannibal2.skyhanni.utils.LorenzLogger import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.TabListData import net.minecraft.client.Minecraft -import net.minecraft.util.AxisAlignedBB import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.network.FMLNetworkEvent class HypixelData { // TODO USE SH-REPO private val tabListProfilePattern = "§e§lProfile: §r§a(?.*)".toPattern() - private val westVillageFarmArea = AxisAlignedBB(-54.0, 69.0, -115.0, -40.0, 75.0, -127.0) - private val howlingCaveArea = AxisAlignedBB(-401.0, 50.0, -104.0, -337.0, 90.0, 36.0) - private val fakeZealotBruiserHideoutArea = AxisAlignedBB(-520.0, 66.0, -332.0, -558.0, 85.0, -280.0) - private val realZealotBruiserHideoutArea = AxisAlignedBB(-552.0, 50.0, -245.0, -580.0, 72.0, -209.0) companion object { var hypixelLive = false @@ -85,15 +79,7 @@ class HypixelData { .firstOrNull { it.startsWith(" §7⏣ ") || it.startsWith(" §5ф ") } ?.substring(5)?.removeColor() ?: "?" - - skyBlockArea = when { - skyBlockIsland == IslandType.THE_RIFT && westVillageFarmArea.isPlayerInside() -> "Dreadfarm" - skyBlockIsland == IslandType.THE_PARK && howlingCaveArea.isPlayerInside() -> "Howling Cave" - skyBlockIsland == IslandType.THE_END && fakeZealotBruiserHideoutArea.isPlayerInside() -> "The End" - skyBlockIsland == IslandType.THE_END && realZealotBruiserHideoutArea.isPlayerInside() -> "Zealot Bruiser Hideout" - - else -> originalLocation - } + skyBlockArea = LocationData.fixLocation(skyBlockIsland) ?: originalLocation checkProfileName() } @@ -206,4 +192,4 @@ class HypixelData { return scoreboardTitle.contains("SKYBLOCK") || scoreboardTitle.contains("SKIBLOCK") // April 1st jokes are so funny } -} \ No newline at end of file +} diff --git a/src/main/java/at/hannibal2/skyhanni/data/LocationData.kt b/src/main/java/at/hannibal2/skyhanni/data/LocationData.kt new file mode 100644 index 000000000..58ffec3f8 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/data/LocationData.kt @@ -0,0 +1,22 @@ +package at.hannibal2.skyhanni.data + +import at.hannibal2.skyhanni.utils.LocationUtils.isPlayerInside +import net.minecraft.util.AxisAlignedBB + +object LocationData { + private val westVillageFarmArea = AxisAlignedBB(-54.0, 69.0, -115.0, -40.0, 75.0, -127.0) + private val howlingCaveArea = AxisAlignedBB(-401.0, 50.0, -104.0, -337.0, 90.0, 36.0) + private val fakeZealotBruiserHideoutArea = AxisAlignedBB(-520.0, 66.0, -332.0, -558.0, 85.0, -280.0) + private val realZealotBruiserHideoutArea = AxisAlignedBB(-552.0, 50.0, -245.0, -580.0, 72.0, -209.0) + private val leftStronghold = AxisAlignedBB(-463.7, 94.0, -518.3, -435.3, 115.0, -547.7) + + fun fixLocation(skyBlockIsland: IslandType) = when { + skyBlockIsland == IslandType.THE_RIFT && westVillageFarmArea.isPlayerInside() -> "Dreadfarm" + skyBlockIsland == IslandType.THE_PARK && howlingCaveArea.isPlayerInside() -> "Howling Cave" + skyBlockIsland == IslandType.THE_END && fakeZealotBruiserHideoutArea.isPlayerInside() -> "The End" + skyBlockIsland == IslandType.THE_END && realZealotBruiserHideoutArea.isPlayerInside() -> "Zealot Bruiser Hideout" + skyBlockIsland == IslandType.CRIMSON_ISLE && leftStronghold.isPlayerInside() -> "Stronghold" + + else -> null + } +} -- cgit From 74a3ac9c70238a7154637c9c2c01690ae9d538ab Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 11 Nov 2023 15:13:50 +0100 Subject: Added location fixes to repo. --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 4 +-- .../at/hannibal2/skyhanni/config/ConfigManager.kt | 10 +++++++ .../java/at/hannibal2/skyhanni/data/HypixelData.kt | 4 +-- .../java/at/hannibal2/skyhanni/data/IslandType.kt | 7 +++-- .../at/hannibal2/skyhanni/data/LocationData.kt | 22 --------------- .../at/hannibal2/skyhanni/data/LocationFixData.kt | 33 ++++++++++++++++++++++ .../java/at/hannibal2/skyhanni/utils/LorenzVec.kt | 2 ++ .../utils/jsonobjects/LocationFixJson.java | 27 ++++++++++++++++++ 8 files changed, 80 insertions(+), 29 deletions(-) delete mode 100644 src/main/java/at/hannibal2/skyhanni/data/LocationData.kt create mode 100644 src/main/java/at/hannibal2/skyhanni/data/LocationFixData.kt create mode 100644 src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/LocationFixJson.java (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index d3b123c7f..04eb04834 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -22,7 +22,7 @@ import at.hannibal2.skyhanni.data.HypixelData import at.hannibal2.skyhanni.data.ItemClickData import at.hannibal2.skyhanni.data.ItemRenderBackground import at.hannibal2.skyhanni.data.ItemTipHelper -import at.hannibal2.skyhanni.data.LocationData +import at.hannibal2.skyhanni.data.LocationFixData import at.hannibal2.skyhanni.data.MayorElection import at.hannibal2.skyhanni.data.MinecraftData import at.hannibal2.skyhanni.data.OtherInventoryData @@ -338,7 +338,7 @@ class SkyHanniMod { loadModule(this) loadModule(ChatManager) loadModule(HypixelData()) - loadModule(LocationData) + loadModule(LocationFixData) loadModule(DungeonAPI()) loadModule(ScoreboardData()) loadModule(SeaCreatureFeatures()) diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt index 498b2f489..fd185996e 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.config import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.features.fishing.trophy.TrophyRarity import at.hannibal2.skyhanni.features.misc.update.UpdateManager import at.hannibal2.skyhanni.utils.LorenzLogger @@ -95,6 +96,15 @@ class ConfigManager { return LorenzRarity.valueOf(reader.nextString()) } }.nullSafe()) + .registerTypeAdapter(IslandType::class.java, object : TypeAdapter() { + override fun write(out: JsonWriter, value: IslandType) { + out.value(value.name) + } + + override fun read(reader: JsonReader): IslandType { + return IslandType.valueOf(reader.nextString()) + } + }.nullSafe()) .enableComplexMapKeySerialization() .create() } diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt index 8b58086a9..22beb125e 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt @@ -79,7 +79,7 @@ class HypixelData { .firstOrNull { it.startsWith(" §7⏣ ") || it.startsWith(" §5ф ") } ?.substring(5)?.removeColor() ?: "?" - skyBlockArea = LocationData.fixLocation(skyBlockIsland) ?: originalLocation + skyBlockArea = LocationFixData.fixLocation(skyBlockIsland) ?: originalLocation checkProfileName() } @@ -174,7 +174,7 @@ class HypixelData { } private fun getIslandType(newIsland: String, guesting: Boolean): IslandType { - val islandType = IslandType.getBySidebarName(newIsland) + val islandType = IslandType.getByNameOrUnknown(newIsland) if (guesting) { if (islandType == IslandType.PRIVATE_ISLAND) return IslandType.PRIVATE_ISLAND_GUEST if (islandType == IslandType.GARDEN) return IslandType.GARDEN_GUEST diff --git a/src/main/java/at/hannibal2/skyhanni/data/IslandType.kt b/src/main/java/at/hannibal2/skyhanni/data/IslandType.kt index 15195dec4..3ab213025 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/IslandType.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/IslandType.kt @@ -28,8 +28,9 @@ enum class IslandType(val displayName: String, val apiName: String = "null") { ; companion object { - fun getBySidebarName(name: String): IslandType { - return entries.firstOrNull { it.displayName == name } ?: UNKNOWN - } + fun getByNameOrUnknown(name: String) = getByNameOrNull(name) ?: UNKNOWN + fun getByName(name: String) = getByNameOrNull(name) ?: error("IslandType not found: '$name'") + + fun getByNameOrNull(name: String) = entries.firstOrNull { it.displayName == name } } } diff --git a/src/main/java/at/hannibal2/skyhanni/data/LocationData.kt b/src/main/java/at/hannibal2/skyhanni/data/LocationData.kt deleted file mode 100644 index 58ffec3f8..000000000 --- a/src/main/java/at/hannibal2/skyhanni/data/LocationData.kt +++ /dev/null @@ -1,22 +0,0 @@ -package at.hannibal2.skyhanni.data - -import at.hannibal2.skyhanni.utils.LocationUtils.isPlayerInside -import net.minecraft.util.AxisAlignedBB - -object LocationData { - private val westVillageFarmArea = AxisAlignedBB(-54.0, 69.0, -115.0, -40.0, 75.0, -127.0) - private val howlingCaveArea = AxisAlignedBB(-401.0, 50.0, -104.0, -337.0, 90.0, 36.0) - private val fakeZealotBruiserHideoutArea = AxisAlignedBB(-520.0, 66.0, -332.0, -558.0, 85.0, -280.0) - private val realZealotBruiserHideoutArea = AxisAlignedBB(-552.0, 50.0, -245.0, -580.0, 72.0, -209.0) - private val leftStronghold = AxisAlignedBB(-463.7, 94.0, -518.3, -435.3, 115.0, -547.7) - - fun fixLocation(skyBlockIsland: IslandType) = when { - skyBlockIsland == IslandType.THE_RIFT && westVillageFarmArea.isPlayerInside() -> "Dreadfarm" - skyBlockIsland == IslandType.THE_PARK && howlingCaveArea.isPlayerInside() -> "Howling Cave" - skyBlockIsland == IslandType.THE_END && fakeZealotBruiserHideoutArea.isPlayerInside() -> "The End" - skyBlockIsland == IslandType.THE_END && realZealotBruiserHideoutArea.isPlayerInside() -> "Zealot Bruiser Hideout" - skyBlockIsland == IslandType.CRIMSON_ISLE && leftStronghold.isPlayerInside() -> "Stronghold" - - else -> null - } -} diff --git a/src/main/java/at/hannibal2/skyhanni/data/LocationFixData.kt b/src/main/java/at/hannibal2/skyhanni/data/LocationFixData.kt new file mode 100644 index 000000000..2bd6a9dcb --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/data/LocationFixData.kt @@ -0,0 +1,33 @@ +package at.hannibal2.skyhanni.data + +import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.utils.LocationUtils.isPlayerInside +import at.hannibal2.skyhanni.utils.jsonobjects.LocationFixJson +import net.minecraft.util.AxisAlignedBB +import net.minecraftforge.fml.common.eventhandler.EventPriority +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +object LocationFixData { + private var locationFixes = mutableListOf() + + class LocationFix(val island: IslandType, val area: AxisAlignedBB, val realLocation: String) + + // priority set to low so that IslandType can load their island names from repo earlier + @SubscribeEvent(priority = EventPriority.LOW) + fun onRepoReload(event: RepositoryReloadEvent) { + val data = event.getConstant("LocationFix") + locationFixes.clear() + + for (fix in data.locationFixes.values) { + val island = IslandType.getByName(fix.island_name) + val area = fix.a.axisAlignedTo(fix.b) + val realLocation = fix.real_location + + locationFixes.add(LocationFix(island, area, realLocation)) + } + } + + fun fixLocation(skyBlockIsland: IslandType) = locationFixes + .firstOrNull { skyBlockIsland == it.island && it.area.isPlayerInside() } + ?.realLocation +} diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt index 339a16efc..fd38fd441 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt @@ -130,6 +130,8 @@ data class LorenzVec( return LorenzVec(scalar * x, scalar * y, scalar * z) } + fun axisAlignedTo(other: LorenzVec) = AxisAlignedBB(x, y, z, other.x, other.y, other.z) + companion object { fun getFromYawPitch(yaw: Double, pitch: Double): LorenzVec { val yaw: Double = (yaw + 90) * Math.PI / 180 diff --git a/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/LocationFixJson.java b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/LocationFixJson.java new file mode 100644 index 000000000..802627e7a --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/LocationFixJson.java @@ -0,0 +1,27 @@ +package at.hannibal2.skyhanni.utils.jsonobjects; + +import at.hannibal2.skyhanni.utils.LorenzVec; +import com.google.gson.annotations.Expose; + +import java.util.Map; + +public class LocationFixJson { + + @Expose + public Map locationFixes; + + public static class LocationFix { + @Expose + public LorenzVec a; + + @Expose + public LorenzVec b; + + @Expose + public String island_name; + + @Expose + public String real_location; + } + +} -- cgit From eca09ec6ed5cbb5d3990d99ae5658776d192d6af Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 12 Nov 2023 12:08:33 +0100 Subject: 0.21 Beta 23 --- CHANGELOG.md | 7 +++++++ build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/CHANGELOG.md b/CHANGELOG.md index f9e1c15cc..f03902351 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -254,6 +254,11 @@ + Fixed mob highlighting problems with Blaze Slayer and Skytils. - hannibal2 + Pablo Helper: Fixed some messages not showing the "get from sack" clickable message. - hannibal2 + Fixed scoreboard date number suffixes are missing sometimes. - Erymanthus ++ Fixed the leftStronghold area not getting detected. - hannibal2 ++ Fixed error message with Ashfang Blazes. - hannibal2 ++ Fixed crash with pet exp tooltip. - hannibal2 ++ Fixed dungeoneering showing as 0 in the skill menu. - hannibal2 ++ Fixed showing minion level as 101 in some menus. - hannibal2 #### Config @@ -301,6 +306,8 @@ + Added /shdebugtablist + Set your clipboard as a fake tab list. - hannibal2 + /shversion now copies the SkyHanni version into the clipboard as well. - hannibal2 ++ Moved location fixes to the repo. - hannibal2 ++ Added debug information for PetExpTooltip crash. - hannibal2 ## Version 0.20 diff --git a/build.gradle.kts b/build.gradle.kts index 6bb802740..ae38cc693 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.21.Beta.22" +version = "0.21.Beta.23" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 04eb04834..4b33ae5be 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -327,7 +327,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.21.Beta.22", + version = "0.21.Beta.23", ) class SkyHanniMod { @Mod.EventHandler -- cgit From 7218a8f900c29521b152a0e616d7b75cc509840b Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 12 Nov 2023 21:15:34 +0100 Subject: 0.21 --- CHANGELOG.md | 2 +- build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/CHANGELOG.md b/CHANGELOG.md index ebfd678b3..812a00d6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # SkyHanni - Change Log -## Version 0.21 (unreleased) +## Version 0.21 ### New Features diff --git a/build.gradle.kts b/build.gradle.kts index ae38cc693..3b4beaf40 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.21.Beta.23" +version = "0.21" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 4b33ae5be..b299a4af8 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -327,7 +327,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.21.Beta.23", + version = "0.21", ) class SkyHanniMod { @Mod.EventHandler -- cgit From 9598fa32fca88325f326043231519d5325eddaa2 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 15 Nov 2023 18:11:15 +0100 Subject: 0.21.1 Beta 1 --- CHANGELOG.md | 27 ++++++++++++++++++++++ build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 3 files changed, 29 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/CHANGELOG.md b/CHANGELOG.md index 812a00d6c..796b2eb18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,32 @@ # SkyHanni - Change Log +## Version 0.21.11 (unreleased) + + +### Changes + ++ Added mythic/Maeve visitor support. - walker + hannibal2 ++ Added option to use custom Blocks per Second value in some GUIs instead of the real one. - hannibal2 + +### Fixes + +#### Garden Fixes + ++ Fixed new visitor alerts triggering wrongly and constantly. - Cad ++ Fixed visitor timer. - hannibal2**** ++ Fixed wrong Fungi Cutter mode warning not working. - walker ++ Fixed Maximum FF Needed display not showing in Jacob NPC menu. - hannibal2 ++ Fixed calendar contest detection failing. - hannibal2 ++ Fixed plot borders flickering and consistency errors when pressing the keybind - hannibal2 ++ Fixed wrong ff needed values in Time Needed for Gold Medal GUI. - hannibal2 ++ Fixed Farming Contest Medal Icons in Inventory not showing. - hannibal2 + +#### Other Fixes + ++ Fixed showing "slayer boss spawn soon" message outside the correct slayer area. - hannibal2 ++ Fixed blocking clicks on bazaar with player name "wiki". - hannibal2 ++ Fixed highlighting some mobs in the dungeon wrongly as area mini bosses. - hannibal2 + ## Version 0.21 ### New Features diff --git a/build.gradle.kts b/build.gradle.kts index 3b4beaf40..31a1dee5a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.21" +version = "0.21.1.Beta.1" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index b299a4af8..84bbb2e26 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -327,7 +327,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.21", + version = "0.21.1.Beta.1", ) class SkyHanniMod { @Mod.EventHandler -- cgit From 024cd40a3a3e98da87a1ce6eaaebd379f312cc72 Mon Sep 17 00:00:00 2001 From: Walker Selby Date: Thu, 16 Nov 2023 10:40:55 +0000 Subject: Config Updates - Subcategories and Reformatting (#709) Added new sub category stuff from moul config #709 --- build.gradle.kts | 4 +- gradle/libs.versions.toml | 4 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- .../skyhanni/config/ConfigUpdaterMigrator.kt | 2 +- .../at/hannibal2/skyhanni/config/Features.java | 40 +- .../skyhanni/config/features/BazaarConfig.java | 43 - .../skyhanni/config/features/ChatConfig.java | 212 --- .../skyhanni/config/features/ChromaConfig.java | 62 - .../skyhanni/config/features/CombatConfig.java | 721 ---------- .../skyhanni/config/features/CommandsConfig.java | 115 -- .../config/features/CrimsonIsleConfig.java | 157 --- .../skyhanni/config/features/DevConfig.java | 225 --- .../skyhanni/config/features/DungeonConfig.java | 256 ---- .../skyhanni/config/features/EventConfig.java | 421 ------ .../skyhanni/config/features/FishingConfig.java | 309 ---- .../skyhanni/config/features/GUIConfig.java | 174 --- .../skyhanni/config/features/GardenConfig.java | 1488 -------------------- .../skyhanni/config/features/InventoryConfig.java | 480 ------- .../config/features/ItemAbilityConfig.java | 74 - .../config/features/MarkedPlayerConfig.java | 24 - .../skyhanni/config/features/MiningConfig.java | 128 -- .../skyhanni/config/features/MinionsConfig.java | 96 -- .../skyhanni/config/features/MiscConfig.java | 834 ----------- .../skyhanni/config/features/RiftConfig.java | 720 ---------- .../skyhanni/config/features/SlayerConfig.java | 529 ------- .../config/features/bazaar/BazaarConfig.java | 43 + .../skyhanni/config/features/chat/ChatConfig.java | 91 ++ .../skyhanni/config/features/chat/ChatSymbols.java | 24 + .../config/features/chat/CompactPotionConfig.java | 20 + .../config/features/chat/FilterTypesConfig.java | 83 ++ .../config/features/chat/PlayerMessagesConfig.java | 21 + .../config/features/chroma/ChromaConfig.java | 62 + .../config/features/combat/BestiaryConfig.java | 48 + .../config/features/combat/CombatConfig.java | 47 + .../config/features/combat/EnderNodeConfig.java | 64 + .../config/features/combat/MobsConfig.java | 94 ++ .../config/features/combat/SummoningsConfig.java | 38 + .../damageindicator/DamageIndicatorConfig.java | 102 ++ .../combat/damageindicator/EnderSlayerConfig.java | 18 + .../damageindicator/VampireSlayerConfig.java | 23 + .../combat/ghostcounter/GhostCounterConfig.java | 96 ++ .../textformatting/BestiaryFormattingConfig.java | 41 + .../textformatting/ETAFormattingConfig.java | 42 + .../textformatting/KillHourFormattingConfig.java | 24 + .../textformatting/TextFormattingConfig.java | 148 ++ .../textformatting/XPHourFormattingConfig.java | 26 + .../config/features/commands/CommandsConfig.java | 39 + .../features/commands/FandomWikiCommandConfig.java | 27 + .../features/commands/TabCompleteConfig.java | 61 + .../features/crimsonisle/CrimsonIsleConfig.java | 34 + .../crimsonisle/ReputationHelperConfig.java | 38 + .../crimsonisle/ashfang/AshfangConfig.java | 50 + .../crimsonisle/ashfang/BlazingSoulsColor.java | 21 + .../crimsonisle/ashfang/GravityOrbsConfig.java | 21 + .../crimsonisle/ashfang/HideAshfangConfig.java | 27 + .../skyhanni/config/features/dev/DebugConfig.java | 88 ++ .../skyhanni/config/features/dev/DevConfig.java | 46 + .../config/features/dev/WaypointsConfig.java | 26 + .../dev/minecraftconsole/ConsoleFiltersConfig.java | 53 + .../minecraftconsole/MinecraftConsoleConfig.java | 40 + .../config/features/dungeon/CleanEndConfig.java | 21 + .../config/features/dungeon/DungeonConfig.java | 102 ++ .../features/dungeon/DungeonCopilotConfig.java | 18 + .../config/features/dungeon/LividFinderConfig.java | 20 + .../features/dungeon/MessageFilterConfig.java | 14 + .../config/features/dungeon/ObjectHiderConfig.java | 65 + .../config/features/dungeon/PartyFinderConfig.java | 44 + .../config/features/dungeon/TabListConfig.java | 15 + .../config/features/event/CenturyConfig.java | 24 + .../config/features/event/CityProjectConfig.java | 31 + .../config/features/event/EventConfig.java | 51 + .../config/features/event/GreatSpookConfig.java | 44 + .../features/event/HalloweenBasketConfig.java | 25 + .../config/features/event/MayorJerryConfig.java | 16 + .../features/event/bingo/BingoCardConfig.java | 45 + .../config/features/event/bingo/BingoConfig.java | 30 + .../features/event/bingo/CompactChatConfig.java | 27 + .../config/features/event/diana/DianaConfig.java | 60 + .../features/event/diana/IgnoredWarpsConfig.java | 19 + .../event/diana/InquisitorSharingConfig.java | 37 + .../event/winter/FrozenTreasureConfig.java | 72 + .../config/features/event/winter/WinterConfig.java | 26 + .../config/features/fishing/BarnTimerConfig.java | 62 + .../features/fishing/ChumBucketHiderConfig.java | 26 + .../features/fishing/FishedItemNameConfig.java | 21 + .../fishing/FishingBaitWarningsConfig.java | 20 + .../config/features/fishing/FishingConfig.java | 76 + .../features/fishing/FishingHookDisplayConfig.java | 27 + .../config/features/fishing/RareCatchesConfig.java | 32 + .../features/fishing/ThunderSparkConfig.java | 20 + .../fishing/trophyfishing/ChatMessagesConfig.java | 56 + .../fishing/trophyfishing/TrophyFishingConfig.java | 27 + .../config/features/garden/AnitaShopConfig.java | 30 + .../features/garden/CropStartLocationConfig.java | 16 + .../config/features/garden/DicerCounterConfig.java | 24 + .../features/garden/EliteFarmingWeightConfig.java | 53 + .../features/garden/FarmingArmorDropsConfig.java | 24 + .../features/garden/FarmingFortuneConfig.java | 36 + .../config/features/garden/GardenConfig.java | 205 +++ .../config/features/garden/GardenLevelConfig.java | 18 + .../config/features/garden/KeyBindConfig.java | 87 ++ .../config/features/garden/MoneyPerHourConfig.java | 126 ++ .../features/garden/NextJacobContestConfig.java | 59 + .../config/features/garden/NumbersConfig.java | 32 + .../config/features/garden/PlotIconConfig.java | 24 + .../config/features/garden/SkyMartConfig.java | 23 + .../features/garden/TooltipTweaksConfig.java | 47 + .../features/garden/YawPitchDisplayConfig.java | 64 + .../features/garden/composter/ComposterConfig.java | 108 ++ .../features/garden/composter/NotifyLowConfig.java | 38 + .../cropmilestones/CropMilestonesConfig.java | 101 ++ .../cropmilestones/MushroomPetPerkConfig.java | 43 + .../features/garden/cropmilestones/NextConfig.java | 66 + .../garden/optimalspeed/CustomSpeedConfig.java | 79 ++ .../garden/optimalspeed/OptimalSpeedConfig.java | 39 + .../garden/visitor/DropsStatisticsConfig.java | 78 + .../features/garden/visitor/InventoryConfig.java | 37 + .../features/garden/visitor/NeedsConfig.java | 40 + .../garden/visitor/RewardWarningConfig.java | 62 + .../features/garden/visitor/TimerConfig.java | 37 + .../features/garden/visitor/VisitorConfig.java | 118 ++ .../skyhanni/config/features/gui/GUIConfig.java | 74 + .../config/features/gui/InGameDateConfig.java | 63 + .../config/features/gui/ModifyWordsConfig.java | 28 + .../config/features/gui/TextBoxConfig.java | 26 + .../features/inventory/ChestValueConfig.java | 88 ++ .../features/inventory/HideNotClickableConfig.java | 43 + .../config/features/inventory/InventoryConfig.java | 127 ++ .../inventory/JacobFarmingContestConfig.java | 32 + .../config/features/inventory/RngMeterConfig.java | 26 + .../features/inventory/SackDisplayConfig.java | 84 ++ .../features/inventory/StatsTuningConfig.java | 32 + .../inventory/helper/HarpConfigKeyBinds.java | 37 + .../features/inventory/helper/HelperConfig.java | 37 + .../features/inventory/helper/TiaRelayConfig.java | 32 + .../features/itemability/ChickenHeadConfig.java | 25 + .../features/itemability/FireVeilWandConfig.java | 21 + .../features/itemability/ItemAbilityConfig.java | 38 + .../features/markedplayer/MarkedPlayerConfig.java | 24 + .../config/features/mining/KingTalismanConfig.java | 25 + .../config/features/mining/MiningConfig.java | 32 + .../features/mining/PowderTrackerConfig.java | 84 ++ .../config/features/minion/EmptiedTimeConfig.java | 27 + .../features/minion/LastClickedMinionConfig.java | 36 + .../config/features/minion/MinionsConfig.java | 46 + .../config/features/misc/DiscordRPCConfig.java | 97 ++ .../features/misc/EstimatedItemValueConfig.java | 52 + .../features/misc/GlowingDroppedItemsConfig.java | 26 + .../config/features/misc/HideArmorConfig.java | 20 + .../features/misc/HighlightPartyMembersConfig.java | 25 + .../config/features/misc/KickDurationConfig.java | 34 + .../skyhanni/config/features/misc/MiscConfig.java | 209 +++ .../config/features/misc/ParticleHiderConfig.java | 50 + .../features/misc/PocketSackInASackConfig.java | 21 + .../config/features/misc/PotionEffectsConfig.java | 24 + .../features/misc/QuickModMenuSwitchConfig.java | 29 + .../config/features/misc/TeleportPadConfig.java | 21 + .../features/misc/TrevorTheTrapperConfig.java | 110 ++ .../compacttablist/AdvancedPlayerListConfig.java | 73 + .../misc/compacttablist/CompactTabListConfig.java | 27 + .../features/misc/cosmetic/ArrowTrailConfig.java | 46 + .../features/misc/cosmetic/CosmeticConfig.java | 18 + .../misc/cosmetic/FollowingLineConfig.java | 37 + .../config/features/misc/pets/PetConfig.java | 24 + .../misc/pets/PetExperienceToolTipConfig.java | 27 + .../features/rift/CruxTalismanDisplayConfig.java | 30 + .../config/features/rift/EnigmaSoulConfig.java | 22 + .../config/features/rift/MotesOrbsConfig.java | 28 + .../skyhanni/config/features/rift/RiftConfig.java | 53 + .../config/features/rift/RiftTimerConfig.java | 30 + .../config/features/rift/area/RiftAreasConfig.java | 60 + .../rift/area/colosseum/ColosseumConfig.java | 15 + .../rift/area/dreadfarm/DreadfarmConfig.java | 26 + .../rift/area/dreadfarm/VoltCruxConfig.java | 33 + .../rift/area/dreadfarm/WiltedBerberisConfig.java | 26 + .../rift/area/livingcave/DefenseBlockConfig.java | 29 + .../rift/area/livingcave/LivingCaveConfig.java | 23 + .../livingcave/LivingCaveLivingMetalConfig.java | 22 + .../livingcave/LivingMetalSuitProgressConfig.java | 24 + .../rift/area/mirrorverse/LavaMazeConfig.java | 39 + .../rift/area/mirrorverse/MirrorVerseConfig.java | 29 + .../rift/area/mirrorverse/TubulatorConfig.java | 44 + .../area/mirrorverse/UpsideDownParkourConfig.java | 44 + .../danceroomhelper/DanceRoomHelperConfig.java | 48 + .../danceroomformatting/ColorConfig.java | 42 + .../DanceRoomFormattingConfig.java | 29 + .../rift/area/stillgorechateau/EffigiesConfig.java | 37 + .../stillgorechateau/StillgoreChateauConfig.java | 14 + .../rift/area/westvillage/KloonHackingConfig.java | 27 + .../rift/area/westvillage/WestVillageConfig.java | 13 + .../features/rift/area/wyldwoods/LarvasConfig.java | 22 + .../rift/area/wyldwoods/OdonataConfig.java | 23 + .../rift/area/wyldwoods/WyldWoodsConfig.java | 27 + .../features/rift/motes/InventoryValueConfig.java | 25 + .../config/features/rift/motes/MotesConfig.java | 27 + .../features/slayer/ItemProfitTrackerConfig.java | 50 + .../features/slayer/ItemsOnGroundConfig.java | 21 + .../features/slayer/RngMeterDisplayConfig.java | 30 + .../features/slayer/SlayerBossWarningConfig.java | 26 + .../config/features/slayer/SlayerConfig.java | 77 + .../config/features/slayer/blaze/BlazeConfig.java | 32 + .../features/slayer/blaze/BlazeHellionConfig.java | 45 + .../slayer/endermen/EndermanBeaconConfig.java | 46 + .../features/slayer/endermen/EndermanConfig.java | 31 + .../features/slayer/vampire/BloodIchorConfig.java | 38 + .../slayer/vampire/CoopBossHighlightConfig.java | 44 + .../slayer/vampire/KillerSpringConfig.java | 31 + .../features/slayer/vampire/OthersBossConfig.java | 39 + .../features/slayer/vampire/OwnBossConfig.java | 39 + .../features/slayer/vampire/VampireConfig.java | 80 ++ .../skyhanni/features/cosmetics/ArrowTrail.kt | 2 +- .../features/cosmetics/CosmeticFollowingLine.kt | 10 +- .../visitor/HighlightVisitorsOutsideOfGarden.kt | 2 +- .../garden/visitor/VisitorTooltipParser.kt | 10 +- .../skyhanni/features/misc/CurrentPetDisplay.kt | 3 +- .../at/hannibal2/skyhanni/features/rift/RiftAPI.kt | 2 +- .../skyhanni/features/rift/area/RiftLarva.kt | 49 - .../rift/area/colosseum/BlobbercystsHighlight.kt | 10 +- .../rift/area/dreadfarm/RiftAgaricusCap.kt | 8 +- .../area/dreadfarm/RiftWiltedBerberisHelper.kt | 2 +- .../rift/area/dreadfarm/VoltHighlighter.kt | 4 +- .../area/livingcave/LivingCaveDefenseBlocks.kt | 8 +- .../area/livingcave/LivingCaveLivingMetalHelper.kt | 2 +- .../area/livingcave/LivingMetalSuitProgress.kt | 4 +- .../rift/area/mirrorverse/DanceRoomHelper.kt | 8 +- .../rift/area/mirrorverse/RiftLavaMazeParkour.kt | 2 +- .../rift/area/mirrorverse/RiftUpsideDownParkour.kt | 2 +- .../rift/area/mirrorverse/TubulatorParkour.kt | 2 +- .../area/stillgorechateau/RiftBloodEffigies.kt | 8 +- .../features/rift/area/westvillage/KloonHacking.kt | 8 +- .../features/rift/area/wyldwoods/RiftLarva.kt | 49 + .../features/rift/area/wyldwoods/RiftOdonata.kt | 2 +- .../rift/area/wyldwoods/ShyCruxWarnings.kt | 10 +- .../features/rift/everywhere/motes/RiftMotesOrb.kt | 8 +- .../features/slayer/VampireSlayerFeatures.kt | 8 +- .../slayer/enderman/EndermanSlayerFeatures.kt | 3 +- .../test/garden/VisitorToolTipParserTest.kt | 16 +- 237 files changed, 8392 insertions(+), 7180 deletions(-) delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/BazaarConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/ChromaConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/CombatConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/CommandsConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/CrimsonIsleConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/DevConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/DungeonConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/EventConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/GUIConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/GardenConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/ItemAbilityConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/MarkedPlayerConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/MiningConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/MinionsConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/RiftConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/SlayerConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/bazaar/BazaarConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/chat/ChatConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/chat/ChatSymbols.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/chat/CompactPotionConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/chat/PlayerMessagesConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/chroma/ChromaConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/combat/BestiaryConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/combat/CombatConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/combat/EnderNodeConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/combat/MobsConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/combat/SummoningsConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/combat/damageindicator/DamageIndicatorConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/combat/damageindicator/EnderSlayerConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/combat/damageindicator/VampireSlayerConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/GhostCounterConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/BestiaryFormattingConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/ETAFormattingConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/KillHourFormattingConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/TextFormattingConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/XPHourFormattingConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/commands/CommandsConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/commands/FandomWikiCommandConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/commands/TabCompleteConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/CrimsonIsleConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ReputationHelperConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ashfang/AshfangConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ashfang/BlazingSoulsColor.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ashfang/GravityOrbsConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ashfang/HideAshfangConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/dev/WaypointsConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/dev/minecraftconsole/ConsoleFiltersConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/dev/minecraftconsole/MinecraftConsoleConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/dungeon/CleanEndConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonCopilotConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/dungeon/LividFinderConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/dungeon/MessageFilterConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/dungeon/ObjectHiderConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/dungeon/PartyFinderConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/dungeon/TabListConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/event/CenturyConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/event/CityProjectConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/event/EventConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/event/GreatSpookConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/event/HalloweenBasketConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/event/MayorJerryConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/event/bingo/BingoCardConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/event/bingo/BingoConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/event/bingo/CompactChatConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/event/diana/DianaConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/event/diana/IgnoredWarpsConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/event/diana/InquisitorSharingConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/event/winter/FrozenTreasureConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/event/winter/WinterConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/fishing/BarnTimerConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/fishing/ChumBucketHiderConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishedItemNameConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishingBaitWarningsConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishingConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishingHookDisplayConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/fishing/RareCatchesConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/fishing/ThunderSparkConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/ChatMessagesConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishingConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/AnitaShopConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/CropStartLocationConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/DicerCounterConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/EliteFarmingWeightConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/FarmingArmorDropsConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/FarmingFortuneConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenLevelConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/KeyBindConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/MoneyPerHourConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/NextJacobContestConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/NumbersConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/PlotIconConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/SkyMartConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/TooltipTweaksConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/YawPitchDisplayConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/composter/ComposterConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/composter/NotifyLowConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/cropmilestones/CropMilestonesConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/cropmilestones/MushroomPetPerkConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/cropmilestones/NextConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/optimalspeed/CustomSpeedConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/optimalspeed/OptimalSpeedConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/DropsStatisticsConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/InventoryConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/NeedsConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/RewardWarningConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/TimerConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/VisitorConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/gui/GUIConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/gui/InGameDateConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/gui/ModifyWordsConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/gui/TextBoxConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/inventory/ChestValueConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/inventory/HideNotClickableConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/inventory/JacobFarmingContestConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/inventory/RngMeterConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/inventory/SackDisplayConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/inventory/StatsTuningConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/HarpConfigKeyBinds.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/HelperConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/TiaRelayConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/itemability/ChickenHeadConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/itemability/FireVeilWandConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/itemability/ItemAbilityConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/markedplayer/MarkedPlayerConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/mining/KingTalismanConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderTrackerConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/minion/EmptiedTimeConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/minion/LastClickedMinionConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/minion/MinionsConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/DiscordRPCConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/EstimatedItemValueConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/GlowingDroppedItemsConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/HideArmorConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/HighlightPartyMembersConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/KickDurationConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/ParticleHiderConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/PocketSackInASackConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/PotionEffectsConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/QuickModMenuSwitchConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/TeleportPadConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/TrevorTheTrapperConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/compacttablist/AdvancedPlayerListConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/compacttablist/CompactTabListConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/cosmetic/ArrowTrailConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/cosmetic/CosmeticConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/cosmetic/FollowingLineConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/pets/PetConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/pets/PetExperienceToolTipConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/CruxTalismanDisplayConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/EnigmaSoulConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/MotesOrbsConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/RiftConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/RiftTimerConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/RiftAreasConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/colosseum/ColosseumConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/dreadfarm/DreadfarmConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/dreadfarm/VoltCruxConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/dreadfarm/WiltedBerberisConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/livingcave/DefenseBlockConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/livingcave/LivingCaveConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/livingcave/LivingCaveLivingMetalConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/livingcave/LivingMetalSuitProgressConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/LavaMazeConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/MirrorVerseConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/TubulatorConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/UpsideDownParkourConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/danceroomhelper/DanceRoomHelperConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/danceroomhelper/danceroomformatting/ColorConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/danceroomhelper/danceroomformatting/DanceRoomFormattingConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/stillgorechateau/EffigiesConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/stillgorechateau/StillgoreChateauConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/westvillage/KloonHackingConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/westvillage/WestVillageConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/wyldwoods/LarvasConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/wyldwoods/OdonataConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/area/wyldwoods/WyldWoodsConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/motes/InventoryValueConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/rift/motes/MotesConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/slayer/ItemProfitTrackerConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/slayer/ItemsOnGroundConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/slayer/RngMeterDisplayConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/slayer/SlayerBossWarningConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/slayer/SlayerConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/slayer/blaze/BlazeConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/slayer/blaze/BlazeHellionConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/slayer/endermen/EndermanBeaconConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/slayer/endermen/EndermanConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/BloodIchorConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/CoopBossHighlightConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/KillerSpringConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/OthersBossConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/OwnBossConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/VampireConfig.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/features/rift/area/RiftLarva.kt create mode 100644 src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftLarva.kt (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/build.gradle.kts b/build.gradle.kts index 31a1dee5a..262d7f769 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -81,7 +81,7 @@ dependencies { exclude(module = "unspecified") isTransitive = false } - devenvMod("com.github.NotEnoughUpdates:NotEnoughUpdates:v2.1.1-alpha22:all") { + devenvMod("com.github.NotEnoughUpdates:NotEnoughUpdates:v2.1.1-pre4:all") { exclude(module = "unspecified") isTransitive = false } @@ -93,7 +93,7 @@ dependencies { shadowImpl("org.jetbrains.kotlin:kotlin-reflect:1.9.0") // testImplementation(kotlin("test")) - testImplementation("com.github.NotEnoughUpdates:NotEnoughUpdates:v2.1.1-alpha22:all") { + testImplementation("com.github.NotEnoughUpdates:NotEnoughUpdates:v2.1.1-pre4:all") { exclude(module = "unspecified") isTransitive = false } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fe51b0357..6ab6ad03f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] libautoupdate = "1.0.3" -moulconfig = "1.3.0" +moulconfig = "2.4.0" [libraries] -moulconfig = { module = "org.notenoughupdates.moulconfig:MoulConfig", version.ref = "moulconfig" } +moulconfig = { module = "org.notenoughupdates.moulconfig:legacy", version.ref = "moulconfig" } libautoupdate = { module = "moe.nea:libautoupdate", version.ref = "libautoupdate" } diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 84bbb2e26..5309a4e2e 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -249,7 +249,7 @@ import at.hannibal2.skyhanni.features.nether.ashfang.AshfangHideParticles import at.hannibal2.skyhanni.features.nether.ashfang.AshfangNextResetCooldown import at.hannibal2.skyhanni.features.nether.reputationhelper.CrimsonIsleReputationHelper import at.hannibal2.skyhanni.features.rift.RiftAPI -import at.hannibal2.skyhanni.features.rift.area.RiftLarva +import at.hannibal2.skyhanni.features.rift.area.wyldwoods.RiftLarva import at.hannibal2.skyhanni.features.rift.area.colosseum.BlobbercystsHighlight import at.hannibal2.skyhanni.features.rift.area.dreadfarm.RiftAgaricusCap import at.hannibal2.skyhanni.features.rift.area.dreadfarm.RiftWiltedBerberisHelper diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt index 19b77abf3..6227b0ea9 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt @@ -9,7 +9,7 @@ import com.google.gson.JsonPrimitive object ConfigUpdaterMigrator { val logger = LorenzLogger("ConfigMigration") - const val CONFIG_VERSION = 8 + const val CONFIG_VERSION = 9 fun JsonElement.at(chain: List, init: Boolean): JsonElement? { if (chain.isEmpty()) return this if (this !is JsonObject) return null diff --git a/src/main/java/at/hannibal2/skyhanni/config/Features.java b/src/main/java/at/hannibal2/skyhanni/config/Features.java index 33d766fdf..4085eb069 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Features.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Features.java @@ -2,26 +2,26 @@ package at.hannibal2.skyhanni.config; import at.hannibal2.skyhanni.SkyHanniMod; import at.hannibal2.skyhanni.config.features.About; -import at.hannibal2.skyhanni.config.features.BazaarConfig; -import at.hannibal2.skyhanni.config.features.ChatConfig; -import at.hannibal2.skyhanni.config.features.ChromaConfig; -import at.hannibal2.skyhanni.config.features.CombatConfig; -import at.hannibal2.skyhanni.config.features.CommandsConfig; -import at.hannibal2.skyhanni.config.features.CrimsonIsleConfig; -import at.hannibal2.skyhanni.config.features.DevConfig; -import at.hannibal2.skyhanni.config.features.DungeonConfig; -import at.hannibal2.skyhanni.config.features.EventConfig; -import at.hannibal2.skyhanni.config.features.FishingConfig; -import at.hannibal2.skyhanni.config.features.GUIConfig; -import at.hannibal2.skyhanni.config.features.GardenConfig; -import at.hannibal2.skyhanni.config.features.InventoryConfig; -import at.hannibal2.skyhanni.config.features.ItemAbilityConfig; -import at.hannibal2.skyhanni.config.features.MarkedPlayerConfig; -import at.hannibal2.skyhanni.config.features.MiningConfig; -import at.hannibal2.skyhanni.config.features.MinionsConfig; -import at.hannibal2.skyhanni.config.features.MiscConfig; -import at.hannibal2.skyhanni.config.features.RiftConfig; -import at.hannibal2.skyhanni.config.features.SlayerConfig; +import at.hannibal2.skyhanni.config.features.bazaar.BazaarConfig; +import at.hannibal2.skyhanni.config.features.chat.ChatConfig; +import at.hannibal2.skyhanni.config.features.chroma.ChromaConfig; +import at.hannibal2.skyhanni.config.features.combat.CombatConfig; +import at.hannibal2.skyhanni.config.features.commands.CommandsConfig; +import at.hannibal2.skyhanni.config.features.crimsonisle.CrimsonIsleConfig; +import at.hannibal2.skyhanni.config.features.dev.DevConfig; +import at.hannibal2.skyhanni.config.features.dungeon.DungeonConfig; +import at.hannibal2.skyhanni.config.features.event.EventConfig; +import at.hannibal2.skyhanni.config.features.fishing.FishingConfig; +import at.hannibal2.skyhanni.config.features.gui.GUIConfig; +import at.hannibal2.skyhanni.config.features.garden.GardenConfig; +import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig; +import at.hannibal2.skyhanni.config.features.itemability.ItemAbilityConfig; +import at.hannibal2.skyhanni.config.features.markedplayer.MarkedPlayerConfig; +import at.hannibal2.skyhanni.config.features.mining.MiningConfig; +import at.hannibal2.skyhanni.config.features.minion.MinionsConfig; +import at.hannibal2.skyhanni.config.features.misc.MiscConfig; +import at.hannibal2.skyhanni.config.features.rift.RiftConfig; +import at.hannibal2.skyhanni.config.features.slayer.SlayerConfig; import com.google.gson.annotations.Expose; import io.github.moulberry.moulconfig.Config; import io.github.moulberry.moulconfig.Social; diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/BazaarConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/BazaarConfig.java deleted file mode 100644 index b02c0ef40..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/BazaarConfig.java +++ /dev/null @@ -1,43 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import at.hannibal2.skyhanni.config.FeatureToggle; -import at.hannibal2.skyhanni.config.core.config.Position; -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigOption; - -public class BazaarConfig { - - @Expose - @ConfigOption(name = "Purchase Helper", desc = "Highlights the item you are trying to buy in the Bazaar.") - @ConfigEditorBoolean - @FeatureToggle - public boolean purchaseHelper = true; - - @Expose - @ConfigOption(name = "Order Helper", desc = "Show visual hints inside the Bazaar Manage Order view when items are ready to pickup or outbid.") - @ConfigEditorBoolean - @FeatureToggle - public boolean orderHelper = false; - - @Expose - @ConfigOption(name = "Best Sell Method", desc = "Show the price difference between sell instantly and sell offer.") - @ConfigEditorBoolean - @FeatureToggle - public boolean bestSellMethod = false; - - @Expose - public Position bestSellMethodPos = new Position(394, 142, false, true); - - @Expose - @ConfigOption(name = "Cancelled Buy Order Clipboard", desc = "Saves missing items from cancelled buy orders to clipboard for faster re-entry.") - @ConfigEditorBoolean - @FeatureToggle - public boolean cancelledBuyOrderClipboard = false; - - @Expose - @ConfigOption(name = "Price Website", desc = "Adds a button to the Bazaar product inventory that will open the item page in §cskyblock.bz§7.") - @ConfigEditorBoolean - @FeatureToggle - public boolean openPriceWebsite = false; -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java deleted file mode 100644 index 9ce9cc5a3..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java +++ /dev/null @@ -1,212 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import at.hannibal2.skyhanni.config.FeatureToggle; -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; -import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; -import io.github.moulberry.moulconfig.annotations.ConfigOption; -import org.lwjgl.input.Keyboard; - -public class ChatConfig { - - @Expose - @ConfigOption(name = "Peek Chat", desc = "Hold this key to keep the chat open.") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_Z) - public int peekChat = Keyboard.KEY_Z; - - @Expose - @ConfigOption(name = "Chat Filter Types", desc = "") - @Accordion - public FilterTypesConfig filterType = new FilterTypesConfig(); - - public static class FilterTypesConfig { - @Expose - @ConfigOption(name = "Hypixel Hub", desc = "Block messages outside SkyBlock in the Hypixel lobby: player joins, loot boxes, prototype lobby messages, radiating generosity and Hypixel tournaments.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hypixelHub = true; - - @Expose - @ConfigOption(name = "Empty", desc = "Hide all the empty messages from the chat.") - @ConfigEditorBoolean - @FeatureToggle - public boolean empty = true; - - @Expose - @ConfigOption(name = "Warping", desc = "Block 'Sending request to join...' and 'Warping...' messages.") - @ConfigEditorBoolean - @FeatureToggle - public boolean warping = true; - - @Expose - @ConfigOption(name = "Welcome", desc = "Hide the 'Welcome to SkyBlock' message.") - @ConfigEditorBoolean - @FeatureToggle - public boolean welcome = true; - - @Expose - @ConfigOption(name = "Guild Exp", desc = "Hide Guild EXP messages.") - @ConfigEditorBoolean - @FeatureToggle - public boolean guildExp = true; - - @Expose - @ConfigOption(name = "Friend Join Left", desc = "Hide friend join/left messages.") - @ConfigEditorBoolean - @FeatureToggle - public boolean friendJoinLeft = false; - - @Expose - @ConfigOption(name = "Winter Gifts", desc = "Hide useless Winter Gift messages.") - @ConfigEditorBoolean - @FeatureToggle - public boolean winterGift = false; - - @Expose - @ConfigOption(name = "Powder Mining", desc = "Hide messages while opening chests in the Crystal Hollows. " + - "(Except powder numbers over 1k, essence numbers over 2, Prehistoric Eggs, and Automaton Parts)") - @ConfigEditorBoolean - @FeatureToggle - public boolean powderMining = true; - - @Expose - @ConfigOption(name = "Kill Combo", desc = "Hide messages about the current Kill Combo from the Grandma Wolf Pet.") - @ConfigEditorBoolean - @FeatureToggle - public boolean killCombo = false; - - @Expose - @ConfigOption(name = "Watchdog", desc = "Hide the message where Hypixel is flexing how many players they have banned over the last week.") - @ConfigEditorBoolean - @FeatureToggle - public boolean watchDog = true; - - @Expose - @ConfigOption(name = "Profile Join", desc = "Hide 'You are playing on profile' and 'Profile ID' chat messages.") - @ConfigEditorBoolean - @FeatureToggle - public boolean profileJoin = true; - - //TODO remove - @Expose - @ConfigOption(name = "Others", desc = "Hide other annoying messages.") - @ConfigEditorBoolean - @FeatureToggle - public boolean others = false; - } - - @Expose - @ConfigOption(name = "Player Messages", desc = "") - @Accordion - public PlayerMessagesConfig playerMessage = new PlayerMessagesConfig(); - - public static class PlayerMessagesConfig { - @Expose - @ConfigOption(name = "Player Rank Hider", desc = "Hide player ranks in all chat messages.") - @ConfigEditorBoolean - @FeatureToggle - public boolean playerRankHider = false; - - @Expose - @ConfigOption(name = "Chat Filter", desc = "Scan messages sent by players for blacklisted words and gray out the message if any are found.") - @ConfigEditorBoolean - @FeatureToggle - public boolean chatFilter = false; - } - - @Expose - @ConfigOption(name = "Player Chat Symbols", desc = "") - @Accordion - public ChatSymbols chatSymbols = new ChatSymbols(); - - public static class ChatSymbols { - - @Expose - @ConfigOption(name = "Enabled", desc = "Adds extra symbols to the chat such as those from ironman, " + - "stranded, bingo or nether factions and places them next to your regular player emblems. " + - "§cDoes not work with hide rank hider!") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Chat Symbol Location", desc = "Determines where the symbols should go in chat in relation to the " + - "player's name. Hidden will hide all emblems from the chat. §eRequires above setting to be on to hide the symbols.") - @ConfigEditorDropdown(values = {"Left", "Right", "Hidden"}) - public int symbolLocation = 0; - } - - @Expose - @ConfigOption(name = "Dungeon Filter", desc = "Hide annoying messages in Dungeons.") - @ConfigEditorBoolean - @FeatureToggle - public boolean dungeonMessages = true; - - @Expose - @ConfigOption(name = "Dungeon Boss Messages", desc = "Hide messages from the Watcher and bosses in the Dungeon.") - @ConfigEditorBoolean - @FeatureToggle - public boolean dungeonBossMessages = false; - - @Expose - @ConfigOption(name = "Hide Far Deaths", desc = "Hide other players' death messages, " + - "except for players who are nearby or during Dungeons/a Kuudra fight.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideFarDeathMessages = false; - //TODO jawbus + thunder - - @Expose - @ConfigOption(name = "Compact Potion Messages", desc = "") - @Accordion - public CompactPotionConfig compactPotionMessages = new CompactPotionConfig(); - - public static class CompactPotionConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Shorten chat messages about player potion effects.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Clickable Chat Message", desc = "Makes the Compact Potion message open the Potion effects menu on click.") - @ConfigEditorBoolean - public boolean clickableChatMessage = true; - } - - @Expose - @ConfigOption(name = "Compact Bestiary Message", desc = "Shorten the Bestiary level up message, showing additional information when hovering.") - @ConfigEditorBoolean - @FeatureToggle - public boolean compactBestiaryMessage = true; - - @Expose - @ConfigOption(name = "Arachne Hider", desc = "Hide chat messages about the Arachne Fight while outside of §eArachne's Sanctuary§7.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideArachneMessages = false; - - @Expose - @ConfigOption( - name = "Sacks Hider", - desc = "Hide the chat's sack change message with this, " + - "not in Hypixel settings, for mods to access sack data in new features." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean hideSacksChange = false; - - @Expose - @ConfigOption( - name = "Translator", - desc = "Click on a message to translate it into English. " + - "Use §e/shcopytranslation§7 to get the translation from English. " + - "§cTranslation is not guaranteed to be 100% accurate." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean translator = false; -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/ChromaConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/ChromaConfig.java deleted file mode 100644 index 80c40cd98..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/ChromaConfig.java +++ /dev/null @@ -1,62 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import at.hannibal2.skyhanni.SkyHanniMod; -import at.hannibal2.skyhanni.config.FeatureToggle; -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorButton; -import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; -import io.github.moulberry.moulconfig.annotations.ConfigEditorInfoText; -import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; -import io.github.moulberry.moulconfig.annotations.ConfigOption; - -public class ChromaConfig { - - @Expose - @ConfigOption(name = "Chroma Preview", desc = "§fPlease star the mod on GitHub!") - @ConfigEditorInfoText(infoTitle = "Only In SkyBlock") - public boolean chromaPreview = false; - - @Expose - @ConfigOption(name = "Enabled", desc = "Toggle for SkyHanni's chroma. (Disables Patcher's Optimized Font Renderer while enabled)") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Chroma Size", desc = "Change the size of each color in the chroma.") - @ConfigEditorSlider(minValue = 1f, maxValue = 100f, minStep = 1f) - public float chromaSize = 30f; - - @Expose - @ConfigOption(name = "Chroma Speed", desc = "Change how fast the chroma animation moves.") - @ConfigEditorSlider(minValue = 0.5f, maxValue = 20f, minStep = 0.5f) - public float chromaSpeed = 6f; - - @Expose - @ConfigOption(name = "Chroma Saturation", desc = "Change the saturation of the chroma.") - @ConfigEditorSlider(minValue = 0f, maxValue = 1f, minStep = 0.01f) - public float chromaSaturation = 0.75f; - - @Expose - @ConfigOption(name = "Chroma Direction", desc = "Change the slant and direction of the chroma.") - @ConfigEditorDropdown(values = {"Forward + Right", "Forward + Left", "Backward + Right", "Backward + Left"}) - public int chromaDirection = 0; - - @ConfigOption(name = "Reset to Default", desc = "Resets all chroma settings to the default.") - @ConfigEditorButton(buttonText = "Reset") - public Runnable resetSettings = this::resetChromaSettings; - - @Expose - @ConfigOption(name = "Everything Chroma", desc = "Renders §4§l§oALL §r§7text in chroma. (Some enchants may appear white with SBA enchant parsing)") - @ConfigEditorBoolean - public boolean allChroma = false; - - private void resetChromaSettings() { - SkyHanniMod.getFeature().chroma.chromaSize = 30f; - SkyHanniMod.getFeature().chroma.chromaSpeed = 6f; - SkyHanniMod.getFeature().chroma.chromaSaturation = 0.75f; - SkyHanniMod.getFeature().chroma.allChroma = false; - SkyHanniMod.getFeature().chroma.chromaDirection = 0; - } -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/CombatConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/CombatConfig.java deleted file mode 100644 index d0d69afba..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/CombatConfig.java +++ /dev/null @@ -1,721 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import at.hannibal2.skyhanni.config.FeatureToggle; -import at.hannibal2.skyhanni.config.core.config.Position; -import at.hannibal2.skyhanni.features.combat.ghostcounter.GhostFormatting; -import at.hannibal2.skyhanni.features.combat.ghostcounter.GhostUtil; -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorButton; -import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; -import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; -import io.github.moulberry.moulconfig.annotations.ConfigEditorInfoText; -import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; -import io.github.moulberry.moulconfig.annotations.ConfigEditorText; -import io.github.moulberry.moulconfig.annotations.ConfigOption; -import io.github.moulberry.moulconfig.observer.Property; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -public class CombatConfig { - - @Expose - @ConfigOption(name = "Damage Indicator", desc = "") - @Accordion - public DamageIndicatorConfig damageIndicator = new DamageIndicatorConfig(); - - public static class DamageIndicatorConfig { - - @Expose - @ConfigOption(name = "Damage Indicator Enabled", desc = "Show the boss' remaining health.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Healing Chat Message", desc = "Sends a chat message when a boss heals themself.") - @ConfigEditorBoolean - public boolean healingMessage = false; - - @Expose - @ConfigOption( - name = "Boss Name", - desc = "Change how the boss name should be displayed.") - @ConfigEditorDropdown(values = {"Hidden", "Full Name", "Short Name"}) - public int bossName = 1; - - @Expose - @ConfigOption( - name = "Select Boss", - desc = "Change what type of boss you want the damage indicator be enabled for." - ) - @ConfigEditorDraggableList( - exampleText = { - "§bDungeon All", - "§bNether Mini Bosses", - "§bVanquisher", - "§bEndstone Protector (not tested)", - "§bEnder Dragon (not finished)", - "§bRevenant Horror", - "§bTarantula Broodfather", - "§bSven Packmaster", - "§bVoidgloom Seraph", - "§bInferno Demonlord", - "§bHeadless Horseman (bugged)", - "§bDungeon Floor 1", - "§bDungeon Floor 2", - "§bDungeon Floor 3", - "§bDungeon Floor 4", - "§bDungeon Floor 5", - "§bDungeon Floor 6", - "§bDungeon Floor 7", - "§bDiana Mobs", - "§bSea Creatures", - "Dummy", - "§bArachne", - "§bThe Rift Bosses", - "§bRiftstalker Bloodfiend", - "§6Reindrake" - } - ) - //TODO only show currently working and tested features - public List bossesToShow = new ArrayList<>(Arrays.asList(0, 1, 2, 5, 6, 7, 8, 9, 18, 19, 21, 22, 23, 24)); - - @Expose - @ConfigOption(name = "Hide Damage Splash", desc = "Hiding damage splashes near the damage indicator.") - @ConfigEditorBoolean - public boolean hideDamageSplash = false; - - @Expose - @ConfigOption(name = "Damage Over Time", desc = "Show damage and health over time below the damage indicator.") - @ConfigEditorBoolean - public boolean showDamageOverTime = false; - - @Expose - @ConfigOption(name = "Hide Nametag", desc = "Hide the vanilla nametag of damage indicator bosses.") - @ConfigEditorBoolean - public boolean hideVanillaNametag = false; - - @Expose - @ConfigOption(name = "Time to Kill", desc = "Show the time it takes to kill the slayer boss.") - @ConfigEditorBoolean - public boolean timeToKillSlayer = true; - - - @Expose - @ConfigOption(name = "Ender Slayer", desc = "") - @Accordion - public EnderSlayerConfig enderSlayer = new EnderSlayerConfig(); - - public static class EnderSlayerConfig { - - @Expose - @ConfigOption(name = "Laser Phase Timer", desc = "Show a timer when the laser phase will end.") - @ConfigEditorBoolean - public boolean laserPhaseTimer = false; - - @Expose - @ConfigOption(name = "Health During Laser", desc = "Show the health of Voidgloom Seraph 4 during the laser phase.") - @ConfigEditorBoolean - public boolean showHealthDuringLaser = false; - } - - @Expose - @ConfigOption(name = "Vampire Slayer", desc = "") - @Accordion - public VampireSlayerConfig vampireSlayer = new VampireSlayerConfig(); - - public static class VampireSlayerConfig { - @Expose - @ConfigOption(name = "HP Until Steak", desc = "Show the amount of HP missing until the Steak can be used on the Vampire Slayer on top of the boss.") - @ConfigEditorBoolean - public boolean hpTillSteak = false; - - @Expose - @ConfigOption(name = "Mania Circles", desc = "Show a timer until the boss leaves the invincible Mania Circles state.") - @ConfigEditorBoolean - public boolean maniaCircles = false; - - @Expose - @ConfigOption(name = "Percentage HP", desc = "Show the percentage of HP next to the HP.") - @ConfigEditorBoolean - public boolean percentage = false; - } - } - - @Expose - @ConfigOption(name = "Ghost Counter", desc = "") - @Accordion - public GhostCounterConfig ghostCounter = new GhostCounterConfig(); - - public static class GhostCounterConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Enable the ghost counter (invisible creepers in the Dwarven Mines The Mist area).") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption( - name = "Display Text", - desc = "Drag text to change the appearance of the overlay." - ) - @ConfigEditorDraggableList( - exampleText = { - "§6Ghosts Counter", - " §bGhost Killed: 42", - " §bSorrow: 6", - " §bGhost since Sorrow: 1", - " §bGhosts/Sorrow: 5", - " §bVolta: 6", - " §bPlasma: 8", - " §bGhostly Boots: 1", - " §bBag Of Cash: 4", - " §bAvg Magic Find: 271", - " §bScavenger Coins: 15,000", - " §bKill Combo: 14", - " §bHighest Kill Combo: 96", - " §bSkill XP Gained: 145,648", - " §bBestiary 1: 0/10", - " §bXP/h: 810,410", - " §bKills/h: 420", - " §bETA: 14d", - " §bMoney/h: 13,420,069", - " §bMoney made: 14B" - } - ) - public List ghostDisplayText = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 9, 10, 11, 12)); - - @ConfigOption(name = "Text Formatting", desc = "") - @Accordion - @Expose - public TextFormattingConfig textFormatting = new TextFormattingConfig(); - - public static class TextFormattingConfig { - - @ConfigOption(name = "§eText Formatting Info", desc = "§e%session% §ris §e§lalways §rreplaced with\n" + - "§7the count for your current session.\n" + - "§7Reset when restarting the game.\n" + - "§7You can use §e&Z §7color code to use SBA chroma.") - @ConfigEditorInfoText - public boolean formatInfo = false; - - @ConfigOption(name = "Reset Formatting", desc = "Reset formatting to default text.") - @ConfigEditorButton(buttonText = "Reset") - public Runnable resetFormatting = GhostFormatting.INSTANCE::reset; - - @ConfigOption(name = "Export Formatting", desc = "Export current formatting to clipboard.") - @ConfigEditorButton(buttonText = "Export") - public Runnable exportFormatting = GhostFormatting.INSTANCE::export; - - @ConfigOption(name = "Import Formatting", desc = "Import formatting from clipboard.") - @ConfigEditorButton(buttonText = "Import") - public Runnable importFormatting = GhostFormatting.INSTANCE::importFormat; - - @Expose - @ConfigOption(name = "Title", desc = "Title Line.") - @ConfigEditorText - public String titleFormat = "&6Ghost Counter"; - - @Expose - @ConfigOption(name = "Ghost Killed", desc = "Ghost Killed line.\n§e%value% §ris replaced with\n" + - "Ghost Killed.\n" + - "§e%session% §7is replaced with Ghost killed") - @ConfigEditorText - public String ghostKilledFormat = " &6Ghost Killed: &b%value% &7(%session%)"; - - @Expose - @ConfigOption(name = "Sorrows", desc = "Sorrows drop line.\n" + - "§e%value% §7is replaced with\nsorrows dropped.") - @ConfigEditorText - public String sorrowsFormat = " &6Sorrow: &b%value% &7(%session%)"; - - @Expose - @ConfigOption(name = "Ghost Since Sorrow", desc = "Ghost Since Sorrow line.\n" + - "§e%value% §7is replaced with\nGhost since last sorrow drop.") - @ConfigEditorText - public String ghostSinceSorrowFormat = " &6Ghost since Sorrow: &b%value%"; - - @Expose - @ConfigOption(name = "Ghost Kill Per Sorrow", desc = "Ghost Kill Per Sorrow line.\n" + - "§e%value% §7is replaced with\naverage ghost kill per sorrow drop.") - @ConfigEditorText - public String ghostKillPerSorrowFormat = " &6Ghosts/Sorrow: &b%value%"; - - @Expose - @ConfigOption(name = "Voltas", desc = "Voltas drop line.\n" + - "§e%value% §7is replaced with\nvoltas dropped.") - @ConfigEditorText - public String voltasFormat = " &6Voltas: &b%value% &7(%session%)"; - - @Expose - @ConfigOption(name = "Plasmas", desc = "Plasmas drop line.\n" + - "§e%value% §7is replaced with\nplasmas dropped.") - @ConfigEditorText - public String plasmasFormat = " &6Plasmas: &b%value% &7(%session%)"; - - @Expose - @ConfigOption(name = "Ghostly Boots", desc = "Ghostly Boots drop line.\n" + - "§e%value% §7is replaced with\nGhostly Boots dropped.") - @ConfigEditorText - public String ghostlyBootsFormat = " &6Ghostly Boots: &b%value% &7(%session%)"; - - @Expose - @ConfigOption(name = "Bag Of Cash", desc = "Bag Of Cash drop line.\n" + - "§e%value% §7is replaced with\nBag Of Cash dropped.") - @ConfigEditorText - public String bagOfCashFormat = " &6Bag Of Cash: &b%value% &7(%session%)"; - - @Expose - @ConfigOption(name = "Average Magic Find", desc = "Average Magic Find line.\n" + - "§e%value% §7is replaced with\nAverage Magic Find.") - @ConfigEditorText - public String avgMagicFindFormat = " &6Avg Magic Find: &b%value%"; - - @Expose - @ConfigOption(name = "Scavenger Coins", desc = "Scavenger Coins line.\n" + - "§e%value% §7is replaced with\nCoins earned from kill ghosts.\nInclude: Scavenger Enchant, Scavenger Talismans, Kill Combo.") - @ConfigEditorText - public String scavengerCoinsFormat = " &6Scavenger Coins: &b%value% &7(%session%)"; - - @Expose - @ConfigOption(name = "Kill Combo", desc = "Kill Combo line.\n" + - "§e%value% §7is replaced with\nYour current kill combo.") - @ConfigEditorText - public String killComboFormat = " &6Kill Combo: &b%value%"; - - @Expose - @ConfigOption(name = "Highest Kill Combo", desc = "Highest Kill Combo line.\n" + - "§e%value% §7is replaced with\nYour current highest kill combo.") - @ConfigEditorText - public String highestKillComboFormat = " &6Highest Kill Combo: &b%value% &7(%session%)"; - - @Expose - @ConfigOption(name = "Skill XP Gained", desc = "Skill XP Gained line.\n" + - "§e%value% §7is replaced with\nSkill XP Gained from killing Ghosts.") - @ConfigEditorText - public String skillXPGainFormat = " &6Skill XP Gained: &b%value% &7(%session%)"; - - @ConfigOption(name = "Bestiary Formatting", desc = "") - @Accordion - @Expose - public BestiaryFormattingConfig bestiaryFormatting = new BestiaryFormattingConfig(); - - public static class BestiaryFormattingConfig { - - @Expose - @ConfigOption(name = "Bestiary", desc = "Bestiary Progress line.\n§e%value% §7is replaced with\n" + - "Your current progress to next level.\n" + - "§e%currentLevel% &7is replaced with your current bestiary level\n" + - "§e%nextLevel% §7is replaced with your current bestiary level +1.\n" + - "§e%value% §7is replaced with one of the text below.") - @ConfigEditorText - public String base = " &6Bestiary %display%: &b%value%"; - - @Expose - @ConfigOption(name = "No Data", desc = "Text to show when you need to open the\nBestiary Menu to gather data.") - @ConfigEditorText - public String openMenu = "§cOpen Bestiary Menu !"; - - @Expose - @ConfigOption(name = "Maxed", desc = "Text to show when your bestiary for ghost is at max level.\n" + - "§e%currentKill% §7is replaced with your current total kill.") - @ConfigEditorText - public String maxed = "%currentKill% (&c&lMaxed!)"; - - @Expose - @ConfigOption(name = "Progress to Max", desc = "Text to show progress when the §eMaxed Bestiary §7option is §aON\n" + - "§e%currentKill% §7is replaced with your current total kill.") - @ConfigEditorText - public String showMax_progress = "%currentKill%/250k (%percentNumber%%)"; - - @Expose - @ConfigOption(name = "Progress", desc = "Text to show progress when the §eMaxed Bestiary§7 option is §cOFF\n" + - "§e%currentKill% §7is replaced with how many kill you have to the next level.\n" + - "§e%killNeeded% §7is replaced with how many kill you need to reach the next level.") - @ConfigEditorText - public String progress = "%currentKill%/%killNeeded%"; - } - - - @ConfigOption(name = "XP Per Hour Formatting", desc = "") - @Accordion - @Expose - public XPHourFormattingConfig xpHourFormatting = new XPHourFormattingConfig(); - - public static class XPHourFormattingConfig { - - @Expose - @ConfigOption(name = "XP/h", desc = "XP Per Hour line.\n" + - "§e%value% §7is replaced with one of the text below.") - @ConfigEditorText - public String base = " &6XP/h: &b%value%"; - - @Expose - @ConfigOption(name = "No Data", desc = "XP Per Hour line.\n§e%value% §7is replaced with\nEstimated amount of combat xp you gain per hour.") - @ConfigEditorText - public String noData = "&bN/A"; - - @Expose - @ConfigOption(name = "Paused", desc = "Text displayed next to the time \n" + - "when you are doing nothing for a given amount of seconds") - @ConfigEditorText - public String paused = "&c(PAUSED)"; - } - - - @ConfigOption(name = "ETA Formatting", desc = "") - @Accordion - @Expose - public ETAFormattingConfig etaFormatting = new ETAFormattingConfig(); - - public static class ETAFormattingConfig { - @Expose - @ConfigOption(name = "ETA to next level", desc = "ETA To Next Level Line.\n" + - "§e%value% §7is replaced with one of the text below.") - @ConfigEditorText - public String base = " &6ETA: &b%value%"; - - @Expose - @ConfigOption(name = "Maxed!", desc = "So you really maxed ghost bestiary ?") - @ConfigEditorText - public String maxed = "&c&lMAXED!"; - - @Expose - @ConfigOption(name = "No Data", desc = "Start killing some ghosts !") - @ConfigEditorText - public String noData = "&bN/A"; - - @Expose - @ConfigOption(name = "Progress", desc = "Text to show progress to next level.") - @ConfigEditorText - public String progress = "&b%value%"; - - @Expose - @ConfigOption(name = "Paused", desc = "Text displayed next to the time \n" + - "when you are doing nothing for a given amount of seconds") - @ConfigEditorText - public String paused = "&c(PAUSED)"; - - @Expose - @ConfigOption(name = "Time", desc = "§e%days% §7is replaced with days remaining.\n" + - "§e%hours% §7is replaced with hours remaining.\n" + - "§e%minutes% §7is replaced with minutes remaining.\n" + - "§e%seconds% §7is replaced with seconds remaining.") - @ConfigEditorText - public String time = "&6%days%%hours%%minutes%%seconds%"; - } - - @ConfigOption(name = "Kill Per Hour Formatting", desc = "") - @Expose - @Accordion - public KillHourFormattingConfig killHourFormatting = new KillHourFormattingConfig(); - - public static class KillHourFormattingConfig { - @Expose - @ConfigOption(name = "Kill/h", desc = "Kill Per Hour line.\n§e%value% §7is replaced with\nEstimated kills per hour you get.") - @ConfigEditorText - public String base = " &6Kill/h: &b%value%"; - - @Expose - @ConfigOption(name = "No Data", desc = "Start killing some ghosts !") - @ConfigEditorText - public String noData = "&bN/A"; - - @Expose - @ConfigOption(name = "Paused", desc = "Text displayed next to the time \n" + - "when you are doing nothing for a given amount of seconds") - @ConfigEditorText - public String paused = "&c(PAUSED)"; - } - - - @Expose - @ConfigOption(name = "Money Per Hour", desc = "Money Per Hour.\n§e%value% §7is replaced with\nEstimated money you get per hour\n" + - "Calculated with your kill per hour and your average magic find.") - @ConfigEditorText - public String moneyHourFormat = " &6$/h: &b%value%"; - - @Expose - @ConfigOption(name = "Money made", desc = "Calculate the money you made.\nInclude §eSorrow§7, §ePlasma§7, §eVolta§7, §e1M coins drop\n" + - "§eGhostly Boots§7, §eScavenger coins.\n" + - "§cUsing current Sell Offer value.") - @ConfigEditorText - public String moneyMadeFormat = " &6Money made: &b%value%"; - } - - @Expose - @ConfigOption(name = "Extra space", desc = "Space between each line of text.") - @ConfigEditorSlider( - minValue = -5, - maxValue = 10, - minStep = 1) - public int extraSpace = 1; - - @Expose - @ConfigOption(name = "Pause Timer", desc = "How many seconds does it wait before pausing.") - @ConfigEditorSlider( - minValue = 1, - maxValue = 20, - minStep = 1 - ) - public int pauseTimer = 3; - - @Expose - @ConfigOption(name = "Show only in The Mist", desc = "Show the overlay only when you are in The Mist.") - @ConfigEditorBoolean - public boolean onlyOnMist = true; - - @Expose - @ConfigOption(name = "Maxed Bestiary", desc = "Show progress to max bestiary instead of next level.") - @ConfigEditorBoolean - public boolean showMax = false; - - @ConfigOption(name = "Reset", desc = "Reset the counter.") - @ConfigEditorButton(buttonText = "Reset") - public Runnable resetCounter = GhostUtil.INSTANCE::reset; - - @Expose - public Position position = new Position(50, 50, false, true); - } - - @Expose - @ConfigOption(name = "Summonings", desc = "") - @Accordion - public SummoningsConfig summonings = new SummoningsConfig(); - - public static class SummoningsConfig { - - @Expose - @ConfigOption(name = "Summoning Soul Display", desc = "Show the name of dropped Summoning Souls laying on the ground. " + - "§cNot working in Dungeons if Skytils' 'Hide Non-Starred Mobs Nametags' feature is enabled!") - @ConfigEditorBoolean - @FeatureToggle - public boolean summoningSoulDisplay = false; - - @Expose - @ConfigOption(name = "Summoning Mob Display", desc = "Show the health of your spawned summons.") - @ConfigEditorBoolean - @FeatureToggle - public boolean summoningMobDisplay = false; - - @Expose - public Position summoningMobDisplayPos = new Position(10, 10, false, true); - - @Expose - @ConfigOption(name = "Summoning Mob Nametag", desc = "Hide the nametag of your spawned summons.") - @ConfigEditorBoolean - @FeatureToggle - public boolean summoningMobHideNametag = false; - - @Expose - @ConfigOption(name = "Summoning Mob Color", desc = "Marks own summons green.") - @ConfigEditorBoolean - @FeatureToggle - public boolean summoningMobColored = false; - } - - @Expose - @ConfigOption(name = "Mobs", desc = "") - @Accordion - public MobsConfig mobs = new MobsConfig(); - - public static class MobsConfig { - - @Expose - @ConfigOption(name = "Highlighters", desc = "") - public boolean highlighters = false; - - @Expose - @ConfigOption(name = "Area Boss", desc = "Highlight Golden Ghoul, Old Wolf, Voidling Extremist and Millenia-Aged Blaze.") - @ConfigEditorBoolean - @FeatureToggle - public boolean areaBossHighlight = true; - - @Expose - @ConfigOption(name = "Arachne Keeper", desc = "Highlight the Arachne Keeper in the Spider's Den in purple color.") - @ConfigEditorBoolean - @FeatureToggle - public boolean arachneKeeperHighlight = true; - - @Expose - @ConfigOption(name = "Corleone", desc = "Highlight Boss Corleone in the Crystal Hollows.") - @ConfigEditorBoolean - @FeatureToggle - public boolean corleoneHighlighter = true; - - @Expose - @ConfigOption(name = "Zealot", desc = "Highlight Zealots and Bruisers in The End.") - @ConfigEditorBoolean - @FeatureToggle - public boolean zealotBruiserHighlighter = false; - - @Expose - @ConfigOption( - name = "Special Zealots", - desc = "Highlight Special Zealots (the ones that drop Summoning Eyes) in the End." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean specialZealotHighlighter = true; - - @Expose - @ConfigOption(name = "Corrupted Mob", desc = "Highlight corrupted mobs in purple color.") - @ConfigEditorBoolean - @FeatureToggle - public boolean corruptedMobHighlight = false; - - @Expose - @ConfigOption(name = "Arachne Boss", desc = "Highlight the Arachne boss in red and mini-bosses in orange.") - @ConfigEditorBoolean - @FeatureToggle - public boolean arachneBossHighlighter = true; - - @Expose - @ConfigOption(name = "Respawn Timers", desc = "") - public boolean timers = false; - - @Expose - @ConfigOption( - name = "Area Boss", - desc = "Show a timer when Golden Ghoul, Old Wolf, Voidling Extremist or Millenia-Aged Blaze respawns. " + - "§cSometimes it takes 20-30 seconds to calibrate correctly." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean areaBossRespawnTimer = false; - - @Expose - @ConfigOption( - name = "Arachne Spawn Timer", - desc = "Show a timer when Arachne fragments or crystals are placed to indicate how long " + - "until the boss will spawn. §cTimer may be 1-2 seconds off." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean showArachneSpawnTimer = true; - - @Expose - @ConfigOption(name = "Enderman TP Hider", desc = "Stops the Enderman Teleportation animation.") - @ConfigEditorBoolean - @FeatureToggle - public boolean endermanTeleportationHider = true; - - @Expose - @ConfigOption(name = "Arachne Minis Hider", desc = "Hides the nametag above Arachne minis.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideNameTagArachneMinis = true; - } - - @Expose - @ConfigOption(name = "Bestiary", desc = "") - @Accordion - public BestiaryConfig bestiary = new BestiaryConfig(); - - public static class BestiaryConfig { - @Expose - @ConfigOption(name = "Enable", desc = "Show Bestiary Data overlay in the Bestiary menu.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Number format", desc = "Short: 1.1k\nLong: 1.100") - @ConfigEditorDropdown(values = {"Short", "Long"}) - public int numberFormat = 0; - - @Expose - @ConfigOption(name = "Display type", desc = "Choose what the display should show") - @ConfigEditorDropdown(values = { - "Global to max", - "Global to next tier", - "Lowest total kills", - "Highest total kills", - "Lowest kills needed to max", - "Highest kills needed to max", - "Lowest kills needed to next tier", - "Highest kills needed to next tier" - }) - public int displayType = 0; - - @Expose - @ConfigOption(name = "Hide maxed", desc = "Hide maxed mobs.") - @ConfigEditorBoolean - public boolean hideMaxed = false; - - @Expose - @ConfigOption(name = "Replace Romans", desc = "Replace Roman numerals (IX) with regular numbers (9)") - @ConfigEditorBoolean - public boolean replaceRoman = false; - - @Expose - public Position position = new Position(100, 100, false, true); - } - - @Expose - @ConfigOption(name = "Ender Node Tracker", desc = "") - @Accordion - public EnderNodeConfig enderNodeTracker = new EnderNodeConfig(); - - public static class EnderNodeConfig { - @Expose - @ConfigOption( - name = "Enabled", - desc = "Tracks all of your drops from mining Ender Nodes in the End.\n" + - "Also tracks drops from Endermen." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption( - name = "Text Format", - desc = "Drag text to change the appearance of the overlay." - ) - @ConfigEditorDraggableList( - exampleText = { - "§5§lEnder Node Tracker", - "§d1,303 Ender Nodes Mined", - "§615.3M Coins Made", - " ", - "§b123 §cEndermite Nest", - "§b832 §aEnchanted End Stone", - "§b230 §aEnchanted Obsidian", - "§b1630 §aEnchanted Ender Pearl", - "§b85 §aGrand Experience Bottle", - "§b4 §9Titanic Experience Bottle", - "§b15 §9End Stone Shulker", - "§b53 §9End Stone Geode", - "§b10 §d◆ Magical Rune I", - "§b24 §5Ender Gauntlet", - "§b357 §5Mite Gel", - "§b2 §cShrimp The Fish", - " ", - "§b200 §5Ender Armor", - "§b24 §5Ender Helmet", - "§b24 §5Ender Chestplate", - "§b24 §5Ender Leggings", - "§b24 §5Ender Boots", - "§b24 §5Ender Necklace", - "§f10§7-§a8§7-§93§7-§52§7-§61 §fEnderman Pet", - " " - } - ) - public Property> textFormat = Property.of(new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 14, 15, 16, 17, 23))); - - @Expose - public Position position = new Position(10, 80, false, true); - } - - @Expose - @ConfigOption(name = "Hide Damage Splash", desc = "Hide all damage splashes anywhere in SkyBlock.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideDamageSplash = false; -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/CommandsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/CommandsConfig.java deleted file mode 100644 index cb127dc11..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/CommandsConfig.java +++ /dev/null @@ -1,115 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import at.hannibal2.skyhanni.config.FeatureToggle; -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; -import io.github.moulberry.moulconfig.annotations.ConfigOption; -import org.lwjgl.input.Keyboard; - -public class CommandsConfig { - - @ConfigOption(name = "Tab Complete", desc = "") - @Accordion - @Expose - public TabCompleteConfig tabComplete = new TabCompleteConfig(); - - public static class TabCompleteConfig { - - @Expose - @ConfigOption(name = "Warps", desc = "Tab complete the warp-point names when typing §e/warp §7.") - @ConfigEditorBoolean - @FeatureToggle - public boolean warps = true; - - @Expose - @ConfigOption(name = "Island Players", desc = "Tab complete other players on the same island.") - public boolean islandPlayers = true; - - @Expose - @ConfigOption(name = "Friends", desc = "Tab complete friends from your friends list.") - @ConfigEditorBoolean - @FeatureToggle - public boolean friends = true; - - @Expose - @ConfigOption(name = "Only Best Friends", desc = "Only Tab Complete best friends.") - @ConfigEditorBoolean - @FeatureToggle - public boolean onlyBestFriends = false; - - @Expose - @ConfigOption(name = "Party", desc = "Tab complete Party Members.") - @ConfigEditorBoolean - @FeatureToggle - public boolean party = true; - - @Expose - @ConfigOption(name = "VIP Visits", desc = "Tab complete the visit to special users with cake souls on it.") - @ConfigEditorBoolean - @FeatureToggle - public boolean vipVisits = true; - - @Expose - @ConfigOption(name = "/gfs Sack", desc = "Tab complete §e/gfs §7sack items.") - @ConfigEditorBoolean - @FeatureToggle - public boolean gfsSack = true; - - @Expose - @ConfigOption(name = "Party Commands", desc = "Tab complete commonly used party commands.") - @ConfigEditorBoolean - @FeatureToggle - public boolean partyCommands = true; - - @Expose - @ConfigOption(name = "View Recipe", desc = "Tab complete item IDs in the the Hypixel command §e/viewrecipe§7. Only items with recipes are tab completed.") - @ConfigEditorBoolean - @FeatureToggle - public boolean viewrecipeItems = true; - } - - @ConfigOption(name = "Fandom Wiki for §e/wiki", desc = "") - @Accordion - @Expose - public FandomWikiCommmandConfig fandomWiki = new FandomWikiCommmandConfig(); - - public static class FandomWikiCommmandConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Use Fandom Wiki (§ehypixel-skyblock.fandom.com§7) instead of the Hypixel wiki (§ewiki.hypixel.net§7) in most wiki-related chat messages.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Skip Chat", desc = "Directly opens the Fandom Wiki instead of sending the §e\"Click to search for this thing on the Fandom Wiki\"§7 message beforehand.") - @ConfigEditorBoolean - public boolean skipWikiChat = false; - - @Expose - @ConfigOption(name = "Fandom Wiki Key", desc = "Search for an item on Fandom Wiki with this keybind.\n§4For optimal experiences, do §lNOT§r §4bind this to a mouse button.") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) - public int fandomWikiKeybind = Keyboard.KEY_NONE; - } - - @ConfigOption(name = "Party Commands", desc = "Shortens party commands and allows tab-completing for them. " + - "\n§eCommands: /pt /pp /pko /pk §7SkyBlock command §e/pt §7to check the play time still works.") - @Expose - @ConfigEditorBoolean - @FeatureToggle - public boolean shortCommands = true; - - @Expose - @ConfigOption(name = "Replace Warp Is", desc = "Adds §e/warp is §7alongside §e/is§7. Idk why. Ask §cKaeso") - @ConfigEditorBoolean - @FeatureToggle - public boolean replaceWarpIs = false; - - @Expose - @ConfigOption(name = "/viewrecipe Lower Case", desc = "Adds support for lower case item IDs to the Hypixel command §e/viewrecipe§7.") - @ConfigEditorBoolean - @FeatureToggle - public boolean viewRecipeLowerCase = true; -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/CrimsonIsleConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/CrimsonIsleConfig.java deleted file mode 100644 index cb94035a7..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/CrimsonIsleConfig.java +++ /dev/null @@ -1,157 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import at.hannibal2.skyhanni.config.FeatureToggle; -import at.hannibal2.skyhanni.config.core.config.Position; -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; -import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; -import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; -import io.github.moulberry.moulconfig.annotations.ConfigOption; -import org.lwjgl.input.Keyboard; - -public class CrimsonIsleConfig { - - @ConfigOption(name = "Ashfang", desc = "") - @Accordion - @Expose - public AshfangConfig ashfang = new AshfangConfig(); - - public static class AshfangConfig { - - @ConfigOption(name = "Gravity Orbs", desc = "") - @Accordion - @Expose - public GravityOrbsConfig gravityOrbs = new GravityOrbsConfig(); - - public static class GravityOrbsConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Shows the Gravity Orbs more clearly.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Color", desc = "Color of the Gravity Orbs.") - @ConfigEditorColour - public String color = "0:120:255:85:85"; - } - - @ConfigOption(name = "Blazing Souls", desc = "") - @Accordion - @Expose - public BlazingSoulsColor blazingSouls = new BlazingSoulsColor(); - - public static class BlazingSoulsColor { - - @Expose - @ConfigOption(name = "Enabled", desc = "Shows the Blazing Souls more clearly.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Souls Color", desc = "Color of the Blazing Souls.") - @ConfigEditorColour - public String color = "0:245:85:255:85"; - } - - @ConfigOption(name = "Hide Stuff", desc = "") - @Accordion - @Expose - public HideAshfangConfig hide = new HideAshfangConfig(); - - public static class HideAshfangConfig { - - @Expose - @ConfigOption(name = "Hide Particles", desc = "Hide particles around the Ashfang boss.") - @ConfigEditorBoolean - @FeatureToggle - public boolean particles = false; - - @Expose - @ConfigOption(name = "Hide Full Names", desc = "Hide the names of full health blazes around Ashfang (only useful when highlight blazes is enabled)") - @ConfigEditorBoolean - @FeatureToggle - public boolean fullNames = false; - - @Expose - @ConfigOption(name = "Hide Damage Splash", desc = "Hide damage splashes around Ashfang.") - @ConfigEditorBoolean - @FeatureToggle - public boolean damageSplash = false; - } - - @Expose - @ConfigOption(name = "Highlight Blazes", desc = "Highlight the different blazes in their respective colors.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlightBlazes = false; - - @Expose - @ConfigOption(name = "Freeze Cooldown", desc = "Show the cooldown for how long Ashfang blocks your abilities.") - @ConfigEditorBoolean - @FeatureToggle - public boolean freezeCooldown = false; - - @Expose - public Position freezeCooldownPos = new Position(10, 10, false, true); - - @Expose - @ConfigOption(name = "Reset Time", desc = "Show the cooldown until Ashfang pulls his underlings back.") - @ConfigEditorBoolean - @FeatureToggle - public boolean nextResetCooldown = false; - - @Expose - public Position nextResetCooldownPos = new Position(10, 10, false, true); - } - - @ConfigOption(name = "Reputation Helper", desc = "") - @Accordion - @Expose - public ReputationHelperConfig reputationHelper = new ReputationHelperConfig(); - - public static class ReputationHelperConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Enable features around Reputation features in the Crimson Isle.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Use Hotkey", desc = "Only show the Reputation Helper while pressing the hotkey.") - @ConfigEditorBoolean - public boolean useHotkey = false; - - @Expose - @ConfigOption(name = "Hotkey", desc = "Press this hotkey to show the Reputation Helper.") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) - public int hotkey = Keyboard.KEY_NONE; - - - @Expose - public Position position = new Position(10, 10, false, true); - - @Expose - @ConfigOption(name = "Show Locations", desc = "Crimson Isles waypoints for locations to get reputation.") - @ConfigEditorDropdown(values = {"Always", "Only With Hotkey", "Never"}) - public int showLocation = 1; - } - - @Expose - @ConfigOption(name = "Quest Item Helper", desc = "When you open the fetch item quest in the town board, " + - "it shows a clickable chat message that will grab the items needed from the sacks.") - @ConfigEditorBoolean - @FeatureToggle - public boolean questItemHelper = false; - - @Expose - @ConfigOption(name = "Pablo NPC Helper", desc = "Similar to Quest Item Helper, shows a clickable message that grabs the flower needed from sacks.") - @ConfigEditorBoolean - @FeatureToggle - public boolean pabloHelper = false; -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/DevConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/DevConfig.java deleted file mode 100644 index 4ee5f9469..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/DevConfig.java +++ /dev/null @@ -1,225 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import at.hannibal2.skyhanni.config.core.config.Position; -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; -import io.github.moulberry.moulconfig.annotations.ConfigOption; -import org.lwjgl.input.Keyboard; - -public class DevConfig { - - @Expose - @ConfigOption(name = "Repo Auto Update", desc = "Update the repository on every startup.\n" + - "§cOnly disable this if you know what you are doing!") - @ConfigEditorBoolean - public boolean repoAutoUpdate = true; - - @Expose - @ConfigOption(name = "Debug", desc = "") - @Accordion - public DebugConfig debug = new DebugConfig(); - - public static class DebugConfig { - @Expose - @ConfigOption(name = "Enable Debug", desc = "Enable Test logic") - @ConfigEditorBoolean - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Command Logging", desc = "Logs stack trace information into the console when a command gets sent to Hypixel. (by any mod or the player)") - @ConfigEditorBoolean - public boolean commandLogs = false; - - @Expose - @ConfigOption( - name = "Mod Menu Log", - desc = "Enables debug messages when the currently opened GUI changes, with the path to the gui class. " + - "Useful for adding more mods to quick mod menu switch." - ) - @ConfigEditorBoolean - public boolean modMenuLog = false; - - @Expose - @ConfigOption(name = "Show Internal Name", desc = "Show internal names in item lore.") - @ConfigEditorBoolean - public boolean showInternalName = false; - - @Expose - @ConfigOption(name = "Show Empty Internal Names", desc = "Shows internal name even for items with none.") - @ConfigEditorBoolean - public boolean showEmptyNames = false; - - @Expose - @ConfigOption(name = "Show Item Rarity", desc = "Show item rarities in item lore.") - @ConfigEditorBoolean - public boolean showItemRarity = false; - - @Expose - @ConfigOption(name = "Copy Internal Name", desc = "Copies the internal name of an item on key press in the clipboard.") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) - public int copyInternalName = Keyboard.KEY_NONE; - - @Expose - @ConfigOption(name = "Show NPC Price", desc = "Show NPC price in item lore.") - @ConfigEditorBoolean - public boolean showNpcPrice = false; - - @Expose - @ConfigOption(name = "Show Item UUID", desc = "Show the Unique Identifier of items in the lore.") - @ConfigEditorBoolean - public boolean showItemUuid = false; - - @Expose - @ConfigOption(name = "Copy Item Data", desc = "Copies item NBT data on key press in a GUI to clipboard.") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) - public int copyItemData = Keyboard.KEY_NONE; - - @Expose - @ConfigOption(name = "Copy Compressed Item Data", desc = "Copies compressed item NBT data on key press in a GUI to clipboard.") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) - public int copyItemDataCompressed = Keyboard.KEY_NONE; - - @Expose - @ConfigOption(name = "Copy RNG Meter", desc = "Copies internal names and maxed XP needed from RNG meter inventories as json to clipboard.") - @ConfigEditorBoolean - public boolean copyRngMeter = false; - - @Expose - @ConfigOption(name = "Copy Bestiary Data", desc = "Copies the bestiary data from the inventory as json to clipboard.") - @ConfigEditorBoolean - public boolean copyBestiaryData = false; - - @Expose - @ConfigOption(name = "Highlight Missing Repo Items", desc = "Highlights each item in the current inventory that is not in your current NEU repo.") - @ConfigEditorBoolean - public boolean highlightMissingRepo = false; - - @Expose - @ConfigOption(name = "Hot Swap Detection", desc = "Show chat messages when Hot Swap starts and ends.") - @ConfigEditorBoolean - public boolean hotSwapDetection = false; - } - - @Expose - @ConfigOption(name = "Slot Number", desc = "Show slot number in inventory while pressing this key.") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) - public int showSlotNumberKey = Keyboard.KEY_NONE; - - @ConfigOption(name = "Parkour Waypoints", desc = "") - @Accordion - @Expose - public WaypointsConfig waypoint = new WaypointsConfig(); - - public static class WaypointsConfig { - - @Expose - @ConfigOption(name = "Save Hotkey", desc = "Saves block location to a temporarily parkour and copies everything to your clipboard.") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) - public int saveKey = Keyboard.KEY_NONE; - - @Expose - @ConfigOption(name = "Delete Hotkey", desc = "Deletes the last saved location for when you make a mistake.") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) - public int deleteKey = Keyboard.KEY_NONE; - - @Expose - @ConfigOption(name = "Show Platform Number", desc = "Show the index number over the platform for every parkour.") - @ConfigEditorBoolean - public boolean showPlatformNumber = false; - - } - - @Expose - public Position debugPos = new Position(10, 10, false, true); - - @Expose - public Position debugLocationPos = new Position(1, 160, false, true); - - @Expose - @ConfigOption(name = "Minecraft Console", desc = "") - @Accordion - public MinecraftConsoleConfig minecraftConsoles = new MinecraftConsoleConfig(); - - public static class MinecraftConsoleConfig { - @Expose - @ConfigOption(name = "Unfiltered Debug", desc = "Print the debug information for unfiltered console messages.") - @ConfigEditorBoolean - public boolean printUnfilteredDebugs = false; - - @Expose - @ConfigOption(name = "Unfiltered Debug File", desc = "Print the debug information into log files instead of into the console for unfiltered console messages.") - @ConfigEditorBoolean - public boolean logUnfilteredFile = false; - - @Expose - @ConfigOption( - name = "Outside SkyBlock", - desc = "Print the debug information for unfiltered console messages outside SkyBlock too." - ) - @ConfigEditorBoolean - public boolean printUnfilteredDebugsOutsideSkyBlock = false; - - @Expose - @ConfigOption( - name = "Log Filtered", - desc = "Log the filtered messages into the console." - ) - @ConfigEditorBoolean - public boolean printFilteredReason = false; - - @Expose - @ConfigOption(name = "Console Filters", desc = "") - @Accordion - public ConsoleFiltersConfig consoleFilter = new ConsoleFiltersConfig(); - - public static class ConsoleFiltersConfig { - @Expose - @ConfigOption(name = "Filter Chat", desc = "Filter chat messages.") - @ConfigEditorBoolean - public boolean filterChat = false; - - @Expose - @ConfigOption(name = "Filter Grow Buffer", desc = "Filter 'Needed to grow BufferBuilder buffer:'") - @ConfigEditorBoolean - public boolean filterGrowBuffer = true; - - @Expose - @ConfigOption(name = "Filter Sound Error", desc = "Filter 'Unable to play unknown soundEvent'.") - @ConfigEditorBoolean - public boolean filterUnknownSound = true; - - @Expose - @ConfigOption(name = "Filter Scoreboard Errors", desc = "Filter error messages with Scoreboard: removeTeam, createTeam, " + - "removeObjective and 'scoreboard team already exists'.") - @ConfigEditorBoolean - public boolean filterScoreboardErrors = true; - - @Expose - @ConfigOption(name = "Filter Particle", desc = "Filter message 'Could not spawn particle effect VILLAGER_HAPPY'.") - @ConfigEditorBoolean - public boolean filterParticleVillagerHappy = true; - - @Expose - @ConfigOption(name = "Filter OptiFine", desc = "Filter OptiFine messages CustomItems and ConnectedTextures during loading.") - @ConfigEditorBoolean - public boolean filterOptiFine = true; - - @Expose - @ConfigOption(name = "Filter AsmHelper Transformer", desc = "Filter messages when AsmHelper is Transforming a class during loading.") - @ConfigEditorBoolean - public boolean filterAmsHelperTransformer = true; - - @Expose - @ConfigOption(name = "Filter Applying AsmWriter", desc = "Filter messages when AsmHelper is applying AsmWriter ModifyWriter.") - @ConfigEditorBoolean - public boolean filterAsmHelperApplying = true; - - @Expose - @ConfigOption(name = "Filter Biome ID Bounds", desc = "Filter message 'Biome ID is out of bounds'.") - @ConfigEditorBoolean - public boolean filterBiomeIdBounds = true; - } - } -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/DungeonConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/DungeonConfig.java deleted file mode 100644 index 90eee882a..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/DungeonConfig.java +++ /dev/null @@ -1,256 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import at.hannibal2.skyhanni.config.FeatureToggle; -import at.hannibal2.skyhanni.config.core.config.Position; -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; -import io.github.moulberry.moulconfig.annotations.ConfigOption; - -public class DungeonConfig { - - @Expose - @ConfigOption(name = "Clicked Blocks", desc = "Highlight levers, chests, and Wither Essence when clicked in Dungeons.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlightClickedBlocks = false; - - @Expose - @ConfigOption(name = "Milestones Display", desc = "Show the current milestone in Dungeons.") - @ConfigEditorBoolean - @FeatureToggle - public boolean showMilestonesDisplay = false; - - @Expose - public Position showMileStonesDisplayPos = new Position(10, 10, false, true); - - @Expose - @ConfigOption(name = "Death Counter Display", desc = "Display the total amount of deaths in the current Dungeon.") - @ConfigEditorBoolean - @FeatureToggle - public boolean deathCounterDisplay = false; - - @Expose - public Position deathCounterPos = new Position(10, 10, false, true); - - @Expose - @ConfigOption(name = "Clean End", desc = "") - @Accordion - public CleanEndConfig cleanEnd = new CleanEndConfig(); - public static class CleanEndConfig { - @Expose - @ConfigOption(name = "Enabled", desc = "After the last Dungeon boss has died, all entities and " + - "particles are no longer displayed and the music stops playing, but the loot chests are still displayed.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Ignore Guardians", desc = "Ignore F3 and M3 Guardians from the clean end feature when " + - "sneaking. Makes it easier to kill them after the boss died already. Thanks Hypixel.") - @ConfigEditorBoolean - public boolean F3IgnoreGuardians = false; - } - - @Expose - @ConfigOption(name = "Boss Damage Splash", desc = "Hides damage splashes while inside the boss room (fixes a Skytils feature).") - @ConfigEditorBoolean - @FeatureToggle - public boolean damageSplashBoss = false; - - @Expose - @ConfigOption(name = "Highlight Deathmites", desc = "Highlight Deathmites in Dungeons in red color.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlightDeathmites = true; - - @Expose - @ConfigOption(name = "Highlight Teammates", desc = "Highlight Dungeon teammates with a glowing outline.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlightTeammates = true; - - - @Expose - @ConfigOption(name = "Object Hider", desc = "Hide various things in Dungeons.") - @Accordion - public ObjectHiderConfig objectHider = new ObjectHiderConfig(); - public static class ObjectHiderConfig { - @Expose - @ConfigOption(name = "Hide Superboom TNT", desc = "Hide Superboom TNT laying around in Dungeons.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideSuperboomTNT = false; - - @Expose - @ConfigOption(name = "Hide Blessings", desc = "Hide Blessings laying around in Dungeons.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideBlessing = false; - - @Expose - @ConfigOption(name = "Hide Revive Stones", desc = "Hide Revive Stones laying around in Dungeons.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideReviveStone = false; - - @Expose - @ConfigOption(name = "Hide Premium Flesh", desc = "Hide Premium Flesh laying around in Dungeons.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hidePremiumFlesh = false; - - @Expose - @ConfigOption(name = "Hide Journal Entry", desc = "Hide Journal Entry pages laying around in Dungeons.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideJournalEntry = false; - - @Expose - @ConfigOption(name = "Hide Skeleton Skull", desc = "Hide Skeleton Skulls laying around in Dungeons.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideSkeletonSkull = true; - - @Expose - @ConfigOption(name = "Hide Healer Orbs", desc = "Hides the damage, ability damage and defensive orbs that spawn when the Healer kills mobs.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideHealerOrbs = false; - - @Expose - @ConfigOption(name = "Hide Healer Fairy", desc = "Hide the Golden Fairy that follows the Healer in Dungeons.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideHealerFairy = false; - - @Expose - @ConfigOption( - name = "Hide Soulweaver Skulls", - desc = "Hide the annoying soulweaver skulls that float around you if you have the soulweaver gloves equipped.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideSoulweaverSkulls = false; - - } - - @Expose - @ConfigOption(name = "Message Filter", desc = "") - @Accordion - public MessageFilterConfig messageFilter = new MessageFilterConfig(); - - public static class MessageFilterConfig{ - @Expose - @ConfigOption(name = "Keys and Doors", desc = "Hides the chat message when picking up keys or opening doors in Dungeons.") - @ConfigEditorBoolean - @FeatureToggle - public boolean keysAndDoors = false; - } - - @Expose - @ConfigOption(name = "Dungeon Copilot", desc = "") - @Accordion - public DungeonCopilotConfig dungeonCopilot = new DungeonCopilotConfig(); - - public static class DungeonCopilotConfig{ - @Expose - @ConfigOption(name = "Copilot Enabled", desc = "Suggests what to do next in Dungeons.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - public Position pos = new Position(10, 10, false, true); - } - - - @Expose - @ConfigOption(name = "Party Finder", desc = "") - @Accordion - public PartyFinderConfig partyFinder = new PartyFinderConfig(); - - public static class PartyFinderConfig { - @Expose - @ConfigOption(name = "Colored Class Level", desc = "Color class levels in Party Finder.") - @ConfigEditorBoolean - @FeatureToggle - public boolean coloredClassLevel = true; - - @Expose - @ConfigOption(name = "Floor Stack Size", desc = "Display the party finder floor as the item stack size.") - @ConfigEditorBoolean - @FeatureToggle - public boolean floorAsStackSize = true; - - @Expose - @ConfigOption(name = "Mark Paid Carries", desc = "Highlight paid carries with a red background to make them easier to find/skip.") - @ConfigEditorBoolean - @FeatureToggle - public boolean markPaidCarries = true; - - @Expose - @ConfigOption(name = "Mark Low Levels", desc = "Highlight groups with players at or below the specified class level to make them easier to find/skip.") - @ConfigEditorSlider(minValue = 0, maxValue = 50, minStep = 1) - public int markBelowClassLevel = 0; - - @Expose - @ConfigOption(name = "Mark Ineligible Groups", desc = "Highlight groups with requirements that you do not meet.") - @ConfigEditorBoolean - @FeatureToggle - public boolean markIneligibleGroups = true; - - @Expose - @ConfigOption(name = "Mark Missing Class", desc = "Highlight groups that don't currently have any members of your selected dungeon class.") - @ConfigEditorBoolean - @FeatureToggle - public boolean markMissingClass = true; - } - - @Expose - @ConfigOption(name = "Tab List", desc = "") - @Accordion - public TabListConfig tabList = new TabListConfig(); - - public static class TabListConfig { - - @Expose - @ConfigOption(name = "Colored Class Level", desc = "Color class levels in tab list. (Also hides rank colors and emblems, because who needs that in Dungeons anyway?)") - @ConfigEditorBoolean - @FeatureToggle - public boolean coloredClassLevel = true; - } - - @Expose - @ConfigOption(name = "Livid Finder", desc = "") - @Accordion - public LividFinderConfig lividFinder = new LividFinderConfig(); - - public static class LividFinderConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Helps find the correct livid in F5 and in M5.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Hide Wrong Livids", desc = "Hide wrong livids entirely.") - @ConfigEditorBoolean - public boolean hideWrong = false; - } - - @Expose - @ConfigOption(name = "Moving Skeleton Skulls", desc = "Highlight Skeleton Skulls when combining into an " + - "orange Skeletor (not useful when combined with feature Hide Skeleton Skull).") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlightSkeletonSkull = true; - - @Expose - @ConfigOption(name = "Croesus Chest", desc = "Adds a visual highlight to the Croesus inventory that " + - "shows unopened chests.") - @ConfigEditorBoolean - @FeatureToggle - public boolean croesusUnopenedChestTracker = true; -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/EventConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/EventConfig.java deleted file mode 100644 index fe7e36440..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/EventConfig.java +++ /dev/null @@ -1,421 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import at.hannibal2.skyhanni.config.FeatureToggle; -import at.hannibal2.skyhanni.config.core.config.Position; -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; -import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; -import io.github.moulberry.moulconfig.annotations.ConfigOption; -import io.github.moulberry.moulconfig.observer.Property; -import org.lwjgl.input.Keyboard; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -public class EventConfig { - - @ConfigOption(name = "Monthly Bingo", desc = "") - @Accordion - @Expose - public BingoConfig bingo = new BingoConfig(); - - public static class BingoConfig { - - @Expose - @ConfigOption(name = "Bingo Card", desc = "") - @Accordion - public BingoCardConfig bingoCard = new BingoCardConfig(); - - public static class BingoCardConfig { - @Expose - @ConfigOption(name = "Enable", desc = "Displays the Bingo Card.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - @Expose - @ConfigOption(name = "Quick Toggle", desc = "Quickly toggle the Bingo Card or the step helper by sneaking with SkyBlock Menu in hand.") - @ConfigEditorBoolean - public boolean quickToggle = true; - - @Expose - @ConfigOption(name = "Bingo Steps", desc = "Show help with the next step in Bingo instead of the Bingo Card. " + - "§cThis feature is in early development. Expect bugs and missing goals.") - @ConfigEditorBoolean - public boolean stepHelper = false; - - @Expose - @ConfigOption(name = "Hide Community Goals", desc = "Hide Community Goals from the Bingo Card display.") - @ConfigEditorBoolean - public Property hideCommunityGoals = Property.of(false); - - @Expose - @ConfigOption( - name = "Show Guide", - desc = "Show tips and difficulty for bingo goals inside the Bingo Card inventory.\n" + - "These tips are made from inspirations and guides from the community,\n"+ - "aiming to help you to complete the bingo card." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean bingoSplashGuide = true; - - @Expose - public Position bingoCardPos = new Position(10, 10, false, true); - } - - @Expose - @ConfigOption(name = "Compact Chat Messages", desc = "") - @Accordion - public CompactChatConfig compactChat = new CompactChatConfig(); - - public static class CompactChatConfig { - - @Expose - @ConfigOption(name = "Enable", desc = "Shortens chat messages about skill level ups, collection gains, " + - "new area discoveries and SkyBlock level up messages while on Bingo.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Hide Border", desc = "Hide the border messages before and after the compact level up messages.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideBorder = true; - - @Expose - @ConfigOption(name = "Outside Bingo", desc = "Compact the level up chat messages outside of an Bingo profile as well.") - @ConfigEditorBoolean - public boolean outsideBingo = false; - } - - @Expose - @ConfigOption(name = "Minion Craft Helper", desc = "Show how many more items you need to upgrade the minion in your inventory. Especially useful for Bingo.") - @ConfigEditorBoolean - @FeatureToggle - public boolean minionCraftHelperEnabled = true; - - @Expose - public Position minionCraftHelperPos = new Position(10, 10, false, true); - } - - @ConfigOption(name = "Diana's Mythological Burrows", desc = "") - @Accordion - @Expose - public DianaConfig diana = new DianaConfig(); - - public static class DianaConfig { - - - @Expose - @ConfigOption(name = "Soopy Guess", desc = "Uses §eSoopy's Guess Logic §7to find the next burrow. Does not require SoopyV2 or ChatTriggers to be installed.") - @ConfigEditorBoolean - @FeatureToggle - public boolean burrowsSoopyGuess = false; - - @Expose - @ConfigOption(name = "Nearby Detection", desc = "Show burrows near you.") - @ConfigEditorBoolean - @FeatureToggle - public boolean burrowsNearbyDetection = false; - - @Expose - @ConfigOption(name = "Smooth Transition", desc = "Show the way from one burrow to another smoothly.") - @ConfigEditorBoolean - public boolean burrowSmoothTransition = false; - - @Expose - @ConfigOption(name = "Nearest Warp", desc = "Warps to the nearest warp point on the hub, if closer to the next burrow.") - @ConfigEditorBoolean - public boolean burrowNearestWarp = false; - - @Expose - @ConfigOption(name = "Warp Key", desc = "Press this key to warp to nearest burrow waypoint.") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) - public int keyBindWarp = Keyboard.KEY_NONE; - - @Expose - @ConfigOption(name = "Ignored Warps", desc = "") - @Accordion - public IgnoredWarpsConfig ignoredWarps = new IgnoredWarpsConfig(); - - public static class IgnoredWarpsConfig { - - @Expose - @ConfigOption(name = "Crypt", desc = "Ignore the Crypt warp point (Because it takes a long time to leave).") - @ConfigEditorBoolean - public boolean crypt = false; - - @Expose - @ConfigOption(name = "Wizard", desc = "Ignore the Wizard Tower warp point (Because it is easy to fall into the rift).") - @ConfigEditorBoolean - public boolean wizard = false; - - } - - @Expose - @ConfigOption(name = "Inquisitor Waypoint Sharing", desc = "") - @Accordion - public InquisitorSharingConfig inquisitorSharing = new InquisitorSharingConfig(); - - public static class InquisitorSharingConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Shares your Inquisitor and receiving other Inquisitors via Party Chat.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Focus", desc = "Hide other waypoints when your Party finds an Inquisitor.") - @ConfigEditorBoolean - public boolean focusInquisitor = false; - - @Expose - @ConfigOption(name = "Instant Share", desc = "Share the waypoint as soon as you find an Inquisitor. As an alternative, you can share it only via key press.") - @ConfigEditorBoolean - public boolean instantShare = true; - - @Expose - @ConfigOption(name = "Share Key", desc = "Press this key to share your Inquisitor Waypoint.") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_Y) - public int keyBindShare = Keyboard.KEY_Y; - - @Expose - @ConfigOption(name = "Show Despawn Time", desc = "Show the time until the shared Inquisitor will despawn.") - @ConfigEditorBoolean - public boolean showDespawnTime = true; - } - - @Expose - @ConfigOption(name = "Griffin Pet Warning", desc = "Warn when holding an Ancestral Spade if a Griffin Pet is not equipped.") - @ConfigEditorBoolean - @FeatureToggle - public boolean petWarning = true; - - @Expose - @ConfigOption(name = "Always Diana", desc = "Forcefully set the Diana event to be active. This is useful if the auto mayor detection fails.") - @ConfigEditorBoolean - public boolean alwaysDiana = false; - } - - @ConfigOption(name = "Winter Season on Jerry's Island", desc = "") - @Accordion - @Expose - public WinterConfig winter = new WinterConfig(); - - public static class WinterConfig { - - @Expose - @ConfigOption(name = "Frozen Treasure Tracker", desc = "") - @Accordion - public FrozenTreasureConfig frozenTreasureTracker = new FrozenTreasureConfig(); - - public static class FrozenTreasureConfig { - - @Expose - @ConfigOption( - name = "Enabled", - desc = "Tracks all of your drops from Frozen Treasure in the Glacial Caves.\n" + - "§eIce calculations are an estimate but are relatively accurate." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption( - name = "Text Format", - desc = "Drag text to change the appearance of the overlay." - ) - @ConfigEditorDraggableList( - exampleText = { - "§1§lFrozen Treasure Tracker", - "§61,636 Treasures Mined", - "§33.2m Total Ice", - "§3342,192 Ice/hr", - "§81,002 Compact Procs", - " ", - "§b182 §fWhite Gift", - "§b94 §aGreen Gift", - "§b17 §9§cRed Gift", - "§b328 §fPacked Ice", - "§b80 §aEnchanted Ice", - "§b4 §9Enchanted Packed Ice", - "§b182 §aIce Bait", - "§b3 §aGlowy Chum Bait", - "§b36 §5Glacial Fragment", - "§b6 §fGlacial Talisman", - " ", - } - ) - public List textFormat = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 14, 15)); - - @Expose - @ConfigOption(name = "Only in Glacial Cave", desc = "Only shows the overlay while in the Glacial Cave.") - @ConfigEditorBoolean - public boolean onlyInCave = true; - - @Expose - @ConfigOption(name = "Show as Drops", desc = "Multiplies the numbers on the display by the base drop. \n" + - "E.g. 3 Ice Bait -> 48 Ice Bait") - @ConfigEditorBoolean - public boolean showAsDrops = false; - - @Expose - @ConfigOption(name = "Hide Chat Messages", desc = "Hides the chat messages from Frozen Treasures.") - @ConfigEditorBoolean - public boolean hideMessages = false; - - @Expose - public Position position = new Position(10, 80, false, true); - } - - @Expose - @ConfigOption(name = "Island Close Time", desc = "While on the Winter Island, show a timer until Jerry's Workshop closes.") - @ConfigEditorBoolean - @FeatureToggle - public boolean islandCloseTime = true; - - @Expose - public Position islandCloseTimePosition = new Position(10, 10, false, true); - - } - - @ConfigOption(name = "City Project", desc = "") - @Accordion - @Expose - public CityProjectConfig cityProject = new CityProjectConfig(); - - public static class CityProjectConfig { - - @Expose - @ConfigOption(name = "Show Materials", desc = "Show materials needed for contributing to the City Project.") - @ConfigEditorBoolean - @FeatureToggle - public boolean showMaterials = true; - - @Expose - @ConfigOption(name = "Show Ready", desc = "Mark contributions that are ready to participate.") - @ConfigEditorBoolean - @FeatureToggle - public boolean showReady = true; - - @Expose - @ConfigOption(name = "Daily Reminder", desc = "Remind every 24 hours to participate.") - @ConfigEditorBoolean - @FeatureToggle - public boolean dailyReminder = true; - - @Expose - public Position pos = new Position(150, 150, false, true); - } - - @ConfigOption(name = "Mayor Jerry's Jerrypocalypse", desc = "") - @Accordion - @Expose - public MayorJerryConfig jerry = new MayorJerryConfig(); - - public static class MayorJerryConfig { - - @Expose - @ConfigOption(name = "Highlight Jerries", desc = "Highlights Jerries found from the Jerrypocalypse perk. Highlight color is based on color of the Jerry.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlightJerries = true; - - } - - @ConfigOption(name = "The Great Spook", desc = "") - @Accordion - @Expose - public GreatSpookConfig spook = new GreatSpookConfig(); - - public static class GreatSpookConfig { - - @Expose - @ConfigOption(name = "Primal Fear Timer", desc = "Shows cooldown timer for next primal fear.") - @ConfigEditorBoolean - @FeatureToggle - public boolean primalFearTimer = false; - - @Expose - @ConfigOption(name = "Primal Fear Notify", desc = "Plays a notification sound when the next primal fear can spawn.") - @ConfigEditorBoolean - @FeatureToggle - public boolean primalFearNotification = false; - - @Expose - public Position positionTimer = new Position(20, 20, false, true); - - @Expose - @ConfigOption(name = "Fear Stat Display", desc = "Shows your current Fear stat value.") - @ConfigEditorBoolean - @FeatureToggle - public boolean fearStatDisplay = false; - - @Expose - public Position positionFear = new Position(30, 30, false, true); - - @Expose - @ConfigOption(name = "IRL Time Left", desc = "Shows the IRL time left before The Great Spook ends.") - @ConfigEditorBoolean - @FeatureToggle - public boolean greatSpookTimeLeft = false; - - @Expose - public Position positionTimeLeft = new Position(40, 40, false, true); - - } - - // comment in if the event is needed again -// @ConfigOption(name = "300þ Anniversary Celebration", desc = "Features for the 300þ year of SkyBlock") - @Accordion - @Expose - public CenturyConfig century = new CenturyConfig(); - - public static class CenturyConfig { - - @ConfigOption(name = "Enable Active Player Timer", desc = "Show a HUD telling you how much longer you have to wait to be eligible for another free ticket.") - @Expose - @ConfigEditorBoolean - @FeatureToggle - public boolean enableActiveTimer = true; - - @Expose - public Position activeTimerPosition = new Position(100, 100, false, true); - - @ConfigOption(name = "Enable Active Player Alert", desc = "Loudly proclaim when it is time to break some wheat.") - @Expose - @ConfigEditorBoolean - public boolean enableActiveAlert = false; - } - - @Expose - @ConfigOption(name = "Main Lobby Halloween Basket Waypoints", desc = "") - @Accordion - public halloweenBasketConfig halloweenBasket = new halloweenBasketConfig(); - - public static class halloweenBasketConfig { - - @Expose - @ConfigOption(name = "Basket Waypoints", desc = "Show all Halloween Basket waypoints.\nShoutout to §bTobbbb §7for the coordinates.\n(AS OF 2023)") - @ConfigEditorBoolean - @FeatureToggle - public boolean allWaypoints = false; - - @Expose - @ConfigOption(name = "Entrance Waypoints", desc = "Show helper waypoints to Baskets #23, #24, and #25. Coordinates by §bErymanthus§7.") - @ConfigEditorBoolean - public boolean allEntranceWaypoints = false; - - @Expose - @ConfigOption(name = "Only Closest", desc = "Only show the closest waypoint") - @ConfigEditorBoolean - public boolean onlyClosest = true; - } - -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java deleted file mode 100644 index 11a21d083..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java +++ /dev/null @@ -1,309 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import at.hannibal2.skyhanni.config.FeatureToggle; -import at.hannibal2.skyhanni.config.core.config.Position; -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; -import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; -import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; -import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; -import io.github.moulberry.moulconfig.annotations.ConfigOption; -import io.github.moulberry.moulconfig.observer.Property; -import org.lwjgl.input.Keyboard; - -public class FishingConfig { - - @Expose - @ConfigOption(name = "Trophy Fishing", desc = "") - @Accordion - public TrophyFishingConfig trophyFishing = new TrophyFishingConfig(); - - public static class TrophyFishingConfig { - - @Expose - @ConfigOption(name = "Trophy Fishing Chat Messages", desc = "") - @Accordion - public ChatMessagesConfig chatMessages = new ChatMessagesConfig(); - - public static class ChatMessagesConfig { - - @Expose - @ConfigOption( - name = "Trophy Counter", - desc = "Counts Trophy messages from chat and tells you how many you have found." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption( - name = "Trophy Counter Design", - desc = "§fStyle 1: §72. §6§lGOLD §5Moldfin\n" + - "§fStyle 2: §bYou caught a §5Moldfin §6§lGOLD§b. §7(2)\n" + - "§fStyle 3: §bYou caught your 2nd §6§lGOLD §5Moldfin§b." - ) - @ConfigEditorDropdown(values = {"Style 1", "Style 2", "Style 3"}) - public int design = 0; - - @Expose - @ConfigOption(name = "Show Total Amount", desc = "Show total amount of all rarities at the end of the chat message.") - @ConfigEditorBoolean - public boolean totalAmount = false; - - @Expose - @ConfigOption(name = "Trophy Fish Info", desc = "Show information and stats about a Trophy Fish when hovering over a catch message in chat.") - @ConfigEditorBoolean - @FeatureToggle - public boolean tooltip = true; - - @Expose - @ConfigOption(name = "Hide Repeated Catches", desc = "Delete past catches of the same Trophy Fish from chat.") - @ConfigEditorBoolean - @FeatureToggle - public boolean duplicateHider = false; - - @Expose - @ConfigOption(name = "Bronze Duplicates", desc = "Hide duplicate messages for bronze Trophy Fishes from chat.") - @ConfigEditorBoolean - public boolean bronzeHider = false; - - @Expose - @ConfigOption(name = "Silver Duplicates", desc = "Hide duplicate messages for silver Trophy Fishes from chat.") - @ConfigEditorBoolean - public boolean silverHider = false; - } - - @Expose - @ConfigOption(name = "Fillet Tooltip", desc = "Show fillet value of Trophy Fish in tooltip.") - @ConfigEditorBoolean - @FeatureToggle - public boolean filletTooltip = true; - - @Expose - @ConfigOption(name = "Odger Waypoint", desc = "Show the Odger waypoint when Trophy Fishes are in the inventory and no lava rod in hand.") - @ConfigEditorBoolean - @FeatureToggle - public boolean odgerLocation = true; - } - - @Expose - @ConfigOption(name = "Thunder Spark", desc = "") - @Accordion - public ThunderSparkConfig thunderSpark = new ThunderSparkConfig(); - - public static class ThunderSparkConfig { - @Expose - @ConfigOption(name = "Thunder Spark Highlight", desc = "Highlight Thunder Sparks after killing a Thunder.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlight = false; - - @Expose - @ConfigOption(name = "Thunder Spark Color", desc = "Color of the Thunder Sparks.") - @ConfigEditorColour - public String color = "0:255:255:255:255"; - } - - @Expose - @ConfigOption(name = "Barn Fishing Timer", desc = "") - @Accordion - public BarnTimerConfig barnTimer = new BarnTimerConfig(); - - public static class BarnTimerConfig { - @Expose - @ConfigOption( - name = "Barn Fishing Timer", - desc = "Show the time and amount of sea creatures while fishing on the barn via hub." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption( - name = "Worm Fishing", - desc = "Show the Barn Fishing Timer even for worms or other sea creatures in the Crystal Hollows." - ) - @ConfigEditorBoolean - public boolean crystalHollows = true; - - @Expose - @ConfigOption( - name = "Stranded Fishing", - desc = "Show the Barn Fishing Timer even on all the different islands Stranded players can visit." - ) - @ConfigEditorBoolean - public boolean forStranded = true; - - @Expose - @ConfigOption( - name = "Worm Cap Alert", - desc = "Alerts you with title and sound if you hit the Worm Sea Creature limit of 60." - ) - @ConfigEditorBoolean - public boolean wormLimitAlert = true; - - @Expose - @ConfigOption(name = "Reset Timer Hotkey", desc = "Press this key to reset the timer manualy") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) - public int manualResetTimer = Keyboard.KEY_NONE; - - @Expose - @ConfigOption(name = "Fishing Timer Alert", desc = "Change the amount of time in seconds until the timer dings.") - @ConfigEditorSlider( - minValue = 240, - maxValue = 360, - minStep = 10 - ) - public int alertTime = 330; - - @Expose - public Position pos = new Position(10, 10, false, true); - } - - @Expose - @ConfigOption(name = "Chum/Chumcap Bucket Hider", desc = "") - @Accordion - public ChumBucketHiderConfig chumBucketHider = new ChumBucketHiderConfig(); - - public static class ChumBucketHiderConfig { - - @Expose - @ConfigOption(name = "Enable", desc = "Hide the Chum/Chumcap Bucket name tags for other players.") - @ConfigEditorBoolean - @FeatureToggle - public Property enabled = Property.of(true); - - @Expose - @ConfigOption(name = "Hide Bucket", desc = "Hide the Chum/Chumcap Bucket.") - @ConfigEditorBoolean - public Property hideBucket = Property.of(false); - - @Expose - @ConfigOption(name = "Hide Own", desc = "Hides your own Chum/Chumcap Bucket.") - @ConfigEditorBoolean - public Property hideOwn = Property.of(false); - } - - @Expose - @ConfigOption(name = "Fished Item Name", desc = "") - @Accordion - public FishedItemNameConfig fishedItemName = new FishedItemNameConfig(); - - public static class FishedItemNameConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Show the fished item name above the item when fishing.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Show Bait", desc = "Also show the name of the consumed bait.") - @ConfigEditorBoolean - public boolean showBaits = false; - - } - - @Expose - @ConfigOption(name = "Fishing Hook Display", desc = "") - @Accordion - public FishingHookDisplayConfig fishingHookDisplay = new FishingHookDisplayConfig(); - - public static class FishingHookDisplayConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Display the Hypixel timer until the fishing hook can be pulled out of the water/lava, only bigger and on your screen.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption( - name = "Hide Armor Stand", - desc = "Hide the original armor stand from Hypixel when the SkyHanni display is enabled." - ) - @ConfigEditorBoolean - public boolean hideArmorStand = true; - - @Expose - public Position position = new Position(460, -240, 3.4f); - } - - @Expose - @ConfigOption(name = "Bait Warnings", desc = "") - @Accordion - public FishingBaitWarningsConfig fishingBaitWarnings = new FishingBaitWarningsConfig(); - - public static class FishingBaitWarningsConfig { - @Expose - @ConfigOption(name = "Bait Change Warning", desc = "Show warning when fishing bait is changed") - @ConfigEditorBoolean - @FeatureToggle - public boolean baitChangeWarning = false; - - @Expose - @ConfigOption(name = "No Bait Warning", desc = "Show warning when no bait is used") - @ConfigEditorBoolean - @FeatureToggle - public boolean noBaitWarning = false; - } - - @Expose - @ConfigOption(name = "Rare Sea Creatures", desc = "") - @Accordion - public RareCatches rareCatches = new RareCatches(); - - public static class RareCatches { - - @Expose - @ConfigOption(name = "Alert (Own Sea Creatures)", desc = "Show an alert on screen when you catch a rare sea creature.") - @ConfigEditorBoolean - @FeatureToggle - public boolean alertOwnCatches = true; - - @Expose - @ConfigOption(name = "Alert (Other Sea Creatures)", desc = "Show an alert on screen when other players nearby catch a rare sea creature.") - @ConfigEditorBoolean - public boolean alertOtherCatches = false; - - @Expose - @ConfigOption(name = "Play Sound Alert", desc = "Play a sound effect when rare sea creature alerts are displayed.") - @ConfigEditorBoolean - public boolean playSound = true; - - @Expose - @ConfigOption(name = "Highlight", desc = "Highlight nearby rare sea creatures.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlight = false; - - } - - @Expose - @ConfigOption( - name = "Shark Fish Counter", - desc = "Counts how many Sharks have been caught." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean sharkFishCounter = false; - - @Expose - public Position sharkFishCounterPos = new Position(10, 10, false, true); - - @Expose - @ConfigOption(name = "Shorten Fishing Message", desc = "Shortens the chat message that says what type of Sea Creature you have fished.") - @ConfigEditorBoolean - @FeatureToggle - public boolean shortenFishingMessage = false; - - @Expose - @ConfigOption(name = "Compact Double Hook", desc = "Adds Double Hook to the Sea Creature chat message instead of in a previous line.") - @ConfigEditorBoolean - @FeatureToggle - public boolean compactDoubleHook = true; -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/GUIConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/GUIConfig.java deleted file mode 100644 index 992ef03d9..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/GUIConfig.java +++ /dev/null @@ -1,174 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import at.hannibal2.skyhanni.config.FeatureToggle; -import at.hannibal2.skyhanni.config.commands.Commands; -import at.hannibal2.skyhanni.config.core.config.Position; -import at.hannibal2.skyhanni.data.GuiEditManager; -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorButton; -import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; -import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; -import io.github.moulberry.moulconfig.annotations.ConfigEditorText; -import io.github.moulberry.moulconfig.annotations.ConfigOption; -import io.github.moulberry.moulconfig.observer.Property; -import org.lwjgl.input.Keyboard; - -public class GUIConfig { - - @ConfigOption(name = "Edit GUI Locations", desc = "Change the position of SkyHanni's overlays.") - @ConfigEditorButton(buttonText = "Edit") - public Runnable positions = GuiEditManager::openGuiPositionEditor; - - @Expose - @ConfigOption(name = "Open Hotkey", desc = "Press this key to open the GUI Editor.") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) - public int keyBindOpen = Keyboard.KEY_NONE; - - @Expose - @ConfigOption(name = "Global GUI Scale", desc = "Globally scale all SkyHanni GUIs.") - @ConfigEditorSlider(minValue = 0.1F, maxValue = 10, minStep = 0.05F) - public float globalScale = 1F; - - - @Expose - @ConfigOption(name = "Modify Visual Words", desc = "") - @Accordion - public ModifyWords modifyWords = new ModifyWords(); - - public static class ModifyWords { - - @Expose - @ConfigOption(name = "Enabled", desc = "Enables replacing all instances of a word or phrase with another word or phrase.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Work Outside SkyBlock", desc = "Allows modifying visual words anywhere on Hypixel.") - @ConfigEditorBoolean - @FeatureToggle - public boolean workOutside = false; - - @ConfigOption(name = "Open Config", desc = "Opens the menu to setup the visual words.\n§eCommand: /shwords") - @ConfigEditorButton(buttonText = "Open") - public Runnable open = Commands::openVisualWords; - - } - - @Expose - @ConfigOption(name = "Custom Text Box", desc = "") - @Accordion - public TextBoxConfig customTextBox = new TextBoxConfig(); - - public static class TextBoxConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Enables showing the textbox while in SkyBlock.") - @ConfigEditorBoolean - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Text", desc = "Enter text you want to display here.\n" + - "§eUse '&' as the colour code character.\n" + - "§eUse '\\n' as the line break character.") - @ConfigEditorText - public Property text = Property.of("&aYour Text Here\\n&bYour new line here"); - - @Expose - public Position position = new Position(10, 80, false, true); - } - - @Expose - @ConfigOption(name = "Real Time", desc = "Display the current computer time, a handy feature when playing in full-screen mode.") - @ConfigEditorBoolean - @FeatureToggle - public boolean realTime = false; - - @Expose - @ConfigOption(name = "Real Time 12h Format", desc = "Display the current computer time in 12hr Format rather than 24h Format.") - @ConfigEditorBoolean - public boolean realTimeFormatToggle = false; - - @Expose - public Position realTimePosition = new Position(10, 10, false, true); - - - @Expose - @ConfigOption(name = "In-Game Date", desc = "") - @Accordion - public InGameDateConfig inGameDate = new InGameDateConfig(); - - public static class InGameDateConfig { - - @Expose - @ConfigOption( - name = "Enabled", - desc = "Show the in-game date of SkyBlock (like in Apec, §ebut with mild delays§7).\n" + - "(Though this one includes the SkyBlock year!)" - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - public Position position = new Position(10, 10, false, true); - - @Expose - @ConfigOption( - name = "Use Scoreboard for Date", - desc = "Uses the scoreboard instead to find the current month, date, and time. Greater \"accuracy\", depending on who's asking." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean useScoreboard = true; - - @Expose - @ConfigOption( - name = "Show Sun/Moon", - desc = "Show the sun or moon symbol seen on the scoreboard." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean includeSunMoon = true; - - @Expose - @ConfigOption( - name = "Show Date Ordinal", - desc = "Show the date's ordinal suffix. Ex: (1st <-> 1, 22nd <-> 22, 23rd <-> 3, 24th <-> 24, etc.)" - ) - @ConfigEditorBoolean - //@FeatureToggle - public boolean includeOrdinal = false; - - @Expose - @ConfigOption( - name = "Refresh Rate", - desc = "Change the time in seconds you would like to refresh the In-Game Date Display." + - "\n§eNOTE: If \"Use Scoreboard for Date\" is enabled, this setting is ignored." - ) - @ConfigEditorSlider( - minValue = 1, - maxValue = 60, - minStep = 1 - ) - public int refreshSeconds = 30; - } - - - @Expose - @ConfigOption(name = "TPS Display", desc = "Show the TPS of the current server, like in Soopy.") - @ConfigEditorBoolean - @FeatureToggle - public boolean tpsDisplay = false; - - @Expose - public Position tpsDisplayPosition = new Position(10, 10, false, true); - - @Expose - @ConfigOption(name = "Config Button", desc = "Add a button to the pause menu to configure SkyHanni.") - @ConfigEditorBoolean - @FeatureToggle - public boolean configButtonOnPause = true; -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/GardenConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/GardenConfig.java deleted file mode 100644 index 3deaec46f..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/GardenConfig.java +++ /dev/null @@ -1,1488 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import at.hannibal2.skyhanni.config.FeatureToggle; -import at.hannibal2.skyhanni.config.commands.Commands; -import at.hannibal2.skyhanni.config.core.config.Position; -import at.hannibal2.skyhanni.features.garden.inventory.GardenPlotIcon; -import at.hannibal2.skyhanni.utils.LorenzUtils; -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorButton; -import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; -import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; -import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; -import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; -import io.github.moulberry.moulconfig.annotations.ConfigEditorText; -import io.github.moulberry.moulconfig.annotations.ConfigOption; -import io.github.moulberry.moulconfig.observer.Property; -import net.minecraft.client.Minecraft; -import org.lwjgl.input.Keyboard; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -public class GardenConfig { - - @Expose - @ConfigOption(name = "SkyMart", desc = "") - @Accordion - public SkyMartConfig skyMart = new SkyMartConfig(); - - public static class SkyMartConfig { - @Expose - @ConfigOption(name = "Copper Price", desc = "Show copper to coin prices inside the SkyMart inventory.") - @ConfigEditorBoolean - @FeatureToggle - public boolean copperPrice = true; - - @Expose - @ConfigOption(name = "Advanced Stats", desc = "Show the BIN price and copper price for every item.") - @ConfigEditorBoolean - public boolean copperPriceAdvancedStats = false; - - @Expose - public Position copperPricePos = new Position(211, 132, false, true); - } - - @Expose - @ConfigOption(name = "Visitor", desc = "") - @Accordion - public VisitorConfig visitors = new VisitorConfig(); - - public static class VisitorConfig { - @Expose - @ConfigOption(name = "Visitor Timer", desc = "") - @Accordion - public TimerConfig timer = new TimerConfig(); - - public static class TimerConfig { - @Expose - @ConfigOption(name = "Visitor Timer", desc = "Timer when the next visitor will appear, " + - "and a number for how many visitors are already waiting.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Sixth Visitor Estimate", desc = "Estimate when the sixth visitor in the queue will arrive. " + - "May be inaccurate with co-op members farming simultaneously.") - @ConfigEditorBoolean - public boolean sixthVisitorEnabled = true; - - @Expose - @ConfigOption(name = "Sixth Visitor Warning", desc = "Notifies when it is believed that the sixth visitor has arrived. " + - "May be inaccurate with co-op members farming simultaneously.") - @ConfigEditorBoolean - public boolean sixthVisitorWarning = true; - - @Expose - @ConfigOption(name = "New Visitor Ping", desc = "Pings you when you are less than 10 seconds away from getting a new visitor. " + - "§eUseful for getting Ephemeral Gratitudes during the 2023 Halloween event.") - @ConfigEditorBoolean - public boolean newVisitorPing = false; - - @Expose - public Position pos = new Position(390, 65, false, true); - } - - @Expose - @ConfigOption(name = "Visitor Items Needed", desc = "") - @Accordion - public NeedsConfig needs = new NeedsConfig(); - - public static class NeedsConfig { - @Expose - @ConfigOption(name = "Items Needed", desc = "Show all items needed for the visitors.") - @ConfigEditorBoolean - @FeatureToggle - public boolean display = true; - - @Expose - public Position pos = new Position(180, 170, false, true); - - @Expose - @ConfigOption(name = "Only when Close", desc = "Only show the needed items when close to the visitors.") - @ConfigEditorBoolean - public boolean onlyWhenClose = false; - - @Expose - @ConfigOption(name = "Bazaar Alley", desc = "Show the Visitor Items List while inside the Bazaar Alley in the Hub. " + - "This helps buying the correct amount when not having a Booster Cookie Buff active.") - @ConfigEditorBoolean - public boolean inBazaarAlley = true; - - @Expose - @ConfigOption(name = "Show Price", desc = "Show the coin price in the items needed list.") - @ConfigEditorBoolean - public boolean showPrice = true; - - @Expose - @ConfigOption(name = "Item Preview", desc = "Show the base type for the required items next to new visitors. §cNote that some visitors may require any crop.") - @ConfigEditorBoolean - @FeatureToggle - public boolean itemPreview = true; - } - - @Expose - @ConfigOption(name = "Visitor Inventory", desc = "") - @Accordion - public InventoryConfig inventory = new InventoryConfig(); - - public static class InventoryConfig { - @Expose - @ConfigOption(name = "Visitor Price", desc = "Show the Bazaar price of the items required for the visitors, like in NEU.") - @ConfigEditorBoolean - @FeatureToggle - public boolean showPrice = false; - - @Expose - @ConfigOption(name = "Amount and Time", desc = "Show the exact item amount and the remaining time when farmed manually. Especially useful for Ironman.") - @ConfigEditorBoolean - public boolean exactAmountAndTime = true; - - @Expose - @ConfigOption(name = "Copper Price", desc = "Show the price per copper inside the visitor GUI.") - @ConfigEditorBoolean - @FeatureToggle - public boolean copperPrice = true; - - @Expose - @ConfigOption(name = "Copper Time", desc = "Show the time required per copper inside the visitor GUI.") - @ConfigEditorBoolean - @FeatureToggle - public boolean copperTime = false; - - @Expose - @ConfigOption(name = "Garden Exp Price", desc = "Show the price per garden experience inside the visitor GUI.") - @ConfigEditorBoolean - @FeatureToggle - public boolean experiencePrice = false; - } - - @Expose - @ConfigOption(name = "Visitor Reward Warning", desc = "") - @Accordion - public RewardWarningConfig rewardWarning = new RewardWarningConfig(); - - public static class RewardWarningConfig { - - @Expose - @ConfigOption(name = "Notify in Chat", desc = "Send a chat message once you talk to a visitor with reward.") - @ConfigEditorBoolean - @FeatureToggle - public boolean notifyInChat = true; - - @Expose - @ConfigOption(name = "Show over Name", desc = "Show the reward name above the visitor name.") - @ConfigEditorBoolean - @FeatureToggle - public boolean showOverName = true; - - @Expose - @ConfigOption(name = "Prevent Refusing", desc = "Prevent the refusal of a visitor with reward.") - @ConfigEditorBoolean - @FeatureToggle - public boolean preventRefusing = true; - - @Expose - @ConfigOption(name = "Bypass Key", desc = "Hold that key to bypass the Prevent Refusing feature.") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) - public int bypassKey = Keyboard.KEY_NONE; - - - /** - * Sync up with {at.hannibal2.skyhanni.features.garden.visitor.VisitorReward} - */ - @Expose - @ConfigOption( - name = "Items", - desc = "Warn for these reward items." - ) - @ConfigEditorDraggableList( - exampleText = { - "§9Flowering Bouquet", - "§9Overgrown Grass", - "§9Green Bandana", - "§9Dedication IV", - "§9Music Rune", - "§cSpace Helmet", - "§9Cultivating I", - "§9Replenish I", - } - ) - public List drops = new ArrayList<>(Arrays.asList(1, 2, 3, 4, 5, 6)); - } - - @Expose - @ConfigOption(name = "Notification Chat", desc = "Show in chat when a new visitor is visiting your island.") - @ConfigEditorBoolean - @FeatureToggle - public boolean notificationChat = true; - - @Expose - @ConfigOption(name = "Notification Title", desc = "Show a title when a new visitor is visiting your island.") - @ConfigEditorBoolean - @FeatureToggle - public boolean notificationTitle = true; - - @Expose - @ConfigOption(name = "Highlight Status", desc = "Highlight the status for visitors with a text above or with color.") - @ConfigEditorDropdown(values = {"Color Only", "Name Only", "Both", "Disabled"}) - public int highlightStatus = 2; - - @Expose - @ConfigOption(name = "Colored Name", desc = "Show the visitor name in the color of the rarity.") - @ConfigEditorBoolean - @FeatureToggle - public boolean coloredName = true; - - @Expose - @ConfigOption(name = "Hypixel Message", desc = "Hide the chat message from Hypixel that a new visitor has arrived at your garden.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hypixelArrivedMessage = true; - - @Expose - @ConfigOption(name = "Hide Chat", desc = "Hide chat messages from the visitors in garden. (Except Beth and Spaceman)") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideChat = true; - - @Expose - @ConfigOption(name = "Visitor Drops Statistics Counter", desc = "") - @Accordion - public DropsStatisticsConfig dropsStatistics = new DropsStatisticsConfig(); - - public static class DropsStatisticsConfig { - - @Expose - @ConfigOption( - name = "Enabled", - desc = "Tallies up statistic about visitors and the rewards you have received from them." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption( - name = "Text Format", - desc = "Drag text to change the appearance of the overlay." - ) - @ConfigEditorDraggableList( - exampleText = { - "§e§lVisitor Statistics", - "§e1,636 Total", - "§a1,172§f-§9382§f-§681§f-§c1", - "§21,382 Accepted", - "§c254 Denied", - " ", - "§c62,072 Copper", - "§33.2m Farming EXP", - "§647.2m Coins Spent", - "§b23 §9Flowering Bouquet", - "§b4 §9Overgrown Grass", - "§b2 §5Green Bandana", - "§b1 §9Dedication IV", - "§b6 §b◆ Music Rune I", - "§b1 §cSpace Helmet", - "§b1 §9Cultivating I", - "§b1 §9Replenish I", - " ", // If they want another empty row - "§212,600 Garden EXP", - "§b4.2k Bits", - "§220k Mithril Powder", - "§d18k Gemstone Powder", - } - ) - public List textFormat = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12)); - - - @Expose - @ConfigOption(name = "Display Numbers First", desc = "Determines whether the number or drop name displays first. " + - "§eNote: Will not update the preview above!") - @ConfigEditorBoolean - public boolean displayNumbersFirst = true; - - @Expose - @ConfigOption(name = "Display Icons", desc = "Replaces the drop names with icons. " + - "§eNote: Will not update the preview above!") - @ConfigEditorBoolean - public boolean displayIcons = false; - - @Expose - @ConfigOption(name = "Only on Barn Plot", desc = "Only shows the overlay while on the Barn plot.") - @ConfigEditorBoolean - public boolean onlyOnBarn = true; - - @Expose - public Position pos = new Position(5, 20, false, true); - } - - @Expose - @ConfigOption( - name = "Accept Hotkey", - desc = "Accept a visitor when you press this keybind while in the visitor GUI. " + - "§eUseful for getting Ephemeral Gratitudes during the 2023 Halloween event." - ) - @ConfigEditorKeybind( - defaultKey = Keyboard.KEY_NONE - ) - public int acceptHotkey = Keyboard.KEY_NONE; - - - @Expose - @ConfigOption( - name = "Highlight Visitors in SkyBlock", - desc = "Highlights Visitors outside of the Garden" - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean highlightVisitors = false; - - - @Expose - @ConfigOption( - name = "Block Interacting with Visitors", - desc = "Blocks you from interacting with / unlocking Visitors to allow for Dedication Cycling" - ) - @ConfigEditorDropdown - public VisitorBlockBehaviour blockInteracting = VisitorBlockBehaviour.ONLY_ON_BINGO; - - public enum VisitorBlockBehaviour { - DONT("Don't"), ALWAYS("Always"), ONLY_ON_BINGO("Only on Bingo"); - - final String str; - - VisitorBlockBehaviour(String str) { - this.str = str; - } - - @Override - public String toString() { - return str; - } - } - - } - - @Expose - @ConfigOption(name = "Numbers", desc = "") - @Accordion - public NumbersConfig number = new NumbersConfig(); - - public static class NumbersConfig { - @Expose - @ConfigOption(name = "Crop Milestone", desc = "Show the number of crop milestones in the inventory.") - @ConfigEditorBoolean - @FeatureToggle - public boolean cropMilestone = true; - - @Expose - @ConfigOption(name = "Average Milestone", desc = "Show the average crop milestone in the crop milestone inventory.") - @ConfigEditorBoolean - @FeatureToggle - public boolean averageCropMilestone = true; - - @Expose - @ConfigOption(name = "Crop Upgrades", desc = "Show the number of upgrades in the crop upgrades inventory.") - @ConfigEditorBoolean - @FeatureToggle - public boolean cropUpgrades = true; - - @Expose - @ConfigOption(name = "Composter Upgrades", desc = "Show the number of upgrades in the Composter upgrades inventory.") - @ConfigEditorBoolean - @FeatureToggle - public boolean composterUpgrades = true; - } - - @Expose - @ConfigOption(name = "Crop Milestones", desc = "") - @Accordion - public CropMilestonesConfig cropMilestones = new CropMilestonesConfig(); - - public static class CropMilestonesConfig { - @Expose - @ConfigOption( - name = "Progress Display", - desc = "Shows the progress and ETA until the next crop milestone is reached and the current crops/minute value. " + - "§eRequires a tool with either a counter or Cultivating enchantment for full accuracy." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean progress = true; - - @Expose - @ConfigOption( - name = "Warn When Close", - desc = "Warn with title and sound when the next crop milestone upgrade happens in 5 seconds. " + - "Useful for switching to a different pet for leveling.") - @ConfigEditorBoolean - public boolean warnClose = false; - - @Expose - @ConfigOption( - name = "Time Format", - desc = "Change the highest time unit to show (1h30m vs 90min)") - @ConfigEditorDropdown(values = {"Year", "Day", "Hour", "Minute", "Second"}) - public Property highestTimeFormat = Property.of(0); - - @Expose - @ConfigOption( - name = "Maxed Milestone", - desc = "Calculate the progress and ETA till maxed milestone (46) instead of next milestone.") - @ConfigEditorBoolean - public Property bestShowMaxedNeeded = Property.of(false); - - @Expose - @ConfigOption( - name = "Milestone Text", - desc = "Drag text to change the appearance of the overlay.\n" + - "Hold a farming tool to show the overlay." - ) - @ConfigEditorDraggableList( - exampleText = { - "§6Crop Milestones", - "§7Pumpkin Tier 22", - "§e12,300§8/§e100,000", - "§7In §b12m 34s", - "§7Crops/Minute§8: §e12,345", - "§7Blocks/Second§8: §e19.85", - "§7Percentage: §e12.34%", - } - ) - public List text = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5)); - - @Expose - @ConfigOption(name = "Block Broken Precision", desc = "The amount of decimals displayed in blocks/second.") - @ConfigEditorSlider( - minValue = 0, - maxValue = 6, - minStep = 1 - ) - public int blocksBrokenPrecision = 2; - - @Expose - @ConfigOption(name = "Seconds Before Reset", desc = "How many seconds of not farming until blocks/second resets.") - @ConfigEditorSlider( - minValue = 2, - maxValue = 60, - minStep = 1 - ) - public int blocksBrokenResetTime = 5; - - @Expose - public Position progressDisplayPos = new Position(-400, -200, false, true); - - @Expose - @ConfigOption(name = "Best Crop", desc = "") - @Accordion - public NextConfig next = new NextConfig(); - - // TODO moulconfig runnable support - public static class NextConfig { - @Expose - @ConfigOption( - name = "Best Display", - desc = "Lists all crops and their ETA till next milestone. Sorts for best crop for getting garden or SkyBlock levels.") - @ConfigEditorBoolean - @FeatureToggle - public boolean bestDisplay = true; - - // TODO moulconfig runnable support - @Expose - @ConfigOption(name = "Sort Type", desc = "Sort the crops by either garden or SkyBlock EXP.") - @ConfigEditorDropdown(values = {"Garden Exp", "SkyBlock Exp"}) - public int bestType = 0; - - // TODO moulconfig runnable support - @Expose - @ConfigOption(name = "Only Show Top", desc = "Only show the top # crops.") - @ConfigEditorSlider( - minValue = 1, - maxValue = 10, - minStep = 1 - ) - public int showOnlyBest = 10; - - @Expose - @ConfigOption(name = "Extend Top List", desc = "Add current crop to the list if its lower ranked than the set limit by extending the list.") - @ConfigEditorBoolean - public boolean showCurrent = true; - - // TODO moulconfig runnable support - @Expose - @ConfigOption( - name = "Always On", - desc = "Show the Best Display always while on the garden.") - @ConfigEditorBoolean - public boolean bestAlwaysOn = false; - - @Expose - @ConfigOption( - name = "Compact Display", - desc = "A more compact best crop time: Removing the crop name and exp, hide the # number and using a more compact time format.") - @ConfigEditorBoolean - public boolean bestCompact = false; - - @Expose - @ConfigOption( - name = "Hide Title", - desc = "Hides the 'Best Crop Time' line entirely.") - @ConfigEditorBoolean - public boolean bestHideTitle = false; - - - @Expose - public Position displayPos = new Position(-200, -200, false, true); - } - - @Expose - @ConfigOption(name = "Mushroom Pet Perk", desc = "") - @Accordion - public MushroomPetPerkConfig mushroomPetPerk = new MushroomPetPerkConfig(); - - // TODO moulconfig runnable support - public static class MushroomPetPerkConfig { - @Expose - @ConfigOption( - name = "Display Enabled", - desc = "Show the progress and ETA for mushroom crops when farming other crops because of the Mooshroom Cow perk.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption( - name = "Mushroom Text", - desc = "Drag text to change the appearance of the overlay.\n" + - "Hold a farming tool to show the overlay." - ) - @ConfigEditorDraggableList( - exampleText = { - "§6Mooshroom Cow Perk", - "§7Mushroom Tier 8", - "§e6,700§8/§e15,000", - "§7In §b12m 34s", - "§7Percentage: §e12.34%", - } - ) - public List text = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); - - @Expose - public Position pos = new Position(-112, -143, false, true); - } - } - - // TODO moulconfig runnable support - @Expose - @ConfigOption(name = "Custom Keybinds", desc = "") - @Accordion - public KeyBindConfig keyBind = new KeyBindConfig(); - - public static class KeyBindConfig { - @Expose - @ConfigOption(name = "Enabled", desc = "Use custom keybinds while holding a farming tool or Daedalus Axe in the hand.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @ConfigOption(name = "Disable All", desc = "Disable all keys.") - @ConfigEditorButton(buttonText = "Disable") - public Runnable presetDisable = () -> { - attack = Keyboard.KEY_NONE; - useItem = Keyboard.KEY_NONE; - left = Keyboard.KEY_NONE; - right = Keyboard.KEY_NONE; - forward = Keyboard.KEY_NONE; - back = Keyboard.KEY_NONE; - jump = Keyboard.KEY_NONE; - sneak = Keyboard.KEY_NONE; - - Minecraft.getMinecraft().thePlayer.closeScreen(); - }; - - @ConfigOption(name = "Set Default", desc = "Reset all keys to default.") - @ConfigEditorButton(buttonText = "Default") - public Runnable presetDefault = () -> { - attack = -100; - useItem = -99; - left = Keyboard.KEY_A; - right = Keyboard.KEY_D; - forward = Keyboard.KEY_W; - back = Keyboard.KEY_S; - jump = Keyboard.KEY_SPACE; - sneak = Keyboard.KEY_LSHIFT; - Minecraft.getMinecraft().thePlayer.closeScreen(); - }; - - @Expose - @ConfigOption(name = "Attack", desc = "") - @ConfigEditorKeybind(defaultKey = -100) - public int attack = -100; - - @Expose - @ConfigOption(name = "Use Item", desc = "") - @ConfigEditorKeybind(defaultKey = -99) - public int useItem = -99; - - @Expose - @ConfigOption(name = "Move Left", desc = "") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_A) - public int left = Keyboard.KEY_A; - - @Expose - @ConfigOption(name = "Move Right", desc = "") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_D) - public int right = Keyboard.KEY_D; - - @Expose - @ConfigOption(name = "Move Forward", desc = "") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_W) - public int forward = Keyboard.KEY_W; - - @Expose - @ConfigOption(name = "Move Back", desc = "") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_S) - public int back = Keyboard.KEY_S; - - @Expose - @ConfigOption(name = "Jump", desc = "") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_SPACE) - public int jump = Keyboard.KEY_SPACE; - - @Expose - @ConfigOption(name = "Sneak", desc = "") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_LSHIFT) - public int sneak = Keyboard.KEY_LSHIFT; - } - - @Expose - @ConfigOption(name = "Optimal Speed", desc = "") - @Accordion - public OptimalSpeedConfig optimalSpeeds = new OptimalSpeedConfig(); - - public static class OptimalSpeedConfig { - @Expose - @ConfigOption(name = "Enabled", desc = "Show the optimal speed for your current tool in the hand.\n" + - "(Thanks MelonKingDE for the default values).") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Warning Title", desc = "Warn via title when you don't have the optimal speed.") - @ConfigEditorBoolean - public boolean warning = false; - - @Expose - @ConfigOption(name = "Rancher Boots", desc = "Allows you to set the optimal speed in the Rancher Boots overlay by clicking on the presets.") - @ConfigEditorBoolean - @FeatureToggle - public boolean signEnabled = true; - - @Expose - public Position signPosition = new Position(20, -195, false, true); - - @Expose - @ConfigOption(name = "Custom Speed", desc = "Change the exact speed for every single crop.") - @Accordion - public CustomSpeedConfig customSpeed = new CustomSpeedConfig(); - - public static class CustomSpeedConfig { - - @Expose - @ConfigOption(name = "Wheat", desc = "Suggested farm speed:\n" + - "§e5 Blocks§7: §f✦ 93 speed\n" + - "§e4 Blocks§7: §f✦ 116 speed") - @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) - public int wheat = 93; - - @Expose - @ConfigOption(name = "Carrot", desc = "Suggested farm speed:\n" + - "§e5 Blocks§7: §f✦ 93 speed\n" + - "§e4 Blocks§7: §f✦ 116 speed") - @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) - public int carrot = 93; - - @Expose - @ConfigOption(name = "Potato", desc = "Suggested farm speed:\n" + - "§e5 Blocks§7: §f✦ 93 speed\n" + - "§e4 Blocks§7: §f✦ 116 speed") - @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) - public int potato = 93; - - @Expose - @ConfigOption(name = "Nether Wart", desc = "Suggested farm speed:\n" + - "§e5 Blocks§7: §f✦ 93 speed\n" + - "§e4 Blocks§7: §f✦ 116 speed") - @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) - public int netherWart = 93; - - @Expose - @ConfigOption(name = "Pumpkin", desc = "Suggested farm speed:\n" + - "§e3 Blocks§7: §f✦ 155 speed\n" + - "§e2 Blocks§7: §f✦ 265 §7or §f400 speed") - @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) - public int pumpkin = 155; - - @Expose - @ConfigOption(name = "Melon", desc = "Suggested farm speed:\n" + - "§e3 Blocks§7: §f✦ 155 speed\n" + - "§e2 Blocks§7: §f✦ 265 or 400 speed") - @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) - public int melon = 155; - - @Expose - @ConfigOption(name = "Cocoa Beans", desc = "Suggested farm speed:\n" + - "§e3 Blocks§7: §f✦ 155 speed\n" + - "§e4 Blocks§7: §f✦ 116 speed") - @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) - public int cocoaBeans = 155; - - // TODO does other speed settings exist? - @Expose - @ConfigOption(name = "Sugar Cane", desc = "Suggested farm speed:\n" + - "§eYaw 45§7: §f✦ 328 speed") - @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) - public int sugarCane = 328; - - @Expose - @ConfigOption(name = "Cactus", desc = "Suggested farm speed:\n" + - "§eNormal§7: §f✦ 400 speed\n" + - "§eRacing Helmet§7: §f✦ 464 speed\n" + - "§eBlack Cat§7: §f✦ 464 speed") - @ConfigEditorSlider(minValue = 1, maxValue = 500, minStep = 1) - public int cactus = 400; - - // TODO does other speed settings exist? - @Expose - @ConfigOption(name = "Mushroom", desc = "Suggested farm speed:\n" + - "§eYaw 60§7: §f✦ 233 speed") - @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) - public int mushroom = 233; - } - - @Expose - public Position pos = new Position(5, -200, false, true); - } - - @Expose - @ConfigOption(name = "Garden Level", desc = "") - @Accordion - public GardenLevelConfig gardenLevels = new GardenLevelConfig(); - - public static class GardenLevelConfig { - @Expose - @ConfigOption(name = "Display", desc = "Show the current Garden level and progress to the next level.") - @ConfigEditorBoolean - @FeatureToggle - public boolean display = true; - - @Expose - public Position pos = new Position(390, 40, false, true); - } - - @Expose - @ConfigOption(name = "Farming Weight", desc = "") - @Accordion - public EliteFarmingWeightConfig eliteFarmingWeights = new EliteFarmingWeightConfig(); - - public static class EliteFarmingWeightConfig { - @Expose - @ConfigOption(name = "Display", desc = "Display your farming weight on screen. " + - "The calculation and API is provided by The Elite SkyBlock farmers. " + - "See §ehttps://elitebot.dev/info §7for more info.") - @ConfigEditorBoolean - @FeatureToggle - public boolean display = true; - - @Expose - public Position pos = new Position(180, 10, false, true); - - @Expose - @ConfigOption(name = "Leaderboard Ranking", desc = "Show your position in the farming weight leaderboard. " + - "Only if your farming weight is high enough! Updates every 10 minutes.") - @ConfigEditorBoolean - public boolean leaderboard = true; - - @Expose - @ConfigOption(name = "Overtake ETA", desc = "Show a timer estimating when you'll move up a spot in the leaderboard! " + - "Will show an ETA to rank #10,000 if you're not on the leaderboard yet.") - @ConfigEditorBoolean - public boolean overtakeETA = false; - - @Expose - @ConfigOption(name = "Offscreen Drop Message", desc = "Show a chat message when joining Garden how many spots you have dropped since last Garden join.") - @ConfigEditorBoolean - public boolean offScreenDropMessage = true; - - @Expose - @ConfigOption(name = "Always ETA", desc = "Show the Overtake ETA always, even when not farming at the moment.") - @ConfigEditorBoolean - public boolean overtakeETAAlways = true; - - @Expose - @ConfigOption(name = "ETA Goal", desc = "Override the Overtake ETA to show when you'll reach the specified rank (if not there yet). (Default: \"10,000\")") - @ConfigEditorText - public String ETAGoalRank = "10000"; - - @Expose - @ConfigOption(name = "Show below 200", desc = "Show the farming weight data even if you are below 200 weight.") - @ConfigEditorBoolean - public boolean ignoreLow = false; - } - - @Expose - @ConfigOption(name = "Dicer Counter", desc = "") - @Accordion - public DicerCounterConfig dicerCounters = new DicerCounterConfig(); - - public static class DicerCounterConfig { - @Expose - @ConfigOption(name = "RNG Drop Counter", desc = "Count RNG drops for Melon Dicer and Pumpkin Dicer.") - @ConfigEditorBoolean - @FeatureToggle - public boolean display = true; - - @Expose - @ConfigOption(name = "Hide Chat", desc = "Hide the chat message when dropping a RNG Dicer drop.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideChat = false; - - @Expose - public Position pos = new Position(16, -232, false, true); - } - - @Expose - @ConfigOption(name = "Money per Hour", desc = "") - @Accordion - public MoneyPerHourConfig moneyPerHours = new MoneyPerHourConfig(); - - public static class MoneyPerHourConfig { - @Expose - @ConfigOption(name = "Show Money per Hour", - desc = "Displays the money per hour YOU get with YOUR crop/minute value when selling the item to bazaar. " + - "Supports Bountiful, Mushroom Cow Perk, Armor Crops and Dicer Drops. Their toggles are below.") - @ConfigEditorBoolean - @FeatureToggle - public boolean display = true; - - // TODO moulconfig runnable support - @Expose - @ConfigOption(name = "Only Show Top", desc = "Only show the best # items.") - @ConfigEditorSlider( - minValue = 1, - maxValue = 25, - minStep = 1 - ) - public int showOnlyBest = 5; - - @Expose - @ConfigOption(name = "Extend Top List", desc = "Add current crop to the list if its lower ranked than the set limit by extending the list.") - @ConfigEditorBoolean - public boolean showCurrent = true; - - // TODO moulconfig runnable support - @Expose - @ConfigOption( - name = "Always On", - desc = "Always show the money/hour Display while on the garden.") - @ConfigEditorBoolean - public boolean alwaysOn = false; - - @Expose - @ConfigOption( - name = "Compact Mode", - desc = "Hide the item name and the position number.") - @ConfigEditorBoolean - public boolean compact = false; - - @Expose - @ConfigOption( - name = "Compact Price", - desc = "Show the price more compact.") - @ConfigEditorBoolean - public boolean compactPrice = false; - - @Expose - @ConfigOption( - name = "Use Custom", - desc = "Use the custom format below instead of classic ➜ §eSell Offer §7and other profiles ➜ §eNPC Price.") - @ConfigEditorBoolean - public boolean useCustomFormat = false; - - @Expose - @ConfigOption( - name = "Custom Format", - desc = "Set what prices to show") - @ConfigEditorDraggableList( - exampleText = { - "§eSell Offer", - "§eInstant Sell", - "§eNPC Price" - }, - requireNonEmpty = true - ) - public List customFormat = new ArrayList<>(Arrays.asList(0, 1, 2)); - - @Expose - @ConfigOption( - name = "Merge Seeds", - desc = "Merge the seeds price with the wheat price.") - @ConfigEditorBoolean - public boolean mergeSeeds = true; - - @Expose - @ConfigOption( - name = "Include Bountiful", - desc = "Includes the coins from Bountiful in the calculation.") - @ConfigEditorBoolean - public boolean bountiful = true; - - @Expose - @ConfigOption( - name = "Include Mooshroom Cow", - desc = "Includes the coins you get from selling the mushrooms from your Mooshroom Cow pet.") - @ConfigEditorBoolean - public boolean mooshroom = true; - - @Expose - @ConfigOption( - name = "Include Armor Drops", - desc = "Includes the average coins/hr from your armor.") - @ConfigEditorBoolean - public boolean armor = true; - - @Expose - @ConfigOption( - name = "Include Dicer Drops", - desc = "Includes the average coins/hr from your melon or pumpkin dicer.") - @ConfigEditorBoolean - public boolean dicer = true; - - @Expose - @ConfigOption( - name = "Hide Title", - desc = "Hides the first line of 'Money Per Hour' entirely.") - @ConfigEditorBoolean - public boolean hideTitle = false; - - @Expose - public Position pos = new Position(-330, 170, false, true); - } - - @Expose - @ConfigOption(name = "Next Jacob's Contest", desc = "") - @Accordion - public NextJacobContestConfig nextJacobContests = new NextJacobContestConfig(); - - public static class NextJacobContestConfig { - @Expose - @ConfigOption(name = "Show Jacob's Contest", desc = "Show the current or next Jacob's farming contest time and crops.") - @ConfigEditorBoolean - @FeatureToggle - public boolean display = true; - - @Expose - @ConfigOption(name = "Outside Garden", desc = "Show the timer not only in Garden but everywhere in SkyBlock.") - @ConfigEditorBoolean - public boolean everywhere = false; - - @Expose - @ConfigOption(name = "In Other Guis", desc = "Mark the current or next Farming Contest crops in other farming GUIs as underlined.") - @ConfigEditorBoolean - public boolean otherGuis = false; - - @Expose - @ConfigOption(name = "Fetch Contests", desc = "Automatically fetch Contests from elitebot.dev for the current year if they're uploaded already.") - @ConfigEditorBoolean - public boolean fetchAutomatically = true; - - @Expose - @ConfigOption(name = "Share Contests", desc = "Share the list of upcoming Contests to elitebot.dev for everyone else to then fetch automatically.") - @ConfigEditorDropdown(values = {"Ask When Needed", "Share Automatically", "Disabled"}) - public int shareAutomatically = 0; - - @Expose - @ConfigOption(name = "Warning", desc = "Show a warning shortly before a new Jacob's Contest starts.") - @ConfigEditorBoolean - public boolean warn = false; - - @Expose - @ConfigOption(name = "Warning Time", desc = "Set the warning time in seconds before a Jacob's Contest begins.") - @ConfigEditorSlider( - minValue = 10, - maxValue = 60 * 5, - minStep = 1 - ) - public int warnTime = 60 * 2; - - @Expose - @ConfigOption(name = "Popup Warning", desc = "Opens a popup when the warning time is reached and Minecraft is not in focus.") - @ConfigEditorBoolean - public boolean warnPopup = false; - - @Expose - public Position pos = new Position(-200, 10, false, true); - } - - @Expose - @ConfigOption(name = "Farming Armor Drops", desc = "") - - @Accordion - public FarmingArmorDropsConfig farmingArmorDrop = new FarmingArmorDropsConfig(); - - public static class FarmingArmorDropsConfig { - @Expose - @ConfigOption(name = "Show Counter", desc = "Count all §9Cropie§7, §5Squash §7and §6Fermento §7dropped.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Hide Chat", desc = "Hide the chat message when receiving a farming armor drop.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideChat = false; - - @Expose - public Position pos = new Position(16, -232, false, true); - } - - @Expose - @ConfigOption(name = "Anita Shop", desc = "") - @Accordion - public AnitaShopConfig anitaShop = new AnitaShopConfig(); - - public static class AnitaShopConfig { - @Expose - @ConfigOption( - name = "Medal Prices", - desc = "Helps to identify profitable items to buy at the Anita item shop " + - "and potential profit from selling the item in the Auction House." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean medalProfitEnabled = true; - - @Expose - @ConfigOption( - name = "Extra Farming Fortune", - desc = "Show current tier and cost to max out in the item tooltip.") - @ConfigEditorBoolean - @FeatureToggle - public boolean extraFarmingFortune = true; - - @Expose - public Position medalProfitPos = new Position(206, 158, false, true); - } - - @Expose - @ConfigOption(name = "Composter", desc = "") - @Accordion - public ComposterConfig composters = new ComposterConfig(); - - public static class ComposterConfig { - @Expose - @ConfigOption( - name = "Composter Overlay", - desc = "Show organic matter, fuel, and profit prices while inside the Composter Inventory." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean overlay = true; - - @Expose - @ConfigOption(name = "Overlay Price", desc = "Toggle for Bazaar 'buy order' vs 'instant buy' price in composter overlay.") - @ConfigEditorDropdown(values = {"Instant Buy", "Buy Order"}) - public int overlayPriceType = 0; - - @Expose - @ConfigOption(name = "Retrieve From", desc = "Change where to retrieve the materials from in the composter overlay: The Bazaar or Sacks.") - @ConfigEditorDropdown(values = {"Bazaar", "Sacks"}) - public int retrieveFrom = 0; - - @Expose - public Position overlayOrganicMatterPos = new Position(140, 152, false, true); - - @Expose - public Position overlayFuelExtrasPos = new Position(-320, 152, false, true); - - @Expose - @ConfigOption( - name = "Display Element", - desc = "Displays the Compost data from the tab list as GUI element." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean displayEnabled = true; - - @Expose - @ConfigOption( - name = "Outside Garden", - desc = "Show Time till Composter is empty outside Garden" - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean displayOutsideGarden = false; - - @Expose - @ConfigOption( - name = "Composter Warning", - desc = "Warn when the Composter gets close to empty, even outside Garden." - ) - @ConfigEditorBoolean - public boolean warnAlmostClose = false; - - @Expose - @ConfigOption( - name = "Upgrade Price", - desc = "Show the price for the Composter Upgrade in the lore." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean upgradePrice = true; - - @Expose - @ConfigOption( - name = "Round Amount Needed", - desc = "Rounds the amount needed to fill your Composter down so that you don't overspend." - ) - @ConfigEditorBoolean - public boolean roundDown = true; - - @Expose - @ConfigOption( - name = "Highlight Upgrade", - desc = "Highlight Upgrades that can be bought right now." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean highlightUpgrade = true; - - @Expose - @ConfigOption( - name = "Inventory Numbers", - desc = "Show the amount of Organic Matter, Fuel and Composts Available while inside the Composter Inventory." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean inventoryNumbers = true; - - @Expose - @ConfigOption(name = "Notification When Low Composter", desc = "") - @Accordion - public NotifyLowConfig notifyLow = new NotifyLowConfig(); - - public static class NotifyLowConfig { - @Expose - @ConfigOption(name = "Enable", desc = "Show a notification when Organic Matter or Fuel runs low in your Composter.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Show Title", desc = "Send a title to notify.") - @ConfigEditorBoolean - public boolean title = false; - - @Expose - @ConfigOption(name = "Min Organic Matter", desc = "Warn when Organic Matter is below this value.") - @ConfigEditorSlider( - minValue = 1_000, - maxValue = 80_000, - minStep = 1 - ) - public int organicMatter = 20_000; - - @Expose - @ConfigOption(name = "Min Fuel Cap", desc = "Warn when Fuel is below this value.") - @ConfigEditorSlider( - minValue = 500, - maxValue = 40_000, - minStep = 1 - ) - public int fuel = 10_000; - } - - @Expose - public Position displayPos = new Position(-390, 10, false, true); - - @Expose - public Position outsideGardenPos = new Position(-363, 13, false, true); - } - - @Expose - @ConfigOption(name = "Farming Fortune Display", desc = "") - @Accordion - public FarmingFortuneConfig farmingFortunes = new FarmingFortuneConfig(); - - public static class FarmingFortuneConfig { - @Expose - @ConfigOption( - name = "FF Display", - desc = "Displays the true Farming Fortune for the current crop, including all crop-specific and hidden bonuses." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean display = true; - - @Expose - @ConfigOption( - name = "Show As Drop Multiplier", - desc = "Adds 100 to the displayed Farming Fortune so that it represents a drop multiplier rather than" + - " the chance for bonus drops. " - ) - @ConfigEditorBoolean - public boolean dropMultiplier = true; - - @ConfigOption(name = "Farming Fortune Guide", desc = "Opens a guide that breaks down your Farming Fortune.\n§eCommand: /ff") - @ConfigEditorButton(buttonText = "Open") - public Runnable open = Commands::openFortuneGuide; - - @Expose - public Position pos = new Position(5, -180, false, true); - } - - @Expose - @ConfigOption(name = "Tooltip Tweaks", desc = "") - @Accordion - public TooltipTweaksConfig tooltipTweak = new TooltipTweaksConfig(); - - public static class TooltipTweaksConfig { - @Expose - @ConfigOption( - name = "Compact Descriptions", - desc = "Hides redundant parts of reforge descriptions, generic counter description, and Farmhand perk explanation." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean compactToolTooltips = false; - - @Expose - @ConfigOption( - name = "Breakdown Hotkey", - desc = "When the keybind is pressed, show a breakdown of all fortune sources on a tool." - ) - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_LSHIFT) - public int fortuneTooltipKeybind = Keyboard.KEY_LSHIFT; - - @Expose - @ConfigOption( - name = "Tooltip Format", - desc = "Show crop-specific Farming Fortune in tooltip.\n" + - "§fShow: §7Crop-specific Fortune indicated as §6[+196]\n" + - "§fReplace: §7Edits the total Fortune to include crop-specific Fortune." - ) - @ConfigEditorDropdown(values = {"Default", "Show", "Replace"}) - public int cropTooltipFortune = 1; - - @Expose - @ConfigOption( - name = "Total Crop Milestone", - desc = "Shows the progress bar till maxed crop milestone in the crop milestone inventory." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean cropMilestoneTotalProgress = true; - } - - @Expose - @ConfigOption(name = "Yaw and Pitch", desc = "") - @Accordion - public YawPitchDisplayConfig yawPitchDisplay = new YawPitchDisplayConfig(); - - public static class YawPitchDisplayConfig { - - @Expose - @ConfigOption(name = "Enable", desc = "Displays yaw and pitch while holding a farming tool. Automatically fades out if there is no movement.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Yaw Precision", desc = "Yaw precision up to specified decimal.") - @ConfigEditorSlider( - minValue = 1, - maxValue = 10, - minStep = 1 - ) - public int yawPrecision = 4; - - @Expose - @ConfigOption(name = "Pitch Precision", desc = "Pitch precision up to specified decimal.") - @ConfigEditorSlider( - minValue = 1, - maxValue = 10, - minStep = 1 - ) - public int pitchPrecision = 4; - - @Expose - @ConfigOption(name = "Display Timeout", desc = "Duration in seconds for which the overlay is being displayed after moving.") - @ConfigEditorSlider( - minValue = 1, - maxValue = 20, - minStep = 1 - ) - public int timeout = 5; - - @Expose - @ConfigOption(name = "Show Without Tool", desc = "Does not require you to hold a tool for the overlay to show.") - @ConfigEditorBoolean - public boolean showWithoutTool = false; - - @Expose - @ConfigOption(name = "Show Outside Garden", desc = "The overlay will work outside of the Garden.") - @ConfigEditorBoolean - public boolean showEverywhere = false; - - @Expose - @ConfigOption(name = "Ignore Timeout", desc = "Ignore the timeout after not moving mouse.") - @ConfigEditorBoolean - public boolean showAlways = false; - - @Expose - public Position pos = new Position(445, 225, false, true); - @Expose - public Position posOutside = new Position(445, 225, false, true); - } - - @Expose - @ConfigOption(name = "Crop Start Location", desc = "") - @Accordion - public CropStartLocationConfig cropStartLocation = new CropStartLocationConfig(); - - public static class CropStartLocationConfig { - - @Expose - @ConfigOption(name = "Enable", desc = "Show the start waypoint for your farm with the currently holding tool.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - } - - @Expose - @ConfigOption(name = "Garden Plot Icon", desc = "") - @Accordion - public PlotIconConfig plotIcon = new PlotIconConfig(); - - public static class PlotIconConfig { - @Expose - @ConfigOption(name = "Enable", desc = "Enable icon replacement in the Configure Plots menu.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @ConfigOption(name = "Hard Reset", desc = "Reset every slot to its original item.") - @ConfigEditorButton(buttonText = "Reset") - public Runnable hardReset = () -> { - GardenPlotIcon.INSTANCE.setHardReset(true); - LorenzUtils.INSTANCE.sendCommandToServer("desk"); - }; - } - - @Expose - @ConfigOption(name = "Plot Price", desc = "Show the price of the plot in coins when inside the Configure Plots inventory.") - @ConfigEditorBoolean - @FeatureToggle - public boolean plotPrice = true; - - @Expose - @ConfigOption(name = "Desk in Menu", desc = "Show a Desk button in the SkyBlock Menu. Opens the /desk command on click.") - @ConfigEditorBoolean - @FeatureToggle - public boolean deskInSkyBlockMenu = true; - - - @Expose - @ConfigOption(name = "Fungi Cutter Warning", desc = "Warn when breaking mushroom with the wrong Fungi Cutter mode.") - @ConfigEditorBoolean - @FeatureToggle - public boolean fungiCutterWarn = true; - - @Expose - @ConfigOption(name = "Burrowing Spores", desc = "Show a notification when a Burrowing Spores spawns while farming mushrooms.") - @ConfigEditorBoolean - @FeatureToggle - public boolean burrowingSporesNotification = true; - - @Expose - @ConfigOption(name = "Wild Strawberry", desc = "Show a notification when a Wild Strawberry Dye drops while farming.") - @ConfigEditorBoolean - @FeatureToggle - public boolean wildStrawberryDyeNotification = true; - - @Expose - @ConfigOption( - name = "FF for Contest", - desc = "Show the minimum needed Farming Fortune for reaching each medal in Jacob's Farming Contest inventory." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean farmingFortuneForContest = true; - - @Expose - public Position farmingFortuneForContestPos = new Position(180, 156, false, true); - - @Expose - @ConfigOption( - name = "Contest Time Needed", - desc = "Show the time and missing FF for every crop inside Jacob's Farming Contest inventory." - ) - @ConfigEditorBoolean - @FeatureToggle - // TODO rename to jacobContestTimes - public boolean jacobContextTimes = true; - - @Expose - @ConfigOption( - name = "Custom BPS", - desc = "Use custom Blocks per Second value in some GUIs instead of the real one." - ) - @ConfigEditorBoolean - public boolean jacobContestCustomBps = true; - - // TODO moulconfig runnable support - @Expose - @ConfigOption(name = "Custom BPS Value", desc = "Set a custom Blocks per Second value.") - @ConfigEditorSlider( - minValue = 15, - maxValue = 20, - minStep = 0.1f - ) - public double jacobContestCustomBpsValue = 19.9; - - @Expose - // TODO rename to jacobContestTimesPos - public Position jacobContextTimesPos = new Position(-359, 149, false, true); - - @Expose - @ConfigOption( - name = "Contest Summary", - desc = "Show the average Blocks Per Second and blocks clicked at the end of a Jacob Farming Contest in chat." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean jacobContestSummary = true; - - @Expose - @ConfigOption(name = "Always Finnegan", desc = "Forcefully set the Finnegan Farming Simulator perk to be active. This is useful if the auto mayor detection fails.") - @ConfigEditorBoolean - public boolean forcefullyEnabledAlwaysFinnegan = false; - - @Expose - public Position cropSpeedMeterPos = new Position(278, -236, false, true); - - @Expose - @ConfigOption(name = "Enable Plot Borders", desc = "Enable the use of F3 + G hotkey to show Garden plot borders. Similar to how later Minecraft version render chunk borders.") - @ConfigEditorBoolean - @FeatureToggle - public boolean plotBorders = true; -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java deleted file mode 100644 index 50128e85e..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java +++ /dev/null @@ -1,480 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import at.hannibal2.skyhanni.config.FeatureToggle; -import at.hannibal2.skyhanni.config.core.config.Position; -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; -import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; -import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; -import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; -import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; -import io.github.moulberry.moulconfig.annotations.ConfigOption; -import org.lwjgl.input.Keyboard; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -public class InventoryConfig { - - @Expose - @ConfigOption(name = "Not Clickable Items", desc = "") - @Accordion - public HideNotClickableConfig hideNotClickable = new HideNotClickableConfig(); - - public static class HideNotClickableConfig { - @Expose - @ConfigOption(name = "Enabled", desc = "Hide items that are not clickable in the current inventory: ah, bz, accessory bag, etc.") - @ConfigEditorBoolean - @FeatureToggle - public boolean items = false; - - @Expose - @ConfigOption(name = "Block Clicks", desc = "Block the clicks on these items.") - @ConfigEditorBoolean - public boolean itemsBlockClicks = true; - - @Expose - @ConfigOption( - name = "Opacity", - desc = "How strong should the items be grayed out?" - ) - @ConfigEditorSlider( - minValue = 0, - maxValue = 255, - minStep = 5 - ) - public int opacity = 180; - - @Expose - @ConfigOption(name = "Bypass With Control", desc = "Adds the ability to bypass not clickable items when holding the control key.") - @ConfigEditorBoolean - public boolean itemsBypass = true; - - @Expose - @ConfigOption(name = "Green Line", desc = "Adds green line around items that are clickable.") - @ConfigEditorBoolean - public boolean itemsGreenLine = true; - - } - - @Expose - @ConfigOption(name = "RNG Meter", desc = "") - @Accordion - public RngMeterConfig rngMeter = new RngMeterConfig(); - - public static class RngMeterConfig { - @Expose - @ConfigOption(name = "Floor Names", desc = "Show the Floor names in the Catacombs RNG Meter inventory.") - @ConfigEditorBoolean - @FeatureToggle - public boolean floorName = false; - - @Expose - @ConfigOption(name = "No Drop", desc = "Highlight floors without a drop selected in the Catacombs RNG Meter inventory.") - @ConfigEditorBoolean - @FeatureToggle - public boolean noDrop = false; - - @Expose - @ConfigOption(name = "Selected Drop", desc = "Highlight the selected drop in the Catacombs or Slayer RNG Meter inventory.") - @ConfigEditorBoolean - @FeatureToggle - public boolean selectedDrop = false; - } - - @Expose - @ConfigOption(name = "Stats Tuning", desc = "") - @Accordion - public StatsTuningConfig statsTuning = new StatsTuningConfig(); - - public static class StatsTuningConfig { - @Expose - @ConfigOption(name = "Selected Stats", desc = "Show the tuning stats in the Thaumaturgy inventory.") - @ConfigEditorBoolean - @FeatureToggle - public boolean selectedStats = true; - - @Expose - @ConfigOption(name = "Tuning Points", desc = "Show the amount of selected Tuning Points in the Stats Tuning inventory.") - @ConfigEditorBoolean - @FeatureToggle - public boolean points = true; - - @Expose - @ConfigOption(name = "Selected Template", desc = "Highlight the selected template in the Stats Tuning inventory.") - @ConfigEditorBoolean - @FeatureToggle - public boolean selectedTemplate = true; - - @Expose - @ConfigOption(name = "Template Stats", desc = "Show the type of stats for the Tuning Point templates.") - @ConfigEditorBoolean - @FeatureToggle - public boolean templateStats = true; - } - - @Expose - @ConfigOption(name = "Jacob Farming Contest", desc = "") - @Accordion - public JacobFarmingContestConfig jacobFarmingContests = new JacobFarmingContestConfig(); - - public static class JacobFarmingContestConfig { - @Expose - @ConfigOption(name = "Unclaimed Rewards", desc = "Highlight contests with unclaimed rewards in the Jacob inventory.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlightRewards = true; - - @Expose - @ConfigOption(name = "Contest Time", desc = "Adds the real time format to the Contest description.") - @ConfigEditorBoolean - @FeatureToggle - public boolean realTime = true; - - @Expose - @ConfigOption(name = "Medal Icon", desc = "Adds a symbol that shows what medal you received in this Contest. " + - "§eIf you use a texture pack this may cause conflicting icons.") - @ConfigEditorBoolean - @FeatureToggle - public boolean medalIcon = true; - - @Expose - @ConfigOption(name = "Finnegan Icon", desc = "Uses a different indicator for when the Contest happened during Mayor Finnegan.") - @ConfigEditorBoolean - public boolean finneganIcon = true; - } - - - @Expose - @ConfigOption(name = "Sack Items Display", desc = "") - @Accordion - public SackDisplayConfig sackDisplay = new SackDisplayConfig(); - - public static class SackDisplayConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Show contained items inside a sack inventory.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption( - name = "Highlight Full", - desc = "Highlight items that are full in red.\n" + - "§eDoes not need the option above to be enabled." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean highlightFull = true; - - @Expose - @ConfigOption(name = "Number Format", desc = "Either show Default, Formatted or Unformatted numbers.\n" + - "§eDefault: §72,240/2.2k\n" + - "§eFormatted: §72.2k/2.2k\n" + - "§eUnformatted: §72,240/2,200") - @ConfigEditorDropdown(values = {"Default", "Formatted", "Unformatted"}) - public int numberFormat = 1; - - @Expose - @ConfigOption(name = "Extra space", desc = "Space between each line of text.") - @ConfigEditorSlider( - minValue = 0, - maxValue = 10, - minStep = 1) - public int extraSpace = 1; - - @Expose - @ConfigOption(name = "Sorting Type", desc = "Sorting type of items in sack.") - @ConfigEditorDropdown(values = {"Descending (Stored)", "Ascending (Stored)", "Descending (Price)", "Ascending (Price)"}) - public int sortingType = 0; - - @Expose - @ConfigOption(name = "Item To Show", desc = "Choose how many items are displayed. (Some sacks have too many items to fit\n" + - "in larger GUI scales, like the nether sack.)") - @ConfigEditorSlider( - minValue = 0, - maxValue = 45, - minStep = 1 - ) - public int itemToShow = 15; - - @Expose - @ConfigOption(name = "Show Empty Item", desc = "Show empty item quantity in the display.") - @ConfigEditorBoolean - public boolean showEmpty = true; - - @Expose - @ConfigOption(name = "Show Price", desc = "Show price for each item in sack.") - @ConfigEditorBoolean - public boolean showPrice = true; - - @Expose - @ConfigOption(name = "Price Format", desc = "Format of the price displayed.\n" + - "§eFormatted: §7(12k)\n" + - "§eUnformatted: §7(12,421)") - @ConfigEditorDropdown(values = {"Formatted", "Unformatted"}) - public int priceFormat = 0; - - @Expose - @ConfigOption(name = "Show Price From", desc = "Show price from Bazaar or NPC.") - @ConfigEditorDropdown(values = {"Bazaar", "NPC"}) - public int priceFrom = 0; - - @Expose - public Position position = new Position(144, 139, false, true); - } - - @Expose - @ConfigOption(name = "Chest Value", desc = "") - @Accordion - public ChestValueConfig chestValueConfig = new ChestValueConfig(); - - public static class ChestValueConfig { - @Expose - @ConfigOption(name = "Enabled", desc = "Enable estimated value of chest.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Enabled in dungeons", desc = "Enable the feature in dungeons.") - @ConfigEditorBoolean - public boolean enableInDungeons = false; - - @Expose - @ConfigOption(name = "Enable during Item Value", desc = "Show this display even if the Estimated Item Value is visible.") - @ConfigEditorBoolean - public boolean showDuringEstimatedItemValue = false; - - @Expose - @ConfigOption(name = "Show Stacks", desc = "Show the item icon before name.") - @ConfigEditorBoolean - public boolean showStacks = true; - - @Expose - @ConfigOption(name = "Display Type", desc = "Try to align everything to look nicer.") - @ConfigEditorBoolean - public boolean alignedDisplay = true; - - @Expose - @ConfigOption(name = "Name Length", desc = "Reduce item name length to gain extra space on screen.\n§cCalculated in pixels!") - @ConfigEditorSlider(minStep = 1, minValue = 100, maxValue = 150) - public int nameLength = 100; - - @Expose - @ConfigOption(name = "Highlight Slot", desc = "Highlight slot where the item is when you hover over it in the display.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enableHighlight = true; - - @Expose - @ConfigOption(name = "Highlight Color", desc = "Choose the highlight color.") - @ConfigEditorColour - public String highlightColor = "0:249:0:255:88"; - - @Expose - @ConfigOption(name = "Sorting Type", desc = "Price sorting type.") - @ConfigEditorDropdown(values = {"Descending", "Ascending"}) - public int sortingType = 0; - - @Expose - @ConfigOption(name = "Value formatting Type", desc = "Format of the price.") - @ConfigEditorDropdown(values = {"Short", "Long"}) - public int formatType = 0; - - @Expose - @ConfigOption(name = "Item To Show", desc = "Choose how many items are displayed.\n" + - "All items in the chest are still counted for the total value.") - @ConfigEditorSlider( - minValue = 0, - maxValue = 54, - minStep = 1 - ) - public int itemToShow = 15; - - @Expose - @ConfigOption(name = "Hide below", desc = "Item item value below configured amount.\n" + - "Items are still counted for the total value.") - @ConfigEditorSlider( - minValue = 50_000, - maxValue = 10_000_000, - minStep = 50_000 - ) - public int hideBelow = 100_000; - - - @Expose - public Position position = new Position(107, 141, false, true); - } - - @Expose - @ConfigOption(name = "Helper", desc = "") - @Accordion - public HelperConfig helper = new HelperConfig(); - - public static class HelperConfig { - @Expose - @ConfigOption(name = "Melody's Hair Harp", desc = "") - @Accordion - public HarpConfig harp = new HarpConfig(); - - public static class HarpConfig { - @Expose - @ConfigOption(name = "Use Keybinds", desc = "In the Harp, press buttons with your number row on the keyboard instead of clicking.") - @ConfigEditorBoolean - @FeatureToggle - public boolean keybinds = false; - - @Expose - @ConfigOption(name = "Show Numbers", desc = "In the Harp, show buttons as stack size (intended to be used with the Keybinds).") - @ConfigEditorBoolean - public boolean showNumbers = false; - - @Expose - @ConfigOption(name = "Keybinds", desc = "") - @Accordion - public HarpConfigKeyBinds harpKeybinds = new HarpConfigKeyBinds(); - - public static class HarpConfigKeyBinds { - @Expose - @ConfigOption(name = "Key 1", desc = "Key for the first Node") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_1) - public int key1 = Keyboard.KEY_1; - @Expose - @ConfigOption(name = "Key 2", desc = "Key for the second Node") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_2) - public int key2 = Keyboard.KEY_2; - @Expose - @ConfigOption(name = "Key 3", desc = "Key for the third Node") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_3) - public int key3 = Keyboard.KEY_3; - @Expose - @ConfigOption(name = "Key 4", desc = "Key for the fourth Node") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_4) - public int key4 = Keyboard.KEY_4; - @Expose - @ConfigOption(name = "Key 5", desc = "Key for the fifth Node") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_5) - public int key5 = Keyboard.KEY_5; - @Expose - @ConfigOption(name = "Key 6", desc = "Key for the sixth Node") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_6) - public int key6 = Keyboard.KEY_6; - @Expose - @ConfigOption(name = "Key 7", desc = "Key for the seventh Node") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_7) - public int key7 = Keyboard.KEY_7; - } - } - - @Expose - @ConfigOption(name = "Tia Relay Abiphone Network Maintenance", desc = "") - @Accordion - public TiaRelayConfig tiaRelay = new TiaRelayConfig(); - - public static class TiaRelayConfig { - - @Expose - @ConfigOption(name = "Sound Puzzle Helper", desc = "Helps with solving the sound puzzle for Tia (The 9 Operator Chips to do maintainance for the Abiphone Network).") - @ConfigEditorBoolean - @FeatureToggle - public boolean soundHelper = true; - - @Expose - @ConfigOption(name = "Next Waypoint", desc = "Show the next relay waypoint for Tia the Fairy, where maintenance for the Abiphone network needs to be done.") - @ConfigEditorBoolean - @FeatureToggle - public boolean nextWaypoint = true; - - @Expose - @ConfigOption(name = "All Waypoints", desc = "Show all relay waypoints at once (intended for debugging).") - @ConfigEditorBoolean - public boolean allWaypoints = false; - - @Expose - @ConfigOption(name = "Mute Sound", desc = "Mutes the sound when close to the relay.") - @ConfigEditorBoolean - @FeatureToggle - public boolean tiaRelayMute = true; - } - } - - @Expose - @ConfigOption( - name = "Item Number", - desc = "Showing the item number as a stack size for these items." - ) - @ConfigEditorDraggableList( - exampleText = { - "§bMaster Star Tier", - "§bMaster Skull Tier", - "§bDungeon Head Floor Number", - "§bNew Year Cake", - "§bPet Level", - "§bMinion Tier", - "§bCrimson Armor", - "§7(Removed)", - "§bKuudra Key", - "§bSkill Level", - "§bCollection Level", - "§bRancher's Boots speed", - "§bLarva Hook", - "§bDungeon Potion Level" - } - ) - public List itemNumberAsStackSize = new ArrayList<>(Arrays.asList(3, 9, 11, 12)); - - @Expose - @ConfigOption( - name = "Quick Craft Confirmation", - desc = "Require Ctrl+Click to craft items that aren't often quick crafted " + - "(e.g. armor, weapons, accessories). Sack items can be crafted normally." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean quickCraftingConfirmation = false; - - @Expose - @ConfigOption(name = "Sack Name", desc = "Show an abbreviation of the sack name.") - @ConfigEditorBoolean - @FeatureToggle - public boolean displaySackName = false; - - @Expose - @ConfigOption(name = "Anvil Combine Helper", desc = "Suggests the same item in the inventory when trying to combine two items in the anvil.") - @ConfigEditorBoolean - @FeatureToggle - public boolean anvilCombineHelper = false; - - @Expose - @ConfigOption(name = "Item Stars", - desc = "Show a compact star count in the item name for all items.") - @ConfigEditorBoolean - @FeatureToggle - public boolean itemStars = false; - - @Expose - @ConfigOption(name = "Missing Tasks", - desc = "Highlight missing tasks in the SkyBlock Level Guide inventory.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlightMissingSkyBlockLevelGuide = true; - - @Expose - @ConfigOption(name = "Highlight Auctions", - desc = "Highlight own items that are sold in green and that are expired in red.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlightAuctions = true; - - @Expose - @ConfigOption(name = "Shift Click Equipment", desc = "Makes normal clicks to shift clicks in equipment inventory") - @ConfigEditorBoolean - @FeatureToggle - public boolean shiftClickForEquipment = false; - -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/ItemAbilityConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/ItemAbilityConfig.java deleted file mode 100644 index 30ba1227f..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/ItemAbilityConfig.java +++ /dev/null @@ -1,74 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import at.hannibal2.skyhanni.config.FeatureToggle; -import at.hannibal2.skyhanni.config.core.config.Position; -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; -import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; -import io.github.moulberry.moulconfig.annotations.ConfigOption; - -public class ItemAbilityConfig { - - @Expose - @ConfigOption(name = "Ability Cooldown", desc = "Show the cooldown of item abilities.") - @ConfigEditorBoolean - @FeatureToggle - public boolean itemAbilityCooldown = false; - - @Expose - @ConfigOption(name = "Ability Cooldown Background", desc = "Show the cooldown color of item abilities in the background.") - @ConfigEditorBoolean - public boolean itemAbilityCooldownBackground = false; - - @Expose - @ConfigOption(name = "Fire Veil", desc = "") - @Accordion - public FireVeilWandConfig fireVeilWands = new FireVeilWandConfig(); - - public static class FireVeilWandConfig { - @Expose - @ConfigOption(name = "Fire Veil Design", desc = "Changes the flame particles of the Fire Veil Wand ability.") - @ConfigEditorDropdown(values = {"Particles", "Line", "Off"}) - public int display = 0; - - @Expose - @ConfigOption( - name = "Line Color", - desc = "Changes the color of the Fire Veil Wand line." - ) - @ConfigEditorColour - public String displayColor = "0:245:255:85:85"; - } - - @ConfigOption(name = "Chicken Head", desc = "") - @Accordion - @Expose - public ChickenHeadConfig chickenHead = new ChickenHeadConfig(); - - public static class ChickenHeadConfig { - - @Expose - @ConfigOption(name = "Checken Head Timer", desc = "Show the cooldown until the next time you can lay an egg with the Chicken Head.") - @ConfigEditorBoolean - @FeatureToggle - public boolean displayTimer = false; - - @Expose - public Position position = new Position(-372, 73, false, true); - - @Expose - @ConfigOption(name = "Hide Chat", desc = "Hide the 'You laid an egg!' chat message.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideChat = true; - } - - @Expose - @ConfigOption(name = "Depleted Bonzo's Masks", - desc = "Highlights used Bonzo's Masks and Spirit Masks with a background.") - @ConfigEditorBoolean - @FeatureToggle - public boolean depletedBonzosMasks = false; -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/MarkedPlayerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/MarkedPlayerConfig.java deleted file mode 100644 index e199f7c55..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/MarkedPlayerConfig.java +++ /dev/null @@ -1,24 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigOption; -import io.github.moulberry.moulconfig.observer.Property; - -public class MarkedPlayerConfig { - - @Expose - @ConfigOption(name = "Highlight in World", desc = "Highlight marked players in the world.") - @ConfigEditorBoolean - public boolean highlightInWorld = true; - - @Expose - @ConfigOption(name = "Highlight in Chat", desc = "Highlight marked player names in chat.") - @ConfigEditorBoolean - public boolean highlightInChat = true; - - @Expose - @ConfigOption(name = "Mark Own Name", desc = "Mark own player name.") - @ConfigEditorBoolean() - public Property markOwnName = Property.of(false); -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/MiningConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/MiningConfig.java deleted file mode 100644 index 5272336df..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/MiningConfig.java +++ /dev/null @@ -1,128 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import at.hannibal2.skyhanni.config.FeatureToggle; -import at.hannibal2.skyhanni.config.core.config.Position; -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; -import io.github.moulberry.moulconfig.annotations.ConfigOption; -import io.github.moulberry.moulconfig.observer.Property; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -public class MiningConfig { - - @Expose - @ConfigOption(name = "Powder Tracker", desc = "") - @Accordion - public PowderTrackerConfig powderTracker = new PowderTrackerConfig(); - - public static class PowderTrackerConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Enable the Powder Tracker overlay for mining.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Only when Grinding", desc = "Only show the overlay when powder grinding.") - @ConfigEditorBoolean - public boolean onlyWhenPowderGrinding = false; - - @Expose - @ConfigOption(name = "Great Explorer", desc = "Enable this if your Great Explorer perk is maxed.") - @ConfigEditorBoolean - public boolean greatExplorerMaxed = false; - - @Expose - @ConfigOption( - name = "Text Format", - desc = "Drag text to change the appearance of the overlay." - ) - @ConfigEditorDraggableList( - exampleText = { - "§b§lPowder Tracker", - "§7Display Mode: §a[Total] §e[This Session]", - "§d852 Total chests Picked §7(950/h)", - "§bx2 Powder: §aActive!", - "§b250,420 §aMithril Powder §7(350,000/h)", - "§b250,420 §dGemstone Powder §7(350,000/h)", - "", - "§b129 §bDiamond Essence §7(600/h)", - "§b234 §6Gold Essence §7(700/h)", - "", - "§50§7-§90§7-§a0§f-0 §cRuby Gemstone", - "§50§7-§90§7-§a0§f-0 §bSapphire Gemstone", - "§50§7-§90§7-§a0§f-0 §6Amber Gemstone", - "§50§7-§90§7-§a0§f-0 §5Amethyst Gemstone", - "§50§7-§90§7-§a0§f-0 §aJade Gemstone", - "§50§7-§90§7-§a0§f-0 §eTopaz Gemstone", - - "§b14 §9FTX 3070", - "§b14 §9Electron Transmitter", - "§b14 §9Robotron Reflector", - "§b14 §9Superlite Motor", - "§b14 §9Control Switch", - "§b14 §9Synthetic Heart", - "§b14 §9Total Robot Parts", - - "§90§7-§a0§7-§c0§f-§e0§f-§30 §fGoblin Egg", - - "§b12 §aWishing Compass", - - "§b320 §aSludge Juice", - "§b2 §9Ascension Rope", - "§b6 §5Treasurite", - "§b4 §6Jungle Heart", - "§b1 §5Pickonimbus 2000", - "§b14 §aYoggie", - "§b9 §fPrehistoric Egg", - "§b25 §aOil Barrel" - } - ) - public Property> textFormat = Property.of(new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18))); - - @Expose - public Position position = new Position(-274, 0, false, true); - - } - - @Expose - @ConfigOption(name = "King Talisman", desc = "") - @Accordion - public KingTalismanConfig kingTalisman = new KingTalismanConfig(); - - public static class KingTalismanConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Show kings you have not talked to yet, and when the next missing king will appear.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Outside Mines", desc = "Show the display even while outside the Dwarven Mines.") - @ConfigEditorBoolean - @FeatureToggle - public boolean outsideMines = false; - - @Expose - public Position position = new Position(-400, 220, false, true); - } - - @Expose - @ConfigOption(name = "Highlight Commission Mobs", desc = "Highlight Mobs that are part of active commissions.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlightCommissionMobs = false; - - @Expose - @ConfigOption(name = "Names in Core", desc = "Show the names of the 4 areas while in the center of the Crystal Hollows.") - @ConfigEditorBoolean - @FeatureToggle - public boolean crystalHollowsNamesInCore = false; -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/MinionsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/MinionsConfig.java deleted file mode 100644 index a05b913dc..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/MinionsConfig.java +++ /dev/null @@ -1,96 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import at.hannibal2.skyhanni.config.FeatureToggle; -import at.hannibal2.skyhanni.config.core.config.Position; -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; -import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; -import io.github.moulberry.moulconfig.annotations.ConfigOption; - -public class MinionsConfig { - - @Expose - @ConfigOption(name = "Name Display", desc = "Show the minion name and tier over the minion.") - @ConfigEditorBoolean - @FeatureToggle - public boolean nameDisplay = true; - - @Expose - @ConfigOption(name = "Only Tier", desc = "Show only the tier number over the minion. (Useful for Bingo)") - @ConfigEditorBoolean - public boolean nameOnlyTier = false; - - @Expose - @ConfigOption(name = "Last Clicked", desc = "") - @Accordion - public LastClickedMinionConfig lastClickedMinion = new LastClickedMinionConfig(); - - public static class LastClickedMinionConfig { - @Expose - @ConfigOption(name = "Last Minion Display", desc = "Marks the location of the last clicked minion, even through walls.") - @ConfigEditorBoolean - @FeatureToggle - public boolean display = false; - - @Expose - @ConfigOption( - name = "Last Minion Color", - desc = "The color in which the last minion should be displayed." - ) - @ConfigEditorColour - public String color = "0:245:85:255:85"; - - @Expose - @ConfigOption( - name = "Last Minion Time", - desc = "Time in seconds how long the last minion should be displayed." - ) - @ConfigEditorSlider( - minValue = 3, - maxValue = 120, - minStep = 1 - ) - public int time = 20; - } - - @Expose - @ConfigOption(name = "Emptied Time", desc = "") - @Accordion - public EmptiedTimeConfig emptiedTime = new EmptiedTimeConfig(); - - public static class EmptiedTimeConfig { - @Expose - @ConfigOption(name = "Emptied Time Display", desc = "Show the time when the hopper in the minion was last emptied.") - @ConfigEditorBoolean - @FeatureToggle - public boolean display = false; - - @Expose - @ConfigOption( - name = "Distance", - desc = "Maximum distance to display minion data." - ) - @ConfigEditorSlider( - minValue = 3, - maxValue = 30, - minStep = 1 - ) - public int distance = 10; - } - - @Expose - @ConfigOption(name = "Hopper Profit Display", desc = "Use the hopper's held coins and the last empty time to calculate the coins per day.") - @ConfigEditorBoolean - public boolean hopperProfitDisplay = true; - - @Expose - public Position hopperProfitPos = new Position(360, 90, false, true); - - @Expose - @ConfigOption(name = "Hide Mob Nametag", desc = "Hiding the nametag of mobs close to minions.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideMobsNametagNearby = false; -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java deleted file mode 100644 index 2fc113216..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java +++ /dev/null @@ -1,834 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import at.hannibal2.skyhanni.config.FeatureToggle; -import at.hannibal2.skyhanni.config.core.config.Position; -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; -import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; -import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; -import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; -import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; -import io.github.moulberry.moulconfig.annotations.ConfigEditorText; -import io.github.moulberry.moulconfig.annotations.ConfigOption; -import io.github.moulberry.moulconfig.observer.Property; -import org.lwjgl.input.Keyboard; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -public class MiscConfig { - - @Expose - @ConfigOption(name = "Pet", desc = "") - @Accordion - public PetConfig pets = new PetConfig(); - - public static class PetConfig { - @Expose - @ConfigOption(name = "Pet Display", desc = "Show the currently active pet.") - @ConfigEditorBoolean - @FeatureToggle - public boolean display = false; - - @Expose - @ConfigOption(name = "Pet Experience Tooltip", desc = "") - @Accordion - public PetExperienceToolTipConfig petExperienceToolTip = new PetExperienceToolTipConfig(); - - public static class PetExperienceToolTipConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Show the full pet exp and the progress to level 100 (ignoring rarity) when hovering over a pet while pressing shift key.") - @ConfigEditorBoolean - @FeatureToggle - public boolean petDisplay = true; - - @Expose - @ConfigOption(name = "Show Always", desc = "Show this info always, even if not pressing shift key.") - @ConfigEditorBoolean - public boolean showAlways = false; - - @Expose - @ConfigOption(name = "Dragon Egg", desc = "For a Golden Dragon Egg, show progress to level 100 instead of 200.") - @ConfigEditorBoolean - public boolean showGoldenDragonEgg = true; - - } - } - - @Expose - public Position petDisplayPos = new Position(-330, -15, false, true); - - @ConfigOption(name = "Hide Armor", desc = "") - @Accordion - @Expose - public HideArmor hideArmor2 = new HideArmor(); - - public static class HideArmor { - - @Expose - @ConfigOption(name = "Mode", desc = "Hide the armor of players.") - @ConfigEditorDropdown(values = {"All", "Own Armor", "Other's Armor", "Off"}) - public int mode = 3; - - @Expose - @ConfigOption(name = "Only Helmet", desc = "Only hide the helmet.") - @ConfigEditorBoolean() - public Boolean onlyHelmet = false; - - } - - @Expose - @ConfigOption(name = "Potion Effects", desc = "") - @Accordion - public PotionEffectsConfig potionEffect = new PotionEffectsConfig(); - - public static class PotionEffectsConfig { - @Expose - @ConfigOption(name = "Non God Pot Effects", desc = "Display the active potion effects that are not part of the God Pot.") - @ConfigEditorBoolean - @FeatureToggle - public boolean nonGodPotEffectDisplay = false; - - @Expose - @ConfigOption(name = "Show Mixins", desc = "Include God Pot mixins in the Non God Pot Effects display.") - @ConfigEditorBoolean - @FeatureToggle - public boolean nonGodPotEffectShowMixins = false; - - @Expose - public Position nonGodPotEffectPos = new Position(10, 10, false, true); - } - - @Expose - @ConfigOption(name = "Particle Hider", desc = "") - @Accordion - public ParticleHiderConfig particleHiders = new ParticleHiderConfig(); - - public static class ParticleHiderConfig { - @Expose - @ConfigOption(name = "Blaze Particles", desc = "Hide Blaze particles.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideBlazeParticles = false; - - @Expose - @ConfigOption(name = "Enderman Particles", desc = "Hide Enderman particles.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideEndermanParticles = false; - - @Expose - @ConfigOption(name = "Fireball Particles", desc = "Hide fireball particles.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideFireballParticles = true; - - @Expose - @ConfigOption(name = "Fire Particles", desc = "Hide particles from the fire block.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideFireBlockParticles = true; - - @Expose - @ConfigOption(name = "Smoke Particles", desc = "Hide smoke particles.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideSmokeParticles = false; - - @Expose - @ConfigOption(name = "Far Particles", desc = "Hide particles that are more than 40 blocks away.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideFarParticles = true; - - @Expose - @ConfigOption(name = "Close Redstone Particles", desc = "Hide Redstone particles around the player (appear for some potion effects).") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideCloseRedstoneParticles = true; - } - - @Expose - @ConfigOption(name = "Estimated Item Value", desc = "(Prices for Enchantments, Reforge Stones, Gemstones, Drill Parts and more)") - @Accordion - public EstimatedItemValueConfig estimatedItemValues = new EstimatedItemValueConfig(); - - public static class EstimatedItemValueConfig { - @Expose - @ConfigOption(name = "Enable Estimated Price", desc = "Displays an Estimated Item Value for the item you hover over.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Hotkey", desc = "Press this key to show the Estimated Item Value.") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) - public int hotkey = Keyboard.KEY_NONE; - - @Expose - @ConfigOption(name = "Show Always", desc = "Ignore the hotkey and always display the item value.") - @ConfigEditorBoolean - public boolean alwaysEnabled = true; - - @Expose - @ConfigOption(name = "Enchantments Cap", desc = "Only show the top # most expensive enchantments.") - @ConfigEditorSlider( - minValue = 1, - maxValue = 30, - minStep = 1 - ) - public Property enchantmentsCap = Property.of(7); - - @Expose - @ConfigOption(name = "Show Exact Price", desc = "Show the exact total price instead of the compact number.") - @ConfigEditorBoolean - public boolean exactPrice = false; - - @Expose - @ConfigOption(name = "Show Armor Value", desc = "Show the value of the full armor set in the Wardrobe inventory.") - @ConfigEditorBoolean - @FeatureToggle - public boolean armor = true; - - @Expose - public Position itemPriceDataPos = new Position(140, 90, false, true); - } - - @ConfigOption(name = "Discord Rich Presence", desc = "") - @Accordion - @Expose - public DiscordRPC discordRPC = new DiscordRPC(); - - public static class DiscordRPC { - - @Expose - @ConfigOption(name = "Enable Discord RPC", desc = "Details about your SkyBlock session displayed through Discord.") - @ConfigEditorBoolean - @FeatureToggle - public Property enabled = Property.of(false); - - @Expose - @ConfigOption(name = "First Line", desc = "Decide what to show in the first line.") - @ConfigEditorDropdown(values = { - "Nothing", - "Location", - "Purse", - "Bits", - "Stats", - "Held Item", - "SkyBlock Date", - "Profile", - "Slayer", - "Custom", - "Dynamic", - "Crop Milestone", - "Current Pet" - }) - public Property firstLine = Property.of(0); - - @Expose - @ConfigOption(name = "Second Line", desc = "Decide what to show in the second line.") - @ConfigEditorDropdown(values = { - "Nothing", - "Location", - "Purse", - "Bits", - "Stats", - "Held Item", - "SkyBlock Date", - "Profile", - "Slayer", - "Custom", - "Dynamic", - "Crop Milestone", - "Current Pet" - }) - public Property secondLine = Property.of(0); - - @Expose - @ConfigOption(name = "Custom", desc = "What should be displayed if you select \"Custom\" above.") - @ConfigEditorText - public Property customText = Property.of(""); - - @Expose - @ConfigOption(name = "Dynamic Priority", desc = "Disable certain dynamic statuses, or change the priority in case two are triggered at the same time (higher up means higher priority).") - @ConfigEditorDraggableList( - exampleText = { - "Crop Milestones", - "Slayer", - "Stacking Enchantment", - "Dungeon", - "AFK Indicator" - } - ) - public List autoPriority = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4)); - - @Expose - @ConfigOption(name = "Dynamic Fallback", desc = "What to show when none of your \"Dynamic Priority\" statuses are active.") - @ConfigEditorDropdown(values = { - "Nothing", - "Location", - "Purse", - "Bits", - "Stats", - "Held Item", - "SkyBlock Date", - "Profile", - "Slayer", - "Custom", - "Crop Milestone", - "Current Pet" - }) - public Property auto = Property.of(0); - } - - @ConfigOption(name = "Trevor The Trapper", desc = "") - @Accordion - @Expose - public TrevorTheTrapper trevorTheTrapper = new TrevorTheTrapper(); - - public static class TrevorTheTrapper { - - @Expose - @ConfigOption( - name = "Enable Data Tracker", - desc = "Tracks all of your data from doing Trevor Quests.\n" + - "Shows based on the setting below." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean dataTracker = true; - - @Expose - @ConfigOption( - name = "Show Between Quests", - desc = "Shows the tracker during and between quests otherwise it will only show during them." + - "Will show in the Trapper's Den regardless. §cToggle 'Enable Data Tracker' above." - ) - @ConfigEditorBoolean - public boolean displayType = true; - - @Expose - @ConfigOption( - name = "Text Format", - desc = "Drag text to change the appearance of the overlay." - ) - @ConfigEditorDraggableList( - exampleText = { - "§b§lTrevor Data Tracker", - "§b1,428 §9Quests Started", - "§b11,281 §5Total Pelts Gained", - "§b2,448 §5Pelts Per Hour", - "", - "§b850 §cKilled Animals", - "§b153 §cSelf Killing Animals", - "§b788 §fTrackable Animals", - "§b239 §aUntrackable Animals", - "§b115 §9Undetected Animals", - "§b73 §5Endangered Animals", - "§b12 §6Elusive Animals" - } - ) - public List textFormat = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11)); - - @Expose - public Position position = new Position(10, 80, false, true); - - @Expose - @ConfigOption(name = "Trapper Solver", desc = "Assists you in finding Trevor's mobs. §eNote: May not always work as expected. " + - "§cWill not help you to find rabbits or sheep in the Oasis!") - @ConfigEditorBoolean - @FeatureToggle - public boolean trapperSolver = true; - - @Expose - @ConfigOption(name = "Mob Dead Warning", desc = "Show a message when Trevor's mob dies.") - @ConfigEditorBoolean - public boolean trapperMobDiedMessage = true; - - @Expose - @ConfigOption(name = "Warp to Trapper", desc = "Warp to Trevor's Den. Works only inside the Farming Islands.") - @ConfigEditorBoolean - @FeatureToggle - public boolean warpToTrapper = false; - - @Expose - @ConfigOption(name = "Accept Trapper Quest", desc = "Click this key after the chat prompt to accept Trevor's quest.") - @ConfigEditorBoolean - @FeatureToggle - public boolean acceptQuest = false; - - @Expose - @ConfigOption(name = "Trapper Hotkey", desc = "Press this key to warp to Trevor's Den or to accept the quest. " + - "§eRequires the relevant above settings to be toggled") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) - public int keyBindWarpTrapper = Keyboard.KEY_NONE; - - - @Expose - @ConfigOption(name = "Trapper Cooldown", desc = "Change the color of Trevor and adds a cooldown over his head.") - @ConfigEditorBoolean - @FeatureToggle - public boolean trapperTalkCooldown = true; - - @Expose - @ConfigOption( - name = "Trapper Cooldown GUI", - desc = "Show the cooldown on screen in an overlay (intended for Abiphone users)." - ) - @ConfigEditorBoolean - public boolean trapperCooldownGui = false; - - @Expose - public Position trapperCooldownPos = new Position(10, 10, false, true); - } - - @ConfigOption(name = "Teleport Pads On Private Island", desc = "") - @Accordion - @Expose - public TeleportPad teleportPad = new TeleportPad(); - - public static class TeleportPad { - - @Expose - @ConfigOption(name = "Compact Name", desc = "Hide the 'Warp to' and 'No Destination' texts over teleport pads.") - @ConfigEditorBoolean - @FeatureToggle - public boolean compactName = false; - - @Expose - @ConfigOption(name = "Inventory Numbers", desc = "Show the number of the teleport pads inside the 'Change Destination' inventory as stack size.") - @ConfigEditorBoolean - @FeatureToggle - public boolean inventoryNumbers = false; - } - - @ConfigOption(name = "Pocket Sack-In-A-Sack", desc = "") - @Accordion - @Expose - public PocketSackInASack pocketSackInASack = new PocketSackInASack(); - - public static class PocketSackInASack { - - @Expose - @ConfigOption(name = "Show in Overlay", desc = "Show the number of Pocket Sack-In-A-Sack applied on a sack icon as an overlay.") - @ConfigEditorBoolean - @FeatureToggle - public boolean showOverlay = false; - - @Expose - @ConfigOption(name = "Replace In Lore", desc = "Replace how text is displayed in lore.\nShow §eis stitched with 2/3...\n§7Instead of §eis stitched with two...") - @ConfigEditorBoolean - @FeatureToggle - public boolean replaceLore = true; - } - - @ConfigOption(name = "Quick Mod Menu Switch", desc = "") - @Accordion - @Expose - public QuickModMenuSwitch quickModMenuSwitch = new QuickModMenuSwitch(); - - public static class QuickModMenuSwitch { - - @Expose - @ConfigOption(name = "Enabled", desc = "Adding a mod list, allowing to quickly switch between different mod menus.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Inside Escape Menu", desc = "Show the mod list while inside the Escape menu.") - @ConfigEditorBoolean - public boolean insideEscapeMenu = true; - - @Expose - @ConfigOption(name = "Inside Inventory", desc = "Show the mod list while inside the player inventory (no chest inventory).") - @ConfigEditorBoolean - public boolean insidePlayerInventory = false; - - @Expose - public Position pos = new Position(-178, 143, false, true); - } - - @Expose - @ConfigOption(name = "Cosmetic", desc = "") - @Accordion - public CosmeticConfig cosmeticConfig = new CosmeticConfig(); - - public static class CosmeticConfig { - - @Expose - @ConfigOption(name = "Following Line", desc = "") - @Accordion - public FollowingLineConfig followingLineConfig = new FollowingLineConfig(); - - public static class FollowingLineConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Draw a colored line behind the player.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Line Color", desc = "Color of the line.") - @ConfigEditorColour - public String lineColor = "0:255:255:255:255"; - - @Expose - @ConfigOption(name = "Time Alive", desc = "Time in seconds until the line fades out.") - @ConfigEditorSlider(minStep = 1, minValue = 1, maxValue = 30) - public int secondsAlive = 3; - - @Expose - @ConfigOption(name = "Max Line Width", desc = "Max width of the line.") - @ConfigEditorSlider(minStep = 1, minValue = 1, maxValue = 10) - public int lineWidth = 4; - - @Expose - @ConfigOption(name = "Behind Blocks", desc = "Show behind blocks.") - @ConfigEditorBoolean - public boolean behindBlocks = false; - } - - @Expose - @ConfigOption(name = "Arrow Trail", desc = "") - @Accordion - public ArrowTrailConfig arrowTrailConfig = new ArrowTrailConfig(); - - public static class ArrowTrailConfig { - @Expose - @ConfigOption(name = "Enabled", desc = "Draw a colored line behind arrows in the air.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Hide Nonplayer Arrows", desc = "Only shows for arrows the player has shot.") - @ConfigEditorBoolean - public boolean hideOtherArrows = true; - - @Expose - @ConfigOption(name = "Arrow Color", desc = "Color of the line.") - @ConfigEditorColour - public String arrowColor = "0:200:85:255:85"; - - @Expose - @ConfigOption(name = "Player Arrows", desc = "Different color for the line of arrows that you have shot.") - @ConfigEditorBoolean - public boolean handlePlayerArrowsDifferently = false; - - @Expose - @ConfigOption(name = "Player Arrow Color", desc = "Color of the line of your own arrows.") - @ConfigEditorColour - public String playerArrowColor = "0:200:85:255:255"; - - @Expose - @ConfigOption(name = "Time Alive", desc = "Time in seconds until the trail fades out.") - @ConfigEditorSlider(minStep = 0.1f, minValue = 0.1f, maxValue = 10) - public float secondsAlive = 0.5f; - - @Expose - @ConfigOption(name = "Line Width", desc = "Width of the line.") - @ConfigEditorSlider(minStep = 1, minValue = 1, maxValue = 10) - public int lineWidth = 4; - } - } - - - @Expose - @ConfigOption(name = "Glowing Dropped Items", desc = "") - @Accordion - public GlowingDroppedItems glowingDroppedItems = new GlowingDroppedItems(); - - public static class GlowingDroppedItems { - - @Expose - @ConfigOption(name = "Enabled", desc = "Draws a glowing outline around all dropped items on the ground.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Highlight Showcase Items", desc = "Draws a glowing outline around showcase items.") - @ConfigEditorBoolean - public boolean highlightShowcase = false; - - @Expose - @ConfigOption(name = "Highlight Fishing Bait", desc = "Draws a glowing outline around fishing bait.") - @ConfigEditorBoolean - public boolean highlightFishingBait = false; - - } - - - @Expose - @ConfigOption(name = "Highlight Party Members", desc = "") - @Accordion - public HighlightPartyMembers highlightPartyMembers = new HighlightPartyMembers(); - - public static class HighlightPartyMembers { - - @Expose - @ConfigOption(name = "Enabled", desc = "Marking party members with a bright outline to better find them in the world.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption( - name = "Outline Color", - desc = "The color to outline party members in." - ) - @ConfigEditorColour - public String outlineColor = "0:245:85:255:85"; - - } - - - @Expose - @ConfigOption(name = "Compact Tab List", desc = "") - @Accordion - public CompactTabListConfig compactTabList = new CompactTabListConfig(); - - public static class CompactTabListConfig { - @Expose - @ConfigOption(name = "Enabled", desc = "Compacts the tablist to make it look much nicer like SBA did. Also " + - "doesn't break god-pot detection and shortens some other lines.") - //made tablist one word here so both searches will pick it up - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Hide Hypixel Adverts", desc = "Hides text from advertising the Hypixel server or store in the tablist.") - @ConfigEditorBoolean - public boolean hideAdverts = false; - - @Expose - @ConfigOption(name = "Advanced Player List", desc = "") - @Accordion - public AdvancedPlayerList advancedPlayerList = new AdvancedPlayerList(); - - public static class AdvancedPlayerList { - - @Expose - @ConfigOption(name = "Player Sort", desc = "Change the sort order of player names in the tab list.") - @ConfigEditorDropdown(values = {"Rank (Default)", "SB Level", "Name (Abc)", "Ironman/Bingo", "Party/Friends/Guild", "Random"}) - public int playerSortOrder = 0; - - @Expose - @ConfigOption(name = "Invert Sort", desc = "Flip the player list order on its head (also works with default rank).") - @ConfigEditorBoolean - public boolean reverseSort = false; - - @Expose - @ConfigOption(name = "Hide Player Icons", desc = "Hide the icons/skins of player in the tab list.") - @ConfigEditorBoolean - public boolean hidePlayerIcons = false; - - @Expose - @ConfigOption(name = "Hide Rank Color", desc = "Hide the player rank color.") - @ConfigEditorBoolean - public boolean hideRankColor = false; - - @Expose - @ConfigOption(name = "Hide Emblems", desc = "Hide the emblems behind the player name.") - @ConfigEditorBoolean - public boolean hideEmblem = false; - - @Expose - @ConfigOption(name = "Hide Level", desc = "Hide the SkyBlock level numbers.") - @ConfigEditorBoolean - public boolean hideLevel = false; - - @Expose - @ConfigOption(name = "Hide Level Brackets", desc = "Hide the gray brackets in front of and behind the level numbers.") - @ConfigEditorBoolean - public boolean hideLevelBrackets = false; - - @Expose - @ConfigOption(name = "Level Color As Name", desc = "Use the color of the SkyBlock level for the player color.") - @ConfigEditorBoolean - public boolean useLevelColorForName = false; - - @Expose - @ConfigOption(name = "Bingo Rank Number", desc = "Show the number of the bingo rank next to the icon. Useful if you are not so familar with bingo.") - @ConfigEditorBoolean - public boolean showBingoRankNumber = false; - - @Expose - @ConfigOption(name = "Hide Factions", desc = "Hide the icon of the Crimson Isle Faction in the tab list.") - @ConfigEditorBoolean - public boolean hideFactions = false; - - @Expose - @ConfigOption(name = "Mark Special Persons", desc = "Show speical icons behind the name of guild members, party members, friends, and marked players.") - @ConfigEditorBoolean - public boolean markSpecialPersons = false; - - @Expose - @ConfigOption( - name = "Mark SkyHanni Devs", - desc = "Adds a §c:O §7behind the tablist name of §cSkyHanni's contributors§7. " + - "§eThose are the folks that coded the mod for you for free :)" - ) - @ConfigEditorBoolean - public boolean markSkyHanniContributors = false; - } - } - - @Expose - @ConfigOption(name = "Kick Duration", desc = "") - @Accordion - public KickDurationConfig kickDuration = new KickDurationConfig(); - - public static class KickDurationConfig { - - @Expose - @ConfigOption( - name = "Enabled", - desc = "Show in the Hypixel lobby since when you were last kicked from SkyBlock (" + - "useful if you get blocked because of '§cYou were kicked while joining that server!§7')." - ) - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Warn Time", desc = "Send warning and sound this seconds after a SkyBlock kick.") - @ConfigEditorSlider( - minValue = 5, - maxValue = 300, - minStep = 1 - ) - public Property warnTime = Property.of(60); - - @Expose - public Position position = new Position(400, 200, 1.3f); - } - - @Expose - @ConfigOption(name = "Exp Bottles", desc = "Hides all the experience orbs lying on the ground.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideExpBottles = false; - - @Expose - public Position collectionCounterPos = new Position(10, 10, false, true); - - @Expose - @ConfigOption(name = "Brewing Stand Overlay", desc = "Display the Item names directly inside the Brewing Stand.") - @ConfigEditorBoolean - @FeatureToggle - public boolean brewingStandOverlay = true; - - @Expose - @ConfigOption(name = "Red Scoreboard Numbers", desc = "Hide the red scoreboard numbers on the right side of the screen.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideScoreboardNumbers = false; - - @Expose - @ConfigOption(name = "Hide Piggy", desc = "Replacing 'Piggy' with 'Purse' in the Scoreboard.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hidePiggyScoreboard = true; - - @Expose - @ConfigOption(name = "Explosions Hider", desc = "Hide explosions.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideExplosions = false; - - @Expose - @ConfigOption(name = "CH Join", desc = "Helps buy a Pass for accessing the Crystal Hollows if needed.") - @ConfigEditorBoolean - @FeatureToggle - public boolean crystalHollowsJoin = true; - - @Expose - @ConfigOption(name = "Fire Overlay Hider", desc = "Hide the fire overlay (Like in Skytils).") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideFireOverlay = false; - - @Expose - @ConfigOption(name = "Paste Into Signs", desc = "Allows you to paste the clipboard into signs when you press Ctrl + V.") - @ConfigEditorBoolean - @FeatureToggle - public boolean pasteIntoSigns = true; - - @Expose - @ConfigOption(name = "Movement Speed", desc = "Show the player movement speed in blocks per second.") - @ConfigEditorBoolean - @FeatureToggle - public boolean playerMovementSpeed = false; - - @Expose - public Position playerMovementSpeedPos = new Position(394, 124, false, true); - - @Expose - @ConfigOption(name = "Pet Candy Used", desc = "Show the number of Pet Candy used on a pet.") - @ConfigEditorBoolean - @FeatureToggle - public boolean petCandyUsed = true; - - @Expose - @ConfigOption(name = "Server Restart Title", desc = "Show a title with seconds remaining until the server restarts after a Game Update or Scheduled Restart.") - @ConfigEditorBoolean - @FeatureToggle - public boolean serverRestartTitle = true; - - @Expose - @ConfigOption(name = "Piece Of Wizard Portal", desc = "Restore the Earned By lore line on bought Piece Of Wizard Portal.") - @ConfigEditorBoolean - @FeatureToggle - public boolean restorePieceOfWizardPortalLore = true; - - @Expose - @ConfigOption(name = "Patcher Coords Waypoint", desc = "Highlight the coordinates sent by Patcher.") - @ConfigEditorBoolean - @FeatureToggle - public boolean patcherSendCoordWaypoint = false; - - - @Expose - @ConfigOption(name = "Account Upgrade Reminder", desc = "Remind you to claim account upgrades when complete.") - @ConfigEditorBoolean - @FeatureToggle - public boolean accountUpgradeReminder = true; - - @Expose - @ConfigOption(name = "Superpairs Clicks Alert", desc = "Display an alert when you reach the maximum clicks gained from Chronomatron or Ultrasequencer.") - @ConfigEditorBoolean - @FeatureToggle - public boolean superpairsClicksAlert = false; - - @Expose - @ConfigOption(name = "NEU Heavy Pearls", desc = "Fixing NEU Heavy Pearl detection.") - @ConfigEditorBoolean - @FeatureToggle - public boolean fixNeuHeavyPearls = true; - - @Expose - @ConfigOption( - name = "Time In Limbo", - desc = "Show the time since you entered the limbo.") - @ConfigEditorBoolean - @FeatureToggle - public boolean showTimeInLimbo = true; - - @Expose - public Position showTimeInLimboPosition = new Position(400, 200, 1.3f); - - @Expose - public Position lockedMouseDisplay = new Position(400, 200, 0.8f); - - @Expose - public Position inventoryLoadPos = new Position(394, 124, false, true); -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/RiftConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/RiftConfig.java deleted file mode 100644 index 9021ec9be..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/RiftConfig.java +++ /dev/null @@ -1,720 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import at.hannibal2.skyhanni.config.FeatureToggle; -import at.hannibal2.skyhanni.config.core.config.Position; -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; -import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; -import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; -import io.github.moulberry.moulconfig.annotations.ConfigEditorText; -import io.github.moulberry.moulconfig.annotations.ConfigOption; -import io.github.moulberry.moulconfig.observer.Property; - -public class RiftConfig { - - @ConfigOption(name = "Rift Timer", desc = "") - @Accordion - @Expose - public RiftTimerConfig timer = new RiftTimerConfig(); - - public static class RiftTimerConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Show the remaining rift time, max time, percentage, and extra time changes.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Max Time", desc = "Show max time.") - @ConfigEditorBoolean - public boolean maxTime = true; - - @Expose - @ConfigOption(name = "Percentage", desc = "Show percentage.") - @ConfigEditorBoolean - public boolean percentage = true; - - @Expose - public Position timerPosition = new Position(10, 10, false, true); - - } - - @ConfigOption(name = "Crux Talisman Progress", desc = "") - @Accordion - @Expose - public CruxTalismanDisplayConfig cruxTalisman = new CruxTalismanDisplayConfig(); - - public static class CruxTalismanDisplayConfig { - @Expose - @ConfigOption(name = "Crux Talisman Display", desc = "Display progress of the Crux Talisman on screen.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Compact", desc = "Show a compacted version of the overlay when the talisman is maxed.") - @ConfigEditorBoolean - public boolean compactWhenMaxed = false; - - @Expose - @ConfigOption(name = "Show Bonuses", desc = "Show bonuses you get from the talisman.") - @ConfigEditorBoolean - @FeatureToggle - public Property showBonuses = Property.of(true); - - @Expose - public Position position = new Position(144, 139, false, true); - } - - @ConfigOption(name = "Enigma Soul Waypoints", desc = "") - @Accordion - @Expose - public EnigmaSoulConfig enigmaSoulWaypoints = new EnigmaSoulConfig(); - - public static class EnigmaSoulConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Click on Enigma Souls in Rift Guides to highlight their location.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Color", desc = "Color of the Enigma Souls.") - @ConfigEditorColour - public String color = "0:120:13:49:255"; - - } - - @ConfigOption(name = "Rift Areas", desc = "") - @Accordion - @Expose - public RiftAreasConfig area = new RiftAreasConfig(); - - public static class RiftAreasConfig { - - @ConfigOption(name = "Wyld Woods", desc = "") - @Accordion - @Expose - public WyldWoodsConfig wyldWoodsConfig = new WyldWoodsConfig(); - - public static class WyldWoodsConfig { - - @Expose - @ConfigOption(name = "Shy Crux Warning", desc = "Shows a warning when a Shy Crux is going to steal your time. " + - "Useful if you play without volume.") - @ConfigEditorBoolean - @FeatureToggle - public boolean shyWarning = true; - - @ConfigOption(name = "Larvas", desc = "") - @Accordion - @Expose - public LarvasConfig larvas = new LarvasConfig(); - - public static class LarvasConfig { - - @Expose - @ConfigOption(name = "Highlight", desc = "Highlight §cLarvas on trees §7while holding a §eLarva Hook §7in the hand.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlight = true; - - @Expose - @ConfigOption(name = "Color", desc = "Color of the Larvas.") - @ConfigEditorColour - public String highlightColor = "0:120:13:49:255"; - - } - - @ConfigOption(name = "Odonatas", desc = "") - @Accordion - @Expose - public OdonataConfig odonata = new OdonataConfig(); - - public static class OdonataConfig { - - @Expose - @ConfigOption(name = "Highlight", desc = "Highlight the small §cOdonatas §7flying around the trees while holding an " + - "§eEmpty Odonata Bottle §7in the hand.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlight = true; - - @Expose - @ConfigOption(name = "Color", desc = "Color of the Odonatas.") - @ConfigEditorColour - public String highlightColor = "0:120:13:49:255"; - - } - } - - @ConfigOption(name = "West Village", desc = "") - @Accordion - @Expose - public WestVillageConfig westVillageConfig = new WestVillageConfig(); - - public static class WestVillageConfig { - - @ConfigOption(name = "Kloon Hacking", desc = "") - @Accordion - @Expose - public KloonHackingConfig hacking = new KloonHackingConfig(); - - public static class KloonHackingConfig { - - @Expose - @ConfigOption(name = "Hacking Solver", desc = "Highlights the correct button to click in the hacking inventory.") - @ConfigEditorBoolean - @FeatureToggle - public boolean solver = true; - - @Expose - @ConfigOption(name = "Color Guide", desc = "Tells you which color to pick.") - @ConfigEditorBoolean - @FeatureToggle - public boolean colour = true; - - @Expose - @ConfigOption(name = "Terminal Waypoints", desc = "While wearing the helmet, waypoints will appear at each terminal location.") - @ConfigEditorBoolean - @FeatureToggle - public boolean waypoints = true; - } - } - - @Expose - @ConfigOption(name = "Dreadfarm", desc = "") - @Accordion - public DreadfarmConfig dreadfarmConfig = new DreadfarmConfig(); - - public static class DreadfarmConfig { - @Expose - @ConfigOption(name = "Agaricus Cap", desc = "Counts down the time until §eAgaricus Cap (Mushroom) " + - "§7changes color from brown to red and is breakable.") - @ConfigEditorBoolean - @FeatureToggle - public boolean agaricusCap = true; - - @ConfigOption(name = "Volt Crux", desc = "") - @Accordion - @Expose - public VoltCruxConfig voltCrux = new VoltCruxConfig(); - - public static class VoltCruxConfig { - - @Expose - @ConfigOption(name = "Volt Warning", desc = "Shows a warning while a Volt is discharging lightning.") - @ConfigEditorBoolean - @FeatureToggle - public boolean voltWarning = true; - - @Expose - @ConfigOption(name = "Volt Range Highlighter", desc = "Shows the area in which a Volt might strike lightning.") - @ConfigEditorBoolean - @FeatureToggle - public boolean voltRange = true; - - @Expose - @ConfigOption(name = "Volt Range Highlighter Color", desc = "In which color should the Volt range be highlighted?") - @ConfigEditorColour - public String voltColour = "0:60:0:0:255"; - - @Expose - @ConfigOption(name = "Volt Mood Color", desc = "Change the color of the Volt enemy depending on their mood.") - @ConfigEditorBoolean - @FeatureToggle - public boolean voltMoodMeter = false; - } - - @ConfigOption(name = "Wilted Berberis", desc = "") - @Accordion - @Expose - public WiltedBerberisConfig wiltedBerberis = new WiltedBerberisConfig(); - - public static class WiltedBerberisConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Show Wilted Berberis helper.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Only on Farmland", desc = "Only show the helper while standing on Farmland blocks.") - @ConfigEditorBoolean - public boolean onlyOnFarmland = false; - - @Expose - @ConfigOption(name = "Hide Particles", desc = "Hide the Wilted Berberis particles.") - @ConfigEditorBoolean - public boolean hideparticles = false; - - } - } - - @ConfigOption(name = "Mirrorverse", desc = "") - @Accordion - @Expose - public MirrorVerseConfig mirrorVerseConfig = new MirrorVerseConfig(); - - public static class MirrorVerseConfig { - - @ConfigOption(name = "Lava Maze", desc = "") - @Accordion - @Expose - public LavaMazeConfig lavaMazeConfig = new LavaMazeConfig(); - - public static class LavaMazeConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Helps solving the lava maze in the Mirrorverse by showing the correct way.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Look Ahead", desc = "Change how many platforms should be shown in front of you.") - @ConfigEditorSlider(minStep = 1, maxValue = 30, minValue = 1) - public Property lookAhead = Property.of(3); - - @Expose - @ConfigOption(name = "Rainbow Color", desc = "Show the rainbow color effect instead of a boring monochrome.") - @ConfigEditorBoolean - public Property rainbowColor = Property.of(true); - - @Expose - @ConfigOption(name = "Monochrome Color", desc = "Set a boring monochrome color for the parkour platforms.") - @ConfigEditorColour - public Property monochromeColor = Property.of("0:60:0:0:255"); - - @Expose - @ConfigOption(name = "Hide Others Players", desc = "Hide other players while doing the lava maze.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hidePlayers = false; - } - - - @ConfigOption(name = "Upside Down Parkour", desc = "") - @Accordion - @Expose - public UpsideDownParkourConfig upsideDownParkour = new UpsideDownParkourConfig(); - - public static class UpsideDownParkourConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Helps solving the upside down parkour in the Mirrorverse by showing the correct way.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Look Ahead", desc = "Change how many platforms should be shown in front of you.") - @ConfigEditorSlider(minStep = 1, maxValue = 9, minValue = 1) - public Property lookAhead = Property.of(3); - - @Expose - @ConfigOption(name = "Outline", desc = "Outlines the top edge of the platforms.") - @ConfigEditorBoolean - public boolean outline = true; - - @Expose - @ConfigOption(name = "Rainbow Color", desc = "Show the rainbow color effect instead of a boring monochrome.") - @ConfigEditorBoolean - public Property rainbowColor = Property.of(true); - - @Expose - @ConfigOption(name = "Monochrome Color", desc = "Set a boring monochrome color for the parkour platforms.") - @ConfigEditorColour - public Property monochromeColor = Property.of("0:60:0:0:255"); - - @Expose - @ConfigOption(name = "Hide Others Players", desc = "Hide other players while doing the upside down parkour.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hidePlayers = false; - } - - - @ConfigOption(name = "Dance Room Helper", desc = "") - @Accordion - @Expose - public DanceRoomHelperConfig danceRoomHelper = new DanceRoomHelperConfig(); - - public static class DanceRoomHelperConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Helps to solve the dance room in the Mirrorverse by showing multiple tasks at once.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Lines to Show", desc = "How many tasks you should see.") - @ConfigEditorSlider(minStep = 1, maxValue = 49, minValue = 1) - public int lineToShow = 3; - - @Expose - @ConfigOption(name = "Space", desc = "Change the space between each line.") - @ConfigEditorSlider(minStep = 1, maxValue = 10, minValue = -5) - public int extraSpace = 0; - - @Expose - @ConfigOption(name = "Hide Other Players", desc = "Hide other players inside the dance room.") - @ConfigEditorBoolean - public boolean hidePlayers = false; - - @Expose - @ConfigOption(name = "Hide Title", desc = "Hide Instructions, \"§aIt's happening!\" §7and \"§aKeep it up!\" §7titles.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideOriginalTitle = false; - - @Expose - @ConfigOption(name = "Formatting", desc = "") - @Accordion - public DanceRoomFormattingConfig danceRoomFormatting = new DanceRoomFormattingConfig(); - - public static class DanceRoomFormattingConfig { - - @Expose - @ConfigOption(name = "Now", desc = "Formatting for \"Now:\"") - @ConfigEditorText - public String now = "&7Now:"; - - @Expose - @ConfigOption(name = "Next", desc = "Formatting for \"Next:\"") - @ConfigEditorText - public String next = "&7Next:"; - - @Expose - @ConfigOption(name = "Later", desc = "Formatting for \"Later:\"") - @ConfigEditorText - public String later = "&7Later:"; - - @Expose - @ConfigOption(name = "Color Option", desc = "") - @Accordion - public ColorConfig color = new ColorConfig(); - - public static class ColorConfig { - @Expose - @ConfigOption(name = "Move", desc = "Color for the Move instruction") - @ConfigEditorText - public String move = "&e"; - - @Expose - @ConfigOption(name = "Stand", desc = "Color for the Stand instruction") - @ConfigEditorText - public String stand = "&e"; - - @Expose - @ConfigOption(name = "Sneak", desc = "Color for the Sneak instruction") - @ConfigEditorText - public String sneak = "&5"; - - @Expose - @ConfigOption(name = "Jump", desc = "Color for the Jump instruction") - @ConfigEditorText - public String jump = "&b"; - - @Expose - @ConfigOption(name = "Punch", desc = "Color for the Punch instruction") - @ConfigEditorText - public String punch = "&d"; - - @Expose - @ConfigOption(name = "Countdown", desc = "Color for the Countdown") - @ConfigEditorText - public String countdown = "&f"; - - @Expose - @ConfigOption(name = "Default", desc = "Fallback color") - @ConfigEditorText - public String fallback = "&f"; - } - } - - @Expose - public Position position = new Position(442, 239, false, true); - } - - - @ConfigOption(name = "Tubulator", desc = "") - @Accordion - @Expose - public TubulatorConfig tubulatorConfig = new TubulatorConfig(); - - public static class TubulatorConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Highlights the location of the invisible Tubulator blocks (Laser Parkour).") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Look Ahead", desc = "Change how many platforms should be shown in front of you.") - @ConfigEditorSlider(minStep = 1, maxValue = 30, minValue = 1) - public Property lookAhead = Property.of(2); - - @Expose - @ConfigOption(name = "Outline", desc = "Outlines the top edge of the platforms.") - @ConfigEditorBoolean - public boolean outline = true; - - @Expose - @ConfigOption(name = "Rainbow Color", desc = "Show the rainbow color effect instead of a boring monochrome.") - @ConfigEditorBoolean - public Property rainbowColor = Property.of(true); - - @Expose - @ConfigOption(name = "Monochrome Color", desc = "Set a boring monochrome color for the parkour platforms.") - @ConfigEditorColour - public Property monochromeColor = Property.of("0:60:0:0:255"); - - @Expose - @ConfigOption(name = "Hide Other Players", desc = "Hide other players while doing the lava maze.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hidePlayers = false; - } - } - -// @Expose -// @ConfigOption(name = "Village Plaza", desc = "") -// @Accordion -// public VillagePlazaConfig villagePlazaConfig = new VillagePlazaConfig(); -// -// public static class VillagePlazaConfig { -// -// } - - @Expose - @ConfigOption(name = "Living Cave", desc = "") - @Accordion - public LivingCaveConfig livingCaveConfig = new LivingCaveConfig(); - - public static class LivingCaveConfig { - - @Expose - @ConfigOption(name = "Living Metal Suit Progress", desc = "") - @Accordion - public LivingMetalSuitProgressConfig livingMetalSuitProgress = new LivingMetalSuitProgressConfig(); - - public static class LivingMetalSuitProgressConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Display Living Metal Suit progress.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Compact", desc = "Show a compacted version of the overlay when the set is maxed.") - @ConfigEditorBoolean - public boolean compactWhenMaxed = false; - - @Expose - public Position position = new Position(100, 100); - } - - @Expose - @ConfigOption(name = "Defense Blocks", desc = "") - @Accordion - public DefenseBlockConfig defenseBlockConfig = new DefenseBlockConfig(); - - public static class DefenseBlockConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Show a line between Defense blocks and the mob and highlight the blocks.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Hide Particles", desc = "Hide particles around Defense Blocks.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideParticles = false; - - @Expose - @ConfigOption(name = "Color", desc = "Set the color of the lines, blocks and the entity.") - @ConfigEditorColour - public Property color = Property.of("0:255:77:104:255"); - - } - - @Expose - @ConfigOption(name = "Living Metal Helper", desc = "") - @Accordion - public LivingCaveLivingMetalConfig livingCaveLivingMetalConfig = new LivingCaveLivingMetalConfig(); - - public static class LivingCaveLivingMetalConfig { - - @Expose - @ConfigOption(name = "Living Metal", desc = "Show a moving animation between Living Metal and the next block.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Hide Particles", desc = "Hide Living Metal particles.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideParticles = false; - - } - } - - @Expose - @ConfigOption(name = "Colosseum", desc = "") - @Accordion - public ColosseumConfig colosseumConfig = new ColosseumConfig(); - - public static class ColosseumConfig { - - @Expose - @ConfigOption(name = "Highlight Blobbercysts", desc = "Highlight Blobbercysts in Bacte fight.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlightBlobbercysts = true; - } - - @Expose - @ConfigOption(name = "Stillgore Chateau", desc = "") - @Accordion - public StillgoreChateauConfig stillgoreChateauConfig = new StillgoreChateauConfig(); - - public static class StillgoreChateauConfig { - - @Expose - @ConfigOption(name = "Blood Effigies", desc = "") - @Accordion - public EffigiesConfig bloodEffigies = new EffigiesConfig(); - - public static class EffigiesConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Show locations of inactive Blood Effigies.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Respawning Soon", desc = "Show effigies that are about to respawn.") - @ConfigEditorBoolean - @FeatureToggle - public boolean respawningSoon = false; - - @Expose - @ConfigOption(name = "Respawning Time", desc = "Time before effigies respawn to show.") - @ConfigEditorSlider( - minValue = 1, - maxValue = 15, - minStep = 1 - ) - public int respwningSoonTime = 3; - - @Expose - @ConfigOption(name = "Unknown Times", desc = "Show effigies without known time.") - @ConfigEditorBoolean - @FeatureToggle - public boolean unknownTime = false; - } - } - -// @Expose -// @ConfigOption(name = "Mountaintop", desc = "") -// @Accordion -// public MountaintopConfig mountaintopConfig = new MountaintopConfig(); -// -// public static class MountaintopConfig { -// -// } - - } - - @Expose - @ConfigOption(name = "Motes Sell Price", desc = "") - @Accordion - public MotesConfig motes = new MotesConfig(); - - public static class MotesConfig { - - @Expose - @ConfigOption(name = "Show Motes Price", desc = "Show the Motes NPC price in the item lore.") - @ConfigEditorBoolean - @FeatureToggle - public boolean showPrice = true; - - @Expose - @ConfigOption(name = "Burger Stacks", desc = "Set your McGrubber's burger stacks.") - @ConfigEditorSlider(minStep = 1, minValue = 0, maxValue = 5) - public int burgerStacks = 0; - - @Expose - @ConfigOption(name = "Inventory Value", desc = "") - @Accordion - public InventoryValueConfig inventoryValue = new InventoryValueConfig(); - - public static class InventoryValueConfig { - @Expose - @ConfigOption(name = "Inventory Value", desc = "Show total Motes NPC price for the current opened inventory.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Number Format Type", desc = "Short: 1.2M\n" + - "Long: 1,200,000") - @ConfigEditorDropdown(values = {"Short", "Long"}) - public int formatType = 0; - - @Expose - public Position position = new Position(126, 156, false, true); - } - } - - @Expose - @ConfigOption(name = "Motes Orbs", desc = "") - @Accordion - public MotesOrbsConfig motesOrbsConfig = new MotesOrbsConfig(); - - public static class MotesOrbsConfig { - - @Expose - @ConfigOption(name = "Highlight Motes Orbs", desc = "Highlight flying Motes Orbs.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Highlight Size", desc = "Set render size for highlighted Motes Orbs.") - @ConfigEditorSlider(minStep = 1, minValue = 1, maxValue = 5) - public int size = 3; - - @Expose - @ConfigOption(name = "Hide Particles", desc = "Hide normal Motes Orbs particles.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideParticles = false; - - } - - @Expose - @ConfigOption(name = "Highlight Guide", desc = "Highlight things to do in the Rift Guide.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlightGuide = true; - - @Expose - @ConfigOption(name = "Horsezooka Hider", desc = "Hide horses while holding the Horsezooka in the hand.") - @ConfigEditorBoolean - @FeatureToggle - public boolean horsezookaHider = false; -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/SlayerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/SlayerConfig.java deleted file mode 100644 index 1c0003eab..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/features/SlayerConfig.java +++ /dev/null @@ -1,529 +0,0 @@ -package at.hannibal2.skyhanni.config.features; - -import at.hannibal2.skyhanni.config.FeatureToggle; -import at.hannibal2.skyhanni.config.core.config.Position; -import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; -import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; -import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; -import io.github.moulberry.moulconfig.annotations.ConfigEditorText; -import io.github.moulberry.moulconfig.annotations.ConfigOption; - -public class SlayerConfig { - - @Expose - @ConfigOption(name = "Enderman Slayer Features", desc = "") - @Accordion - public EndermanConfig endermen = new EndermanConfig(); - - public static class EndermanConfig { - @Expose - @ConfigOption(name = "Yang Glyph (beacon)", desc = "") - @Accordion - public EndermanBeaconConfig endermanBeaconConfig = new EndermanBeaconConfig(); - - public static class EndermanBeaconConfig { - - @Expose - @ConfigOption(name = "Highlight Beacon", - desc = "Highlight the Enderman Slayer Yang Glyph (beacon) in red color and added a timer for when he explodes. " + - "Supports beacon in hand and beacon flying.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlightBeacon = true; - - @Expose - @ConfigOption(name = "Beacon Color", desc = "Color of the beacon.") - @ConfigEditorColour - public String beaconColor = "0:255:255:0:88"; - - @Expose - @ConfigOption(name = "Show Warning", desc = "Displays a warning mid-screen when the Enderman Slayer throws a Yang Glyph (beacon).") - @ConfigEditorBoolean - @FeatureToggle - public boolean showWarning = false; - - @Expose - @ConfigOption(name = "Show Line", desc = "Draw a line starting at your crosshair to the beacon.") - @ConfigEditorBoolean - @FeatureToggle - public boolean showLine = false; - - @Expose - @ConfigOption(name = "Line Color", desc = "Color of the line.") - @ConfigEditorColour - public String lineColor = "0:255:255:0:88"; - - @Expose - @ConfigOption(name = "Line Width", desc = "Width of the line.") - @ConfigEditorSlider(minStep = 1, minValue = 1, maxValue = 10) - public int lineWidth = 3; - } - - @Expose - @ConfigOption(name = "Highlight Nukekubi Skulls", desc = "Highlights the Enderman Slayer Nukekubi Skulls (Eyes).") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlightNukekebi = false; - - @Expose - @ConfigOption(name = "Phase Display", desc = "Show the current phase of the Enderman Slayer in damage indcator.") - @ConfigEditorBoolean - public boolean phaseDisplay = false; - - @Expose - @ConfigOption(name = "Hide Particles", desc = "Hide particles around Enderman Slayer bosses and Mini-Bosses.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideParticles = false; - } - - - @Expose - @ConfigOption(name = "Blaze", desc = "") - @Accordion - public BlazeConfig blazes = new BlazeConfig(); - - public static class BlazeConfig { - @Expose - @ConfigOption(name = "Hellion Shields", desc = "") - @Accordion - public BlazeHellionConfig hellion = new BlazeHellionConfig(); - - public static class BlazeHellionConfig { - @Expose - @ConfigOption(name = "Colored Mobs", desc = "Color the Blaze Slayer boss and the demons in the right hellion shield color.") - @ConfigEditorBoolean - @FeatureToggle - public boolean coloredMobs = false; - - @Expose - @ConfigOption(name = "Blaze Daggers", desc = "Faster and permanent display for the Blaze Slayer daggers.") - @ConfigEditorBoolean - @FeatureToggle - public boolean daggers = false; - - @Expose - @ConfigOption(name = "Right Dagger", desc = "Mark the right dagger to use for Blaze Slayer in the dagger overlay.") - @ConfigEditorBoolean - @FeatureToggle - public boolean markRightHellionShield = false; - - @Expose - @ConfigOption(name = "First Dagger", desc = "Select the first, left sided dagger for the display.") - @ConfigEditorDropdown(values = {"Spirit/Crystal", "Ashen/Auric"}) - public int firstDagger = 0; - - @Expose - @ConfigOption(name = "Hide Chat", desc = "Remove the wrong Blaze Slayer dagger messages from chat.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideDaggerWarning = false; - - @Expose - public Position positionTop = new Position(-475, 173, 4.4f, true); - - @Expose - public Position positionBottom = new Position(-475, 230, 3.2f, true); - } - - - @Expose - @ConfigOption(name = "Fire Pits", desc = "Warning when the fire pit phase starts for the Blaze Slayer tier 3 and 4.") - @ConfigEditorBoolean - @FeatureToggle - public boolean firePitsWarning = false; - - @Expose - @ConfigOption(name = "Phase Display", desc = "Show the current phase of the Blaze Slayer boss.") - @ConfigEditorBoolean - public boolean phaseDisplay = false; - - @Expose - @ConfigOption(name = "Clear View", desc = "Hide particles and fireballs near Blaze Slayer bosses and demons.") - @ConfigEditorBoolean - @FeatureToggle - public boolean clearView = false; - } - - - @Expose - @ConfigOption(name = "Vampire Slayer Features", desc = "") - @Accordion - public VampireSlayerConfig vampireSlayerConfig = new VampireSlayerConfig(); - - public static class VampireSlayerConfig { - - @Expose - @ConfigOption(name = "Your Boss", desc = "") - @Accordion - public OwnBossConfig ownBoss = new OwnBossConfig(); - - public static class OwnBossConfig { - - @Expose - @ConfigOption(name = "Highlight Your Boss", desc = "Highlight your own Vampire Slayer boss.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlight = true; - - @Expose - @ConfigOption(name = "Highlight Color", desc = "What color to highlight the boss in.") - @ConfigEditorColour - public String highlightColor = "0:249:0:255:88"; - - @Expose - @ConfigOption(name = "Steak Alert", desc = "Show a title when you can steak your boss.") - @ConfigEditorBoolean - @FeatureToggle - public boolean steakAlert = true; - - @Expose - @ConfigOption(name = "Twinclaws Title", desc = "Send a title when Twinclaws is about to happen.\nWork on others highlighted people boss.") - @ConfigEditorBoolean - @FeatureToggle - public boolean twinClawsTitle = true; - - @Expose - @ConfigOption(name = "Twinclaws Sound", desc = "Play a sound when Twinclaws is about to happen.") - @ConfigEditorBoolean - @FeatureToggle - public boolean twinClawsSound = true; - } - - @Expose - @ConfigOption(name = "Others Boss", desc = "") - @Accordion - public OthersBossConfig othersBoss = new OthersBossConfig(); - - public static class OthersBossConfig { - - @Expose - @ConfigOption(name = "Highlight Others Boss", desc = "Highlight others players boss.\nYou need to hit them first.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlight = true; - - @Expose - @ConfigOption(name = "Highlight Color", desc = "What color to highlight the boss in.") - @ConfigEditorColour - public String highlightColor = "0:249:0:255:88"; - - @Expose - @ConfigOption(name = "Steak Alert", desc = "Show a title when you can steak the boss.") - @ConfigEditorBoolean - @FeatureToggle - public boolean steakAlert = true; - - @Expose - @ConfigOption(name = "Twinclaws Title", desc = "Send a title when Twinclaws is about to happen.") - @ConfigEditorBoolean - @FeatureToggle - public boolean twinClawsTitle = true; - - @Expose - @ConfigOption(name = "Twinclaws Sound", desc = "Play a sound when Twinclaws is about to happen.") - @ConfigEditorBoolean - @FeatureToggle - public boolean twinClawsSound = true; - } - - @Expose - @ConfigOption(name = "Co-op Boss", desc = "") - @Accordion - public CoopBossHighlightConfig coopBoss = new CoopBossHighlightConfig(); - - public static class CoopBossHighlightConfig { - @Expose - @ConfigOption(name = "Highlight Co-op Boss", desc = "Highlight boss of your co-op member.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlight = true; - - @Expose - @ConfigOption(name = "Highlight Color", desc = "What color to highlight the boss in.") - @ConfigEditorColour - public String highlightColor = "0:249:0:255:88"; - - @Expose - @ConfigOption(name = "Co-op Members", desc = "Add your co-op member here.\n§eFormat: §7Name1,Name2,Name3") - @ConfigEditorText - public String coopMembers = ""; - - @Expose - @ConfigOption(name = "Steak Alert", desc = "Show a title when you can steak the boss.") - @ConfigEditorBoolean - @FeatureToggle - public boolean steakAlert = true; - - @Expose - @ConfigOption(name = "Twinclaws Title", desc = "Send a title when Twinclaws is about to happen.") - @ConfigEditorBoolean - @FeatureToggle - public boolean twinClawsTitle = true; - - @Expose - @ConfigOption(name = "Twinclaws Sound", desc = "Play a sound when Twinclaws is about to happen.") - @ConfigEditorBoolean - @FeatureToggle - public boolean twinClawsSound = true; - } - - @Expose - @ConfigOption(name = "Transparency", desc = "Choose the transparency of the color.") - @ConfigEditorSlider(minStep = 1, minValue = 1, maxValue = 250) - public int withAlpha = 80; - - @Expose - @ConfigOption(name = "See Through Blocks", desc = "Highlight even when behind others mobs/players.") - @ConfigEditorBoolean - public boolean seeThrough = false; - - @Expose - @ConfigOption(name = "Low Health", desc = "Change color when the boss is below 20% health.") - @ConfigEditorBoolean - @FeatureToggle - public boolean changeColorWhenCanSteak = true; - - @Expose - @ConfigOption(name = "Can use Steak Color", desc = "Color when the boss is below 20% health.") - @ConfigEditorColour - public String steakColor = "0:255:255:0:88"; - - @Expose - @ConfigOption(name = "Twinclaws", desc = "Delay the sound and title of Twinclaws alert for a given amount in milliseconds.") - @ConfigEditorSlider(minStep = 1, minValue = 0, maxValue = 1000) - public int twinclawsDelay = 0; - - @Expose - @ConfigOption(name = "Draw Line", desc = "Draw a line starting at your crosshair to the boss head.") - @ConfigEditorBoolean - @FeatureToggle - public boolean drawLine = false; - - @Expose - @ConfigOption(name = "Line Color", desc = "Color of the line.") - @ConfigEditorColour - public String lineColor = "0:255:255:0:88"; - - @Expose - @ConfigOption(name = "Line Width", desc = "Width of the line.") - @ConfigEditorSlider(minStep = 1, minValue = 1, maxValue = 10) - public int lineWidth = 1; - - - @Expose - @ConfigOption(name = "Blood Ichor", desc = "") - @Accordion - public BloodIchorConfig bloodIchor = new BloodIchorConfig(); - - public static class BloodIchorConfig { - @Expose - @ConfigOption(name = "Highlight Blood Ichor", desc = "Highlight the Blood Ichor.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlight = false; - - @Expose - @ConfigOption(name = "Beacon Beam", desc = "Render a beacon beam where the Blood Ichor is.") - @ConfigEditorBoolean - @FeatureToggle - public boolean renderBeam = true; - - @Expose - @ConfigOption(name = "Color", desc = "Highlight color.") - @ConfigEditorColour - public String color = "0:199:100:0:88"; - - @Expose - @ConfigOption(name = "Show Lines", desc = "Draw lines that start from the head of the boss and end on the Blood Ichor.") - @ConfigEditorBoolean - @FeatureToggle - public boolean showLines = false; - - @Expose - @ConfigOption(name = "Lines Start Color", desc = "Starting color of the lines.") - @ConfigEditorColour - public String linesColor = "0:255:255:13:0"; - - } - - @Expose - @ConfigOption(name = "Killer Spring", desc = "") - @Accordion - public KillerSpringConfig killerSpring = new KillerSpringConfig(); - - public static class KillerSpringConfig { - @Expose - @ConfigOption(name = "Highlight Killer Spring", desc = "Highlight the Killer Spring tower.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlight = false; - - @Expose - @ConfigOption(name = "Color", desc = "Highlight color.") - @ConfigEditorColour - public String color = "0:199:100:0:88"; - - @Expose - @ConfigOption(name = "Show Lines", desc = "Draw lines that start from the head of the boss and end on the Killer Spring tower.") - @ConfigEditorBoolean - @FeatureToggle - public boolean showLines = false; - - @Expose - @ConfigOption(name = "Lines Start Color", desc = "Starting color of the lines.") - @ConfigEditorColour - public String linesColor = "0:255:255:13:0"; - } - } - - @Expose - @ConfigOption(name = "Item Profit Tracker", desc = "") - @Accordion - public ItemProfitTrackerConfig itemProfitTracker = new ItemProfitTrackerConfig(); - - public static class ItemProfitTrackerConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Count all items you pick up while doing slayer, " + - "keep track of how much you pay for starting slayers and calculating the overall profit.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - public Position pos = new Position(20, 20, false, true); - - @Expose - @ConfigOption(name = "Price in Chat", desc = "Show an extra chat message when you pick up an item. " + - "(This contains name, amount and price)") - @ConfigEditorBoolean - @FeatureToggle - public boolean priceInChat = false; - - @Expose - @ConfigOption(name = "Show Price From", desc = "Show price from Bazaar or NPC.") - @ConfigEditorDropdown(values = {"Instant Sell", "Sell Offer", "NPC"}) - public int priceFrom = 1; - - @Expose - @ConfigOption(name = "Minimum Price", desc = "Items below this price will not show up in chat.") - @ConfigEditorSlider(minValue = 1, maxValue = 5_000_000, minStep = 1) - public int minimumPrice = 100_000; - - @Expose - @ConfigOption(name = "Title Warning", desc = "Show a title for expensive item pickups.") - @ConfigEditorBoolean - @FeatureToggle - public boolean titleWarning = false; - - @Expose - @ConfigOption(name = "Title Price", desc = "Items above this price will show up as a title.") - @ConfigEditorSlider(minValue = 1, maxValue = 20_000_000, minStep = 1) - public int minimumPriceWarning = 500_000; - } - - @Expose - @ConfigOption(name = "Items on Ground", desc = "") - @Accordion - public ItemsOnGroundConfig itemsOnGround = new ItemsOnGroundConfig(); - - public static class ItemsOnGroundConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Show the name and price of items laying on the ground. §cOnly in slayer areas!") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Minimum Price", desc = "Items below this price will be ignored.") - @ConfigEditorSlider(minValue = 1, maxValue = 1_000_000, minStep = 1) - public int minimumPrice = 50_000; - } - - @Expose - @ConfigOption(name = "RNG Meter Display", desc = "") - @Accordion - public RngMeterDisplayConfig rngMeterDisplay = new RngMeterDisplayConfig(); - - public static class RngMeterDisplayConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Display amount of bosses needed until next RNG meter drop.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = true; - - @Expose - @ConfigOption(name = "Warn Empty", desc = "Warn when no item is set in the RNG Meter.") - @ConfigEditorBoolean - public boolean warnEmpty = false; - - @Expose - @ConfigOption(name = "Hide Chat", desc = "Hide the RNG meter message from chat if current item is selected.") - @ConfigEditorBoolean - public boolean hideChat = true; - - @Expose - public Position pos = new Position(410, 110, false, true); - - } - - @Expose - @ConfigOption(name = "Boss Spawn Warning", desc = "") - @Accordion - public SlayerBossWarningConfig slayerBossWarning = new SlayerBossWarningConfig(); - - public static class SlayerBossWarningConfig { - - @Expose - @ConfigOption(name = "Enabled", desc = "Send a title when your boss is about to spawn.") - @ConfigEditorBoolean - @FeatureToggle - public boolean enabled = false; - - @Expose - @ConfigOption(name = "Percent", desc = "The percentage at which the title and sound should be sent.") - @ConfigEditorSlider(minStep = 1, minValue = 50, maxValue = 90) - public int percent = 80; - - @Expose - @ConfigOption(name = "Repeat", desc = "Resend the title and sound on every kill after reaching the configured percent value.") - @ConfigEditorBoolean - public boolean repeat = false; - } - - @Expose - @ConfigOption(name = "Miniboss Highlight", desc = "Highlight Slayer Mini-Boss in blue color.") - @ConfigEditorBoolean - @FeatureToggle - public boolean slayerMinibossHighlight = false; - - @Expose - @ConfigOption(name = "Line to Miniboss", desc = "Adds a line to every Slayer Mini-Boss around you.") - @ConfigEditorBoolean - @FeatureToggle - public boolean slayerMinibossLine = false; - - @Expose - @ConfigOption(name = "Hide Mob Names", desc = "Hide the name of the mobs you need to kill in order for the Slayer boss to spawn. Exclude mobs that are damaged, corrupted, runic or semi rare.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hideMobNames = false; - - @Expose - @ConfigOption(name = "Quest Warning", desc = "Warning when wrong Slayer quest is selected, or killing mobs for the wrong Slayer.") - @ConfigEditorBoolean - @FeatureToggle - public boolean questWarning = true; - - @Expose - @ConfigOption(name = "Quest Warning Title", desc = "Sends a title when warning.") - @ConfigEditorBoolean - @FeatureToggle - public boolean questWarningTitle = true; -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/bazaar/BazaarConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/bazaar/BazaarConfig.java new file mode 100644 index 000000000..515255e4b --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/bazaar/BazaarConfig.java @@ -0,0 +1,43 @@ +package at.hannibal2.skyhanni.config.features.bazaar; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class BazaarConfig { + + @Expose + @ConfigOption(name = "Purchase Helper", desc = "Highlights the item you are trying to buy in the Bazaar.") + @ConfigEditorBoolean + @FeatureToggle + public boolean purchaseHelper = true; + + @Expose + @ConfigOption(name = "Order Helper", desc = "Show visual hints inside the Bazaar Manage Order view when items are ready to pickup or outbid.") + @ConfigEditorBoolean + @FeatureToggle + public boolean orderHelper = false; + + @Expose + @ConfigOption(name = "Best Sell Method", desc = "Show the price difference between sell instantly and sell offer.") + @ConfigEditorBoolean + @FeatureToggle + public boolean bestSellMethod = false; + + @Expose + public Position bestSellMethodPos = new Position(394, 142, false, true); + + @Expose + @ConfigOption(name = "Cancelled Buy Order Clipboard", desc = "Saves missing items from cancelled buy orders to clipboard for faster re-entry.") + @ConfigEditorBoolean + @FeatureToggle + public boolean cancelledBuyOrderClipboard = false; + + @Expose + @ConfigOption(name = "Price Website", desc = "Adds a button to the Bazaar product inventory that will open the item page in §cskyblock.bz§7.") + @ConfigEditorBoolean + @FeatureToggle + public boolean openPriceWebsite = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/chat/ChatConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/chat/ChatConfig.java new file mode 100644 index 000000000..09df4f5e7 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/chat/ChatConfig.java @@ -0,0 +1,91 @@ +package at.hannibal2.skyhanni.config.features.chat; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import org.lwjgl.input.Keyboard; + +public class ChatConfig { + + @Expose + @ConfigOption(name = "Peek Chat", desc = "Hold this key to keep the chat open.") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_Z) + public int peekChat = Keyboard.KEY_Z; + + @Expose + @ConfigOption(name = "Chat Filter Types", desc = "") + @Accordion + public FilterTypesConfig filterType = new FilterTypesConfig(); + + + @Expose + @ConfigOption(name = "Player Messages", desc = "") + @Accordion + public PlayerMessagesConfig playerMessage = new PlayerMessagesConfig(); + + @Expose + @ConfigOption(name = "Player Chat Symbols", desc = "") + @Accordion + public ChatSymbols chatSymbols = new ChatSymbols(); + + @Expose + @ConfigOption(name = "Dungeon Filter", desc = "Hide annoying messages in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean dungeonMessages = true; + + @Expose + @ConfigOption(name = "Dungeon Boss Messages", desc = "Hide messages from the Watcher and bosses in the Dungeon.") + @ConfigEditorBoolean + @FeatureToggle + public boolean dungeonBossMessages = false; + + @Expose + @ConfigOption(name = "Hide Far Deaths", desc = "Hide other players' death messages, " + + "except for players who are nearby or during Dungeons/a Kuudra fight.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideFarDeathMessages = false; + //TODO jawbus + thunder + + @Expose + @ConfigOption(name = "Compact Potion Messages", desc = "") + @Accordion + public CompactPotionConfig compactPotionMessages = new CompactPotionConfig(); + + @Expose + @ConfigOption(name = "Compact Bestiary Message", desc = "Shorten the Bestiary level up message, showing additional information when hovering.") + @ConfigEditorBoolean + @FeatureToggle + public boolean compactBestiaryMessage = true; + + @Expose + @ConfigOption(name = "Arachne Hider", desc = "Hide chat messages about the Arachne Fight while outside of §eArachne's Sanctuary§7.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideArachneMessages = false; + + @Expose + @ConfigOption( + name = "Sacks Hider", + desc = "Hide the chat's sack change message with this, " + + "not in Hypixel settings, for mods to access sack data in new features." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean hideSacksChange = false; + + @Expose + @ConfigOption( + name = "Translator", + desc = "Click on a message to translate it into English. " + + "Use §e/shcopytranslation§7 to get the translation from English. " + + "§cTranslation is not guaranteed to be 100% accurate." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean translator = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/chat/ChatSymbols.java b/src/main/java/at/hannibal2/skyhanni/config/features/chat/ChatSymbols.java new file mode 100644 index 000000000..c8ea29aee --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/chat/ChatSymbols.java @@ -0,0 +1,24 @@ +package at.hannibal2.skyhanni.config.features.chat; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class ChatSymbols { + + @Expose + @ConfigOption(name = "Enabled", desc = "Adds extra symbols to the chat such as those from ironman, " + + "stranded, bingo or nether factions and places them next to your regular player emblems. " + + "§cDoes not work with hide rank hider!") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Chat Symbol Location", desc = "Determines where the symbols should go in chat in relation to the " + + "player's name. Hidden will hide all emblems from the chat. §eRequires above setting to be on to hide the symbols.") + @ConfigEditorDropdown(values = {"Left", "Right", "Hidden"}) + public int symbolLocation = 0; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/chat/CompactPotionConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/chat/CompactPotionConfig.java new file mode 100644 index 000000000..c06244b90 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/chat/CompactPotionConfig.java @@ -0,0 +1,20 @@ +package at.hannibal2.skyhanni.config.features.chat; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class CompactPotionConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Shorten chat messages about player potion effects.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Clickable Chat Message", desc = "Makes the Compact Potion message open the Potion effects menu on click.") + @ConfigEditorBoolean + public boolean clickableChatMessage = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java new file mode 100644 index 000000000..42cca5b59 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java @@ -0,0 +1,83 @@ +package at.hannibal2.skyhanni.config.features.chat; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class FilterTypesConfig { + + @Expose + @ConfigOption(name = "Hypixel Hub", desc = "Block messages outside SkyBlock in the Hypixel lobby: player joins, loot boxes, prototype lobby messages, radiating generosity and Hypixel tournaments.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hypixelHub = true; + + @Expose + @ConfigOption(name = "Empty", desc = "Hide all the empty messages from the chat.") + @ConfigEditorBoolean + @FeatureToggle + public boolean empty = true; + + @Expose + @ConfigOption(name = "Warping", desc = "Block 'Sending request to join...' and 'Warping...' messages.") + @ConfigEditorBoolean + @FeatureToggle + public boolean warping = true; + + @Expose + @ConfigOption(name = "Welcome", desc = "Hide the 'Welcome to SkyBlock' message.") + @ConfigEditorBoolean + @FeatureToggle + public boolean welcome = true; + + @Expose + @ConfigOption(name = "Guild Exp", desc = "Hide Guild EXP messages.") + @ConfigEditorBoolean + @FeatureToggle + public boolean guildExp = true; + + @Expose + @ConfigOption(name = "Friend Join Left", desc = "Hide friend join/left messages.") + @ConfigEditorBoolean + @FeatureToggle + public boolean friendJoinLeft = false; + + @Expose + @ConfigOption(name = "Winter Gifts", desc = "Hide useless Winter Gift messages.") + @ConfigEditorBoolean + @FeatureToggle + public boolean winterGift = false; + + @Expose + @ConfigOption(name = "Powder Mining", desc = "Hide messages while opening chests in the Crystal Hollows. " + + "(Except powder numbers over 1k, essence numbers over 2, Prehistoric Eggs, and Automaton Parts)") + @ConfigEditorBoolean + @FeatureToggle + public boolean powderMining = true; + + @Expose + @ConfigOption(name = "Kill Combo", desc = "Hide messages about the current Kill Combo from the Grandma Wolf Pet.") + @ConfigEditorBoolean + @FeatureToggle + public boolean killCombo = false; + + @Expose + @ConfigOption(name = "Watchdog", desc = "Hide the message where Hypixel is flexing how many players they have banned over the last week.") + @ConfigEditorBoolean + @FeatureToggle + public boolean watchDog = true; + + @Expose + @ConfigOption(name = "Profile Join", desc = "Hide 'You are playing on profile' and 'Profile ID' chat messages.") + @ConfigEditorBoolean + @FeatureToggle + public boolean profileJoin = true; + + //TODO remove + @Expose + @ConfigOption(name = "Others", desc = "Hide other annoying messages.") + @ConfigEditorBoolean + @FeatureToggle + public boolean others = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/chat/PlayerMessagesConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/chat/PlayerMessagesConfig.java new file mode 100644 index 000000000..93c22adab --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/chat/PlayerMessagesConfig.java @@ -0,0 +1,21 @@ +package at.hannibal2.skyhanni.config.features.chat; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class PlayerMessagesConfig { + + @Expose + @ConfigOption(name = "Player Rank Hider", desc = "Hide player ranks in all chat messages.") + @ConfigEditorBoolean + @FeatureToggle + public boolean playerRankHider = false; + + @Expose + @ConfigOption(name = "Chat Filter", desc = "Scan messages sent by players for blacklisted words and gray out the message if any are found.") + @ConfigEditorBoolean + @FeatureToggle + public boolean chatFilter = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/chroma/ChromaConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/chroma/ChromaConfig.java new file mode 100644 index 000000000..81e3b26df --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/chroma/ChromaConfig.java @@ -0,0 +1,62 @@ +package at.hannibal2.skyhanni.config.features.chroma; + +import at.hannibal2.skyhanni.SkyHanniMod; +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorButton; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigEditorInfoText; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class ChromaConfig { + + @Expose + @ConfigOption(name = "Chroma Preview", desc = "§fPlease star the mod on GitHub!") + @ConfigEditorInfoText(infoTitle = "Only In SkyBlock") + public boolean chromaPreview = false; + + @Expose + @ConfigOption(name = "Enabled", desc = "Toggle for SkyHanni's chroma. (Disables Patcher's Optimized Font Renderer while enabled)") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Chroma Size", desc = "Change the size of each color in the chroma.") + @ConfigEditorSlider(minValue = 1f, maxValue = 100f, minStep = 1f) + public float chromaSize = 30f; + + @Expose + @ConfigOption(name = "Chroma Speed", desc = "Change how fast the chroma animation moves.") + @ConfigEditorSlider(minValue = 0.5f, maxValue = 20f, minStep = 0.5f) + public float chromaSpeed = 6f; + + @Expose + @ConfigOption(name = "Chroma Saturation", desc = "Change the saturation of the chroma.") + @ConfigEditorSlider(minValue = 0f, maxValue = 1f, minStep = 0.01f) + public float chromaSaturation = 0.75f; + + @Expose + @ConfigOption(name = "Chroma Direction", desc = "Change the slant and direction of the chroma.") + @ConfigEditorDropdown(values = {"Forward + Right", "Forward + Left", "Backward + Right", "Backward + Left"}) + public int chromaDirection = 0; + + @ConfigOption(name = "Reset to Default", desc = "Resets all chroma settings to the default.") + @ConfigEditorButton(buttonText = "Reset") + public Runnable resetSettings = this::resetChromaSettings; + + @Expose + @ConfigOption(name = "Everything Chroma", desc = "Renders §4§l§oALL §r§7text in chroma. (Some enchants may appear white with SBA enchant parsing)") + @ConfigEditorBoolean + public boolean allChroma = false; + + private void resetChromaSettings() { + SkyHanniMod.getFeature().chroma.chromaSize = 30f; + SkyHanniMod.getFeature().chroma.chromaSpeed = 6f; + SkyHanniMod.getFeature().chroma.chromaSaturation = 0.75f; + SkyHanniMod.getFeature().chroma.allChroma = false; + SkyHanniMod.getFeature().chroma.chromaDirection = 0; + } +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/BestiaryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/BestiaryConfig.java new file mode 100644 index 000000000..97c41da3d --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/BestiaryConfig.java @@ -0,0 +1,48 @@ +package at.hannibal2.skyhanni.config.features.combat; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class BestiaryConfig { + @Expose + @ConfigOption(name = "Enable", desc = "Show Bestiary Data overlay in the Bestiary menu.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Number format", desc = "Short: 1.1k\nLong: 1.100") + @ConfigEditorDropdown(values = {"Short", "Long"}) + public int numberFormat = 0; + + @Expose + @ConfigOption(name = "Display type", desc = "Choose what the display should show") + @ConfigEditorDropdown(values = { + "Global to max", + "Global to next tier", + "Lowest total kills", + "Highest total kills", + "Lowest kills needed to max", + "Highest kills needed to max", + "Lowest kills needed to next tier", + "Highest kills needed to next tier" + }) + public int displayType = 0; + + @Expose + @ConfigOption(name = "Hide maxed", desc = "Hide maxed mobs.") + @ConfigEditorBoolean + public boolean hideMaxed = false; + + @Expose + @ConfigOption(name = "Replace Romans", desc = "Replace Roman numerals (IX) with regular numbers (9)") + @ConfigEditorBoolean + public boolean replaceRoman = false; + + @Expose + public Position position = new Position(100, 100, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/CombatConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/CombatConfig.java new file mode 100644 index 000000000..94780f9dd --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/CombatConfig.java @@ -0,0 +1,47 @@ +package at.hannibal2.skyhanni.config.features.combat; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.features.combat.damageindicator.DamageIndicatorConfig; +import at.hannibal2.skyhanni.config.features.combat.ghostcounter.GhostCounterConfig; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.Category; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class CombatConfig { + + @Expose + @Category(name = "Damage Indicator", desc = "Damage Indicator settings") + public DamageIndicatorConfig damageIndicator = new DamageIndicatorConfig(); + + @Expose + @Category(name = "Ghost Counter", desc = "Ghost counter settings") + public GhostCounterConfig ghostCounter = new GhostCounterConfig(); + + @Expose + @ConfigOption(name = "Summonings", desc = "") + @Accordion + public SummoningsConfig summonings = new SummoningsConfig(); + + @Expose + @ConfigOption(name = "Mobs", desc = "") + @Accordion + public MobsConfig mobs = new MobsConfig(); + + @Expose + @ConfigOption(name = "Bestiary", desc = "") + @Accordion + public BestiaryConfig bestiary = new BestiaryConfig(); + + @Expose + @ConfigOption(name = "Ender Node Tracker", desc = "") + @Accordion + public EnderNodeConfig enderNodeTracker = new EnderNodeConfig(); + + @Expose + @ConfigOption(name = "Hide Damage Splash", desc = "Hide all damage splashes anywhere in SkyBlock.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideDamageSplash = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/EnderNodeConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/EnderNodeConfig.java new file mode 100644 index 000000000..0fd962084 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/EnderNodeConfig.java @@ -0,0 +1,64 @@ +package at.hannibal2.skyhanni.config.features.combat; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import io.github.moulberry.moulconfig.observer.Property; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class EnderNodeConfig { + @Expose + @ConfigOption( + name = "Enabled", + desc = "Tracks all of your drops from mining Ender Nodes in the End.\n" + + "Also tracks drops from Endermen." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption( + name = "Text Format", + desc = "Drag text to change the appearance of the overlay." + ) + @ConfigEditorDraggableList( + exampleText = { + "§5§lEnder Node Tracker", + "§d1,303 Ender Nodes Mined", + "§615.3M Coins Made", + " ", + "§b123 §cEndermite Nest", + "§b832 §aEnchanted End Stone", + "§b230 §aEnchanted Obsidian", + "§b1630 §aEnchanted Ender Pearl", + "§b85 §aGrand Experience Bottle", + "§b4 §9Titanic Experience Bottle", + "§b15 §9End Stone Shulker", + "§b53 §9End Stone Geode", + "§b10 §d◆ Magical Rune I", + "§b24 §5Ender Gauntlet", + "§b357 §5Mite Gel", + "§b2 §cShrimp The Fish", + " ", + "§b200 §5Ender Armor", + "§b24 §5Ender Helmet", + "§b24 §5Ender Chestplate", + "§b24 §5Ender Leggings", + "§b24 §5Ender Boots", + "§b24 §5Ender Necklace", + "§f10§7-§a8§7-§93§7-§52§7-§61 §fEnderman Pet", + " " + } + ) + public Property> textFormat = Property.of(new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 14, 15, 16, 17, 23))); + + @Expose + public Position position = new Position(10, 80, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/MobsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/MobsConfig.java new file mode 100644 index 000000000..77731d854 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/MobsConfig.java @@ -0,0 +1,94 @@ +package at.hannibal2.skyhanni.config.features.combat; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class MobsConfig { + + @Expose + @ConfigOption(name = "Highlighters", desc = "") + public boolean highlighters = false; + + @Expose + @ConfigOption(name = "Area Boss", desc = "Highlight Golden Ghoul, Old Wolf, Voidling Extremist and Millenia-Aged Blaze.") + @ConfigEditorBoolean + @FeatureToggle + public boolean areaBossHighlight = true; + + @Expose + @ConfigOption(name = "Arachne Keeper", desc = "Highlight the Arachne Keeper in the Spider's Den in purple color.") + @ConfigEditorBoolean + @FeatureToggle + public boolean arachneKeeperHighlight = true; + + @Expose + @ConfigOption(name = "Corleone", desc = "Highlight Boss Corleone in the Crystal Hollows.") + @ConfigEditorBoolean + @FeatureToggle + public boolean corleoneHighlighter = true; + + @Expose + @ConfigOption(name = "Zealot", desc = "Highlight Zealots and Bruisers in The End.") + @ConfigEditorBoolean + @FeatureToggle + public boolean zealotBruiserHighlighter = false; + + @Expose + @ConfigOption( + name = "Special Zealots", + desc = "Highlight Special Zealots (the ones that drop Summoning Eyes) in the End." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean specialZealotHighlighter = true; + + @Expose + @ConfigOption(name = "Corrupted Mob", desc = "Highlight corrupted mobs in purple color.") + @ConfigEditorBoolean + @FeatureToggle + public boolean corruptedMobHighlight = false; + + @Expose + @ConfigOption(name = "Arachne Boss", desc = "Highlight the Arachne boss in red and mini-bosses in orange.") + @ConfigEditorBoolean + @FeatureToggle + public boolean arachneBossHighlighter = true; + + @Expose + @ConfigOption(name = "Respawn Timers", desc = "") + public boolean timers = false; + + @Expose + @ConfigOption( + name = "Area Boss", + desc = "Show a timer when Golden Ghoul, Old Wolf, Voidling Extremist or Millenia-Aged Blaze respawns. " + + "§cSometimes it takes 20-30 seconds to calibrate correctly." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean areaBossRespawnTimer = false; + + @Expose + @ConfigOption( + name = "Arachne Spawn Timer", + desc = "Show a timer when Arachne fragments or crystals are placed to indicate how long " + + "until the boss will spawn. §cTimer may be 1-2 seconds off." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean showArachneSpawnTimer = true; + + @Expose + @ConfigOption(name = "Enderman TP Hider", desc = "Stops the Enderman Teleportation animation.") + @ConfigEditorBoolean + @FeatureToggle + public boolean endermanTeleportationHider = true; + + @Expose + @ConfigOption(name = "Arachne Minis Hider", desc = "Hides the nametag above Arachne minis.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideNameTagArachneMinis = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/SummoningsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/SummoningsConfig.java new file mode 100644 index 000000000..9abe2bf8d --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/SummoningsConfig.java @@ -0,0 +1,38 @@ +package at.hannibal2.skyhanni.config.features.combat; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class SummoningsConfig { + + @Expose + @ConfigOption(name = "Summoning Soul Display", desc = "Show the name of dropped Summoning Souls laying on the ground. " + + "§cNot working in Dungeons if Skytils' 'Hide Non-Starred Mobs Nametags' feature is enabled!") + @ConfigEditorBoolean + @FeatureToggle + public boolean summoningSoulDisplay = false; + + @Expose + @ConfigOption(name = "Summoning Mob Display", desc = "Show the health of your spawned summons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean summoningMobDisplay = false; + + @Expose + public Position summoningMobDisplayPos = new Position(10, 10, false, true); + + @Expose + @ConfigOption(name = "Summoning Mob Nametag", desc = "Hide the nametag of your spawned summons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean summoningMobHideNametag = false; + + @Expose + @ConfigOption(name = "Summoning Mob Color", desc = "Marks own summons green.") + @ConfigEditorBoolean + @FeatureToggle + public boolean summoningMobColored = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/damageindicator/DamageIndicatorConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/damageindicator/DamageIndicatorConfig.java new file mode 100644 index 000000000..c77e5f3f0 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/damageindicator/DamageIndicatorConfig.java @@ -0,0 +1,102 @@ +package at.hannibal2.skyhanni.config.features.combat.damageindicator; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class DamageIndicatorConfig { + + @Expose + @ConfigOption(name = "Damage Indicator Enabled", desc = "Show the boss' remaining health.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Healing Chat Message", desc = "Sends a chat message when a boss heals themself.") + @ConfigEditorBoolean + public boolean healingMessage = false; + + @Expose + @ConfigOption( + name = "Boss Name", + desc = "Change how the boss name should be displayed.") + @ConfigEditorDropdown(values = {"Hidden", "Full Name", "Short Name"}) + public int bossName = 1; + + @Expose + @ConfigOption( + name = "Select Boss", + desc = "Change what type of boss you want the damage indicator be enabled for." + ) + @ConfigEditorDraggableList( + exampleText = { + "§bDungeon All", + "§bNether Mini Bosses", + "§bVanquisher", + "§bEndstone Protector (not tested)", + "§bEnder Dragon (not finished)", + "§bRevenant Horror", + "§bTarantula Broodfather", + "§bSven Packmaster", + "§bVoidgloom Seraph", + "§bInferno Demonlord", + "§bHeadless Horseman (bugged)", + "§bDungeon Floor 1", + "§bDungeon Floor 2", + "§bDungeon Floor 3", + "§bDungeon Floor 4", + "§bDungeon Floor 5", + "§bDungeon Floor 6", + "§bDungeon Floor 7", + "§bDiana Mobs", + "§bSea Creatures", + "Dummy", + "§bArachne", + "§bThe Rift Bosses", + "§bRiftstalker Bloodfiend", + "§6Reindrake" + } + ) + //TODO only show currently working and tested features + public List bossesToShow = new ArrayList<>(Arrays.asList(0, 1, 2, 5, 6, 7, 8, 9, 18, 19, 21, 22, 23, 24)); + + @Expose + @ConfigOption(name = "Hide Damage Splash", desc = "Hiding damage splashes near the damage indicator.") + @ConfigEditorBoolean + public boolean hideDamageSplash = false; + + @Expose + @ConfigOption(name = "Damage Over Time", desc = "Show damage and health over time below the damage indicator.") + @ConfigEditorBoolean + public boolean showDamageOverTime = false; + + @Expose + @ConfigOption(name = "Hide Nametag", desc = "Hide the vanilla nametag of damage indicator bosses.") + @ConfigEditorBoolean + public boolean hideVanillaNametag = false; + + @Expose + @ConfigOption(name = "Time to Kill", desc = "Show the time it takes to kill the slayer boss.") + @ConfigEditorBoolean + public boolean timeToKillSlayer = true; + + + @Expose + @ConfigOption(name = "Ender Slayer", desc = "") + @Accordion + public EnderSlayerConfig enderSlayer = new EnderSlayerConfig(); + + @Expose + @ConfigOption(name = "Vampire Slayer", desc = "") + @Accordion + public VampireSlayerConfig vampireSlayer = new VampireSlayerConfig(); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/damageindicator/EnderSlayerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/damageindicator/EnderSlayerConfig.java new file mode 100644 index 000000000..392505686 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/damageindicator/EnderSlayerConfig.java @@ -0,0 +1,18 @@ +package at.hannibal2.skyhanni.config.features.combat.damageindicator; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class EnderSlayerConfig { + + @Expose + @ConfigOption(name = "Laser Phase Timer", desc = "Show a timer when the laser phase will end.") + @ConfigEditorBoolean + public boolean laserPhaseTimer = false; + + @Expose + @ConfigOption(name = "Health During Laser", desc = "Show the health of Voidgloom Seraph 4 during the laser phase.") + @ConfigEditorBoolean + public boolean showHealthDuringLaser = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/damageindicator/VampireSlayerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/damageindicator/VampireSlayerConfig.java new file mode 100644 index 000000000..ec1d07b92 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/damageindicator/VampireSlayerConfig.java @@ -0,0 +1,23 @@ +package at.hannibal2.skyhanni.config.features.combat.damageindicator; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class VampireSlayerConfig { + + @Expose + @ConfigOption(name = "HP Until Steak", desc = "Show the amount of HP missing until the Steak can be used on the Vampire Slayer on top of the boss.") + @ConfigEditorBoolean + public boolean hpTillSteak = false; + + @Expose + @ConfigOption(name = "Mania Circles", desc = "Show a timer until the boss leaves the invincible Mania Circles state.") + @ConfigEditorBoolean + public boolean maniaCircles = false; + + @Expose + @ConfigOption(name = "Percentage HP", desc = "Show the percentage of HP next to the HP.") + @ConfigEditorBoolean + public boolean percentage = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/GhostCounterConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/GhostCounterConfig.java new file mode 100644 index 000000000..783c4cda5 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/GhostCounterConfig.java @@ -0,0 +1,96 @@ +package at.hannibal2.skyhanni.config.features.combat.ghostcounter; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import at.hannibal2.skyhanni.config.features.combat.ghostcounter.textformatting.TextFormattingConfig; +import at.hannibal2.skyhanni.features.combat.ghostcounter.GhostUtil; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorButton; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class GhostCounterConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Enable the ghost counter (invisible creepers in the Dwarven Mines The Mist area).") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption( + name = "Display Text", + desc = "Drag text to change the appearance of the overlay." + ) + @ConfigEditorDraggableList( + exampleText = { + "§6Ghosts Counter", + " §bGhost Killed: 42", + " §bSorrow: 6", + " §bGhost since Sorrow: 1", + " §bGhosts/Sorrow: 5", + " §bVolta: 6", + " §bPlasma: 8", + " §bGhostly Boots: 1", + " §bBag Of Cash: 4", + " §bAvg Magic Find: 271", + " §bScavenger Coins: 15,000", + " §bKill Combo: 14", + " §bHighest Kill Combo: 96", + " §bSkill XP Gained: 145,648", + " §bBestiary 1: 0/10", + " §bXP/h: 810,410", + " §bKills/h: 420", + " §bETA: 14d", + " §bMoney/h: 13,420,069", + " §bMoney made: 14B" + } + ) + public List ghostDisplayText = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 9, 10, 11, 12)); + + @ConfigOption(name = "Text Formatting", desc = "") + @Accordion + @Expose + public TextFormattingConfig textFormatting = new TextFormattingConfig(); + + @Expose + @ConfigOption(name = "Extra space", desc = "Space between each line of text.") + @ConfigEditorSlider( + minValue = -5, + maxValue = 10, + minStep = 1) + public int extraSpace = 1; + + @Expose + @ConfigOption(name = "Pause Timer", desc = "How many seconds does it wait before pausing.") + @ConfigEditorSlider( + minValue = 1, + maxValue = 20, + minStep = 1 + ) + public int pauseTimer = 3; + + @Expose + @ConfigOption(name = "Show only in The Mist", desc = "Show the overlay only when you are in The Mist.") + @ConfigEditorBoolean + public boolean onlyOnMist = true; + + @Expose + @ConfigOption(name = "Maxed Bestiary", desc = "Show progress to max bestiary instead of next level.") + @ConfigEditorBoolean + public boolean showMax = false; + + @ConfigOption(name = "Reset", desc = "Reset the counter.") + @ConfigEditorButton(buttonText = "Reset") + public Runnable resetCounter = GhostUtil.INSTANCE::reset; + + @Expose + public Position position = new Position(50, 50, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/BestiaryFormattingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/BestiaryFormattingConfig.java new file mode 100644 index 000000000..c41b23fe1 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/BestiaryFormattingConfig.java @@ -0,0 +1,41 @@ +package at.hannibal2.skyhanni.config.features.combat.ghostcounter.textformatting; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorText; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class BestiaryFormattingConfig { + + @Expose + @ConfigOption(name = "Bestiary", desc = "Bestiary Progress line.\n§e%value% §7is replaced with\n" + + "Your current progress to next level.\n" + + "§e%currentLevel% &7is replaced with your current bestiary level\n" + + "§e%nextLevel% §7is replaced with your current bestiary level +1.\n" + + "§e%value% §7is replaced with one of the text below.") + @ConfigEditorText + public String base = " &6Bestiary %display%: &b%value%"; + + @Expose + @ConfigOption(name = "No Data", desc = "Text to show when you need to open the\nBestiary Menu to gather data.") + @ConfigEditorText + public String openMenu = "§cOpen Bestiary Menu !"; + + @Expose + @ConfigOption(name = "Maxed", desc = "Text to show when your bestiary for ghost is at max level.\n" + + "§e%currentKill% §7is replaced with your current total kill.") + @ConfigEditorText + public String maxed = "%currentKill% (&c&lMaxed!)"; + + @Expose + @ConfigOption(name = "Progress to Max", desc = "Text to show progress when the §eMaxed Bestiary §7option is §aON\n" + + "§e%currentKill% §7is replaced with your current total kill.") + @ConfigEditorText + public String showMax_progress = "%currentKill%/250k (%percentNumber%%)"; + + @Expose + @ConfigOption(name = "Progress", desc = "Text to show progress when the §eMaxed Bestiary§7 option is §cOFF\n" + + "§e%currentKill% §7is replaced with how many kill you have to the next level.\n" + + "§e%killNeeded% §7is replaced with how many kill you need to reach the next level.") + @ConfigEditorText + public String progress = "%currentKill%/%killNeeded%"; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/ETAFormattingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/ETAFormattingConfig.java new file mode 100644 index 000000000..146b56811 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/ETAFormattingConfig.java @@ -0,0 +1,42 @@ +package at.hannibal2.skyhanni.config.features.combat.ghostcounter.textformatting; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorText; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class ETAFormattingConfig { + @Expose + @ConfigOption(name = "ETA to next level", desc = "ETA To Next Level Line.\n" + + "§e%value% §7is replaced with one of the text below.") + @ConfigEditorText + public String base = " &6ETA: &b%value%"; + + @Expose + @ConfigOption(name = "Maxed!", desc = "So you really maxed ghost bestiary ?") + @ConfigEditorText + public String maxed = "&c&lMAXED!"; + + @Expose + @ConfigOption(name = "No Data", desc = "Start killing some ghosts !") + @ConfigEditorText + public String noData = "&bN/A"; + + @Expose + @ConfigOption(name = "Progress", desc = "Text to show progress to next level.") + @ConfigEditorText + public String progress = "&b%value%"; + + @Expose + @ConfigOption(name = "Paused", desc = "Text displayed next to the time \n" + + "when you are doing nothing for a given amount of seconds") + @ConfigEditorText + public String paused = "&c(PAUSED)"; + + @Expose + @ConfigOption(name = "Time", desc = "§e%days% §7is replaced with days remaining.\n" + + "§e%hours% §7is replaced with hours remaining.\n" + + "§e%minutes% §7is replaced with minutes remaining.\n" + + "§e%seconds% §7is replaced with seconds remaining.") + @ConfigEditorText + public String time = "&6%days%%hours%%minutes%%seconds%"; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/KillHourFormattingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/KillHourFormattingConfig.java new file mode 100644 index 000000000..41cf0dcdd --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/KillHourFormattingConfig.java @@ -0,0 +1,24 @@ +package at.hannibal2.skyhanni.config.features.combat.ghostcounter.textformatting; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorText; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class KillHourFormattingConfig { + @Expose + @ConfigOption(name = "Kill/h", desc = "Kill Per Hour line.\n§e%value% §7is replaced with\nEstimated kills per hour you get.") + @ConfigEditorText + public String base = " &6Kill/h: &b%value%"; + + @Expose + @ConfigOption(name = "No Data", desc = "Start killing some ghosts !") + @ConfigEditorText + public String noData = "&bN/A"; + + @Expose + @ConfigOption(name = "Paused", desc = "Text displayed next to the time \n" + + "when you are doing nothing for a given amount of seconds") + @ConfigEditorText + public String paused = "&c(PAUSED)"; +} + diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/TextFormattingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/TextFormattingConfig.java new file mode 100644 index 000000000..750b3ae2c --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/TextFormattingConfig.java @@ -0,0 +1,148 @@ +package at.hannibal2.skyhanni.config.features.combat.ghostcounter.textformatting; + +import at.hannibal2.skyhanni.features.combat.ghostcounter.GhostFormatting; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorButton; +import io.github.moulberry.moulconfig.annotations.ConfigEditorInfoText; +import io.github.moulberry.moulconfig.annotations.ConfigEditorText; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class TextFormattingConfig { + + @ConfigOption(name = "§eText Formatting Info", desc = "§e%session% §ris §e§lalways §rreplaced with\n" + + "§7the count for your current session.\n" + + "§7Reset when restarting the game.\n" + + "§7You can use §e&Z §7color code to use SBA chroma.") + @ConfigEditorInfoText + public boolean formatInfo = false; + + @ConfigOption(name = "Reset Formatting", desc = "Reset formatting to default text.") + @ConfigEditorButton(buttonText = "Reset") + public Runnable resetFormatting = GhostFormatting.INSTANCE::reset; + + @ConfigOption(name = "Export Formatting", desc = "Export current formatting to clipboard.") + @ConfigEditorButton(buttonText = "Export") + public Runnable exportFormatting = GhostFormatting.INSTANCE::export; + + @ConfigOption(name = "Import Formatting", desc = "Import formatting from clipboard.") + @ConfigEditorButton(buttonText = "Import") + public Runnable importFormatting = GhostFormatting.INSTANCE::importFormat; + + @Expose + @ConfigOption(name = "Title", desc = "Title Line.") + @ConfigEditorText + public String titleFormat = "&6Ghost Counter"; + + @Expose + @ConfigOption(name = "Ghost Killed", desc = "Ghost Killed line.\n§e%value% §ris replaced with\n" + + "Ghost Killed.\n" + + "§e%session% §7is replaced with Ghost killed") + @ConfigEditorText + public String ghostKilledFormat = " &6Ghost Killed: &b%value% &7(%session%)"; + + @Expose + @ConfigOption(name = "Sorrows", desc = "Sorrows drop line.\n" + + "§e%value% §7is replaced with\nsorrows dropped.") + @ConfigEditorText + public String sorrowsFormat = " &6Sorrow: &b%value% &7(%session%)"; + + @Expose + @ConfigOption(name = "Ghost Since Sorrow", desc = "Ghost Since Sorrow line.\n" + + "§e%value% §7is replaced with\nGhost since last sorrow drop.") + @ConfigEditorText + public String ghostSinceSorrowFormat = " &6Ghost since Sorrow: &b%value%"; + + @Expose + @ConfigOption(name = "Ghost Kill Per Sorrow", desc = "Ghost Kill Per Sorrow line.\n" + + "§e%value% §7is replaced with\naverage ghost kill per sorrow drop.") + @ConfigEditorText + public String ghostKillPerSorrowFormat = " &6Ghosts/Sorrow: &b%value%"; + + @Expose + @ConfigOption(name = "Voltas", desc = "Voltas drop line.\n" + + "§e%value% §7is replaced with\nvoltas dropped.") + @ConfigEditorText + public String voltasFormat = " &6Voltas: &b%value% &7(%session%)"; + + @Expose + @ConfigOption(name = "Plasmas", desc = "Plasmas drop line.\n" + + "§e%value% §7is replaced with\nplasmas dropped.") + @ConfigEditorText + public String plasmasFormat = " &6Plasmas: &b%value% &7(%session%)"; + + @Expose + @ConfigOption(name = "Ghostly Boots", desc = "Ghostly Boots drop line.\n" + + "§e%value% §7is replaced with\nGhostly Boots dropped.") + @ConfigEditorText + public String ghostlyBootsFormat = " &6Ghostly Boots: &b%value% &7(%session%)"; + + @Expose + @ConfigOption(name = "Bag Of Cash", desc = "Bag Of Cash drop line.\n" + + "§e%value% §7is replaced with\nBag Of Cash dropped.") + @ConfigEditorText + public String bagOfCashFormat = " &6Bag Of Cash: &b%value% &7(%session%)"; + + @Expose + @ConfigOption(name = "Average Magic Find", desc = "Average Magic Find line.\n" + + "§e%value% §7is replaced with\nAverage Magic Find.") + @ConfigEditorText + public String avgMagicFindFormat = " &6Avg Magic Find: &b%value%"; + + @Expose + @ConfigOption(name = "Scavenger Coins", desc = "Scavenger Coins line.\n" + + "§e%value% §7is replaced with\nCoins earned from kill ghosts.\nInclude: Scavenger Enchant, Scavenger Talismans, Kill Combo.") + @ConfigEditorText + public String scavengerCoinsFormat = " &6Scavenger Coins: &b%value% &7(%session%)"; + + @Expose + @ConfigOption(name = "Kill Combo", desc = "Kill Combo line.\n" + + "§e%value% §7is replaced with\nYour current kill combo.") + @ConfigEditorText + public String killComboFormat = " &6Kill Combo: &b%value%"; + + @Expose + @ConfigOption(name = "Highest Kill Combo", desc = "Highest Kill Combo line.\n" + + "§e%value% §7is replaced with\nYour current highest kill combo.") + @ConfigEditorText + public String highestKillComboFormat = " &6Highest Kill Combo: &b%value% &7(%session%)"; + + @Expose + @ConfigOption(name = "Skill XP Gained", desc = "Skill XP Gained line.\n" + + "§e%value% §7is replaced with\nSkill XP Gained from killing Ghosts.") + @ConfigEditorText + public String skillXPGainFormat = " &6Skill XP Gained: &b%value% &7(%session%)"; + + @ConfigOption(name = "Bestiary Formatting", desc = "") + @Accordion + @Expose + public BestiaryFormattingConfig bestiaryFormatting = new BestiaryFormattingConfig(); + + @ConfigOption(name = "XP Per Hour Formatting", desc = "") + @Accordion + @Expose + public XPHourFormattingConfig xpHourFormatting = new XPHourFormattingConfig(); + + @ConfigOption(name = "ETA Formatting", desc = "") + @Accordion + @Expose + public ETAFormattingConfig etaFormatting = new ETAFormattingConfig(); + + @ConfigOption(name = "Kill Per Hour Formatting", desc = "") + @Expose + @Accordion + public KillHourFormattingConfig killHourFormatting = new KillHourFormattingConfig(); + + @Expose + @ConfigOption(name = "Money Per Hour", desc = "Money Per Hour.\n§e%value% §7is replaced with\nEstimated money you get per hour\n" + + "Calculated with your kill per hour and your average magic find.") + @ConfigEditorText + public String moneyHourFormat = " &6$/h: &b%value%"; + + @Expose + @ConfigOption(name = "Money made", desc = "Calculate the money you made.\nInclude §eSorrow§7, §ePlasma§7, §eVolta§7, §e1M coins drop\n" + + "§eGhostly Boots§7, §eScavenger coins.\n" + + "§cUsing current Sell Offer value.") + @ConfigEditorText + public String moneyMadeFormat = " &6Money made: &b%value%"; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/XPHourFormattingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/XPHourFormattingConfig.java new file mode 100644 index 000000000..d04f4942a --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/ghostcounter/textformatting/XPHourFormattingConfig.java @@ -0,0 +1,26 @@ +package at.hannibal2.skyhanni.config.features.combat.ghostcounter.textformatting; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorText; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class XPHourFormattingConfig { + + @Expose + @ConfigOption(name = "XP/h", desc = "XP Per Hour line.\n" + + "§e%value% §7is replaced with one of the text below.") + @ConfigEditorText + public String base = " &6XP/h: &b%value%"; + + @Expose + @ConfigOption(name = "No Data", desc = "XP Per Hour line.\n§e%value% §7is replaced with\nEstimated amount of combat xp you gain per hour.") + @ConfigEditorText + public String noData = "&bN/A"; + + @Expose + @ConfigOption(name = "Paused", desc = "Text displayed next to the time \n" + + "when you are doing nothing for a given amount of seconds") + @ConfigEditorText + public String paused = "&c(PAUSED)"; +} + diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/commands/CommandsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/commands/CommandsConfig.java new file mode 100644 index 000000000..777d543a3 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/commands/CommandsConfig.java @@ -0,0 +1,39 @@ +package at.hannibal2.skyhanni.config.features.commands; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class CommandsConfig { + + @ConfigOption(name = "Tab Complete", desc = "") + @Accordion + @Expose + public TabCompleteConfig tabComplete = new TabCompleteConfig(); + + @ConfigOption(name = "Fandom Wiki for §e/wiki", desc = "") + @Accordion + @Expose + public FandomWikiCommandConfig fandomWiki = new FandomWikiCommandConfig(); + + @ConfigOption(name = "Party Commands", desc = "Shortens party commands and allows tab-completing for them. " + + "\n§eCommands: /pt /pp /pko /pk §7SkyBlock command §e/pt §7to check the play time still works.") + @Expose + @ConfigEditorBoolean + @FeatureToggle + public boolean shortCommands = true; + + @Expose + @ConfigOption(name = "Replace Warp Is", desc = "Adds §e/warp is §7alongside §e/is§7. Idk why. Ask §cKaeso") + @ConfigEditorBoolean + @FeatureToggle + public boolean replaceWarpIs = false; + + @Expose + @ConfigOption(name = "/viewrecipe Lower Case", desc = "Adds support for lower case item IDs to the Hypixel command §e/viewrecipe§7.") + @ConfigEditorBoolean + @FeatureToggle + public boolean viewRecipeLowerCase = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/commands/FandomWikiCommandConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/commands/FandomWikiCommandConfig.java new file mode 100644 index 000000000..c8a25a204 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/commands/FandomWikiCommandConfig.java @@ -0,0 +1,27 @@ +package at.hannibal2.skyhanni.config.features.commands; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import org.lwjgl.input.Keyboard; + +public class FandomWikiCommandConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Use Fandom Wiki (§ehypixel-skyblock.fandom.com§7) instead of the Hypixel wiki (§ewiki.hypixel.net§7) in most wiki-related chat messages.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Skip Chat", desc = "Directly opens the Fandom Wiki instead of sending the §e\"Click to search for this thing on the Fandom Wiki\"§7 message beforehand.") + @ConfigEditorBoolean + public boolean skipWikiChat = false; + + @Expose + @ConfigOption(name = "Fandom Wiki Key", desc = "Search for an item on Fandom Wiki with this keybind.\n§4For optimal experiences, do §lNOT§r §4bind this to a mouse button.") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int fandomWikiKeybind = Keyboard.KEY_NONE; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/commands/TabCompleteConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/commands/TabCompleteConfig.java new file mode 100644 index 000000000..6e3420a59 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/commands/TabCompleteConfig.java @@ -0,0 +1,61 @@ +package at.hannibal2.skyhanni.config.features.commands; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class TabCompleteConfig { + + @Expose + @ConfigOption(name = "Warps", desc = "Tab complete the warp-point names when typing §e/warp §7.") + @ConfigEditorBoolean + @FeatureToggle + public boolean warps = true; + + @Expose + @ConfigOption(name = "Island Players", desc = "Tab complete other players on the same island.") + public boolean islandPlayers = true; + + @Expose + @ConfigOption(name = "Friends", desc = "Tab complete friends from your friends list.") + @ConfigEditorBoolean + @FeatureToggle + public boolean friends = true; + + @Expose + @ConfigOption(name = "Only Best Friends", desc = "Only Tab Complete best friends.") + @ConfigEditorBoolean + @FeatureToggle + public boolean onlyBestFriends = false; + + @Expose + @ConfigOption(name = "Party", desc = "Tab complete Party Members.") + @ConfigEditorBoolean + @FeatureToggle + public boolean party = true; + + @Expose + @ConfigOption(name = "VIP Visits", desc = "Tab complete the visit to special users with cake souls on it.") + @ConfigEditorBoolean + @FeatureToggle + public boolean vipVisits = true; + + @Expose + @ConfigOption(name = "/gfs Sack", desc = "Tab complete §e/gfs §7sack items.") + @ConfigEditorBoolean + @FeatureToggle + public boolean gfsSack = true; + + @Expose + @ConfigOption(name = "Party Commands", desc = "Tab complete commonly used party commands.") + @ConfigEditorBoolean + @FeatureToggle + public boolean partyCommands = true; + + @Expose + @ConfigOption(name = "View Recipe", desc = "Tab complete item IDs in the the Hypixel command §e/viewrecipe§7. Only items with recipes are tab completed.") + @ConfigEditorBoolean + @FeatureToggle + public boolean viewrecipeItems = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/CrimsonIsleConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/CrimsonIsleConfig.java new file mode 100644 index 000000000..7dd530bc4 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/CrimsonIsleConfig.java @@ -0,0 +1,34 @@ +package at.hannibal2.skyhanni.config.features.crimsonisle; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.features.crimsonisle.ashfang.AshfangConfig; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.Category; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class CrimsonIsleConfig { + + @Category(name = "Ashfang", desc = "Ashfang settings") + @Expose + public AshfangConfig ashfang = new AshfangConfig(); + + @ConfigOption(name = "Reputation Helper", desc = "") + @Accordion + @Expose + public ReputationHelperConfig reputationHelper = new ReputationHelperConfig(); + + @Expose + @ConfigOption(name = "Quest Item Helper", desc = "When you open the fetch item quest in the town board, " + + "it shows a clickable chat message that will grab the items needed from the sacks.") + @ConfigEditorBoolean + @FeatureToggle + public boolean questItemHelper = false; + + @Expose + @ConfigOption(name = "Pablo NPC Helper", desc = "Similar to Quest Item Helper, shows a clickable message that grabs the flower needed from sacks.") + @ConfigEditorBoolean + @FeatureToggle + public boolean pabloHelper = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ReputationHelperConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ReputationHelperConfig.java new file mode 100644 index 000000000..cddce2228 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ReputationHelperConfig.java @@ -0,0 +1,38 @@ +package at.hannibal2.skyhanni.config.features.crimsonisle; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import org.lwjgl.input.Keyboard; + +public class ReputationHelperConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Enable features around Reputation features in the Crimson Isle.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Use Hotkey", desc = "Only show the Reputation Helper while pressing the hotkey.") + @ConfigEditorBoolean + public boolean useHotkey = false; + + @Expose + @ConfigOption(name = "Hotkey", desc = "Press this hotkey to show the Reputation Helper.") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int hotkey = Keyboard.KEY_NONE; + + + @Expose + public Position position = new Position(10, 10, false, true); + + @Expose + @ConfigOption(name = "Show Locations", desc = "Crimson Isles waypoints for locations to get reputation.") + @ConfigEditorDropdown(values = {"Always", "Only With Hotkey", "Never"}) + public int showLocation = 1; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ashfang/AshfangConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ashfang/AshfangConfig.java new file mode 100644 index 000000000..6e983e440 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ashfang/AshfangConfig.java @@ -0,0 +1,50 @@ +package at.hannibal2.skyhanni.config.features.crimsonisle.ashfang; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class AshfangConfig { + + @ConfigOption(name = "Gravity Orbs", desc = "") + @Accordion + @Expose + public GravityOrbsConfig gravityOrbs = new GravityOrbsConfig(); + + @ConfigOption(name = "Blazing Souls", desc = "") + @Accordion + @Expose + public BlazingSoulsColor blazingSouls = new BlazingSoulsColor(); + + @ConfigOption(name = "Hide Stuff", desc = "") + @Accordion + @Expose + public HideAshfangConfig hide = new HideAshfangConfig(); + + @Expose + @ConfigOption(name = "Highlight Blazes", desc = "Highlight the different blazes in their respective colors.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightBlazes = false; + + @Expose + @ConfigOption(name = "Freeze Cooldown", desc = "Show the cooldown for how long Ashfang blocks your abilities.") + @ConfigEditorBoolean + @FeatureToggle + public boolean freezeCooldown = false; + + @Expose + public Position freezeCooldownPos = new Position(10, 10, false, true); + + @Expose + @ConfigOption(name = "Reset Time", desc = "Show the cooldown until Ashfang pulls his underlings back.") + @ConfigEditorBoolean + @FeatureToggle + public boolean nextResetCooldown = false; + + @Expose + public Position nextResetCooldownPos = new Position(10, 10, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ashfang/BlazingSoulsColor.java b/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ashfang/BlazingSoulsColor.java new file mode 100644 index 000000000..6af0547d8 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ashfang/BlazingSoulsColor.java @@ -0,0 +1,21 @@ +package at.hannibal2.skyhanni.config.features.crimsonisle.ashfang; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class BlazingSoulsColor { + + @Expose + @ConfigOption(name = "Enabled", desc = "Shows the Blazing Souls more clearly.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Souls Color", desc = "Color of the Blazing Souls.") + @ConfigEditorColour + public String color = "0:245:85:255:85"; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ashfang/GravityOrbsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ashfang/GravityOrbsConfig.java new file mode 100644 index 000000000..a9e1fddf5 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ashfang/GravityOrbsConfig.java @@ -0,0 +1,21 @@ +package at.hannibal2.skyhanni.config.features.crimsonisle.ashfang; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class GravityOrbsConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Shows the Gravity Orbs more clearly.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Color", desc = "Color of the Gravity Orbs.") + @ConfigEditorColour + public String color = "0:120:255:85:85"; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ashfang/HideAshfangConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ashfang/HideAshfangConfig.java new file mode 100644 index 000000000..1160988e5 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/ashfang/HideAshfangConfig.java @@ -0,0 +1,27 @@ +package at.hannibal2.skyhanni.config.features.crimsonisle.ashfang; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class HideAshfangConfig { + + @Expose + @ConfigOption(name = "Hide Particles", desc = "Hide particles around the Ashfang boss.") + @ConfigEditorBoolean + @FeatureToggle + public boolean particles = false; + + @Expose + @ConfigOption(name = "Hide Full Names", desc = "Hide the names of full health blazes around Ashfang (only useful when highlight blazes is enabled)") + @ConfigEditorBoolean + @FeatureToggle + public boolean fullNames = false; + + @Expose + @ConfigOption(name = "Hide Damage Splash", desc = "Hide damage splashes around Ashfang.") + @ConfigEditorBoolean + @FeatureToggle + public boolean damageSplash = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugConfig.java new file mode 100644 index 000000000..7f7b9af63 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugConfig.java @@ -0,0 +1,88 @@ +package at.hannibal2.skyhanni.config.features.dev; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import org.lwjgl.input.Keyboard; + +public class DebugConfig { + @Expose + @ConfigOption(name = "Enable Debug", desc = "Enable Test logic") + @ConfigEditorBoolean + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Command Logging", desc = "Logs stack trace information into the console when a command gets sent to Hypixel. (by any mod or the player)") + @ConfigEditorBoolean + public boolean commandLogs = false; + + @Expose + @ConfigOption( + name = "Mod Menu Log", + desc = "Enables debug messages when the currently opened GUI changes, with the path to the gui class. " + + "Useful for adding more mods to quick mod menu switch." + ) + @ConfigEditorBoolean + public boolean modMenuLog = false; + + @Expose + @ConfigOption(name = "Show Internal Name", desc = "Show internal names in item lore.") + @ConfigEditorBoolean + public boolean showInternalName = false; + + @Expose + @ConfigOption(name = "Show Empty Internal Names", desc = "Shows internal name even for items with none.") + @ConfigEditorBoolean + public boolean showEmptyNames = false; + + @Expose + @ConfigOption(name = "Show Item Rarity", desc = "Show item rarities in item lore.") + @ConfigEditorBoolean + public boolean showItemRarity = false; + + @Expose + @ConfigOption(name = "Copy Internal Name", desc = "Copies the internal name of an item on key press in the clipboard.") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int copyInternalName = Keyboard.KEY_NONE; + + @Expose + @ConfigOption(name = "Show NPC Price", desc = "Show NPC price in item lore.") + @ConfigEditorBoolean + public boolean showNpcPrice = false; + + @Expose + @ConfigOption(name = "Show Item UUID", desc = "Show the Unique Identifier of items in the lore.") + @ConfigEditorBoolean + public boolean showItemUuid = false; + + @Expose + @ConfigOption(name = "Copy Item Data", desc = "Copies item NBT data on key press in a GUI to clipboard.") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int copyItemData = Keyboard.KEY_NONE; + + @Expose + @ConfigOption(name = "Copy Compressed Item Data", desc = "Copies compressed item NBT data on key press in a GUI to clipboard.") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int copyItemDataCompressed = Keyboard.KEY_NONE; + + @Expose + @ConfigOption(name = "Copy RNG Meter", desc = "Copies internal names and maxed XP needed from RNG meter inventories as json to clipboard.") + @ConfigEditorBoolean + public boolean copyRngMeter = false; + + @Expose + @ConfigOption(name = "Copy Bestiary Data", desc = "Copies the bestiary data from the inventory as json to clipboard.") + @ConfigEditorBoolean + public boolean copyBestiaryData = false; + + @Expose + @ConfigOption(name = "Highlight Missing Repo Items", desc = "Highlights each item in the current inventory that is not in your current NEU repo.") + @ConfigEditorBoolean + public boolean highlightMissingRepo = false; + + @Expose + @ConfigOption(name = "Hot Swap Detection", desc = "Show chat messages when Hot Swap starts and ends.") + @ConfigEditorBoolean + public boolean hotSwapDetection = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java new file mode 100644 index 000000000..7c5282cf4 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java @@ -0,0 +1,46 @@ +package at.hannibal2.skyhanni.config.features.dev; + +import at.hannibal2.skyhanni.config.core.config.Position; +import at.hannibal2.skyhanni.config.features.dev.minecraftconsole.MinecraftConsoleConfig; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.Category; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import org.lwjgl.input.Keyboard; + +public class DevConfig { + + @Expose + @ConfigOption(name = "Repo Auto Update", desc = "Update the repository on every startup.\n" + + "§cOnly disable this if you know what you are doing!") + @ConfigEditorBoolean + public boolean repoAutoUpdate = true; + + @Expose + @ConfigOption(name = "Debug", desc = "") + @Accordion + public DebugConfig debug = new DebugConfig(); + + @Expose + @ConfigOption(name = "Slot Number", desc = "Show slot number in inventory while pressing this key.") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int showSlotNumberKey = Keyboard.KEY_NONE; + + @ConfigOption(name = "Parkour Waypoints", desc = "") + @Accordion + @Expose + public WaypointsConfig waypoint = new WaypointsConfig(); + + @Expose + public Position debugPos = new Position(10, 10, false, true); + + @Expose + public Position debugLocationPos = new Position(1, 160, false, true); + + @Expose + @Category(name = "Minecraft Console", desc = "Minecraft Console Settings") + public MinecraftConsoleConfig minecraftConsoles = new MinecraftConsoleConfig(); + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dev/WaypointsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dev/WaypointsConfig.java new file mode 100644 index 000000000..863f91476 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dev/WaypointsConfig.java @@ -0,0 +1,26 @@ +package at.hannibal2.skyhanni.config.features.dev; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import org.lwjgl.input.Keyboard; + +public class WaypointsConfig { + + @Expose + @ConfigOption(name = "Save Hotkey", desc = "Saves block location to a temporarily parkour and copies everything to your clipboard.") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int saveKey = Keyboard.KEY_NONE; + + @Expose + @ConfigOption(name = "Delete Hotkey", desc = "Deletes the last saved location for when you make a mistake.") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int deleteKey = Keyboard.KEY_NONE; + + @Expose + @ConfigOption(name = "Show Platform Number", desc = "Show the index number over the platform for every parkour.") + @ConfigEditorBoolean + public boolean showPlatformNumber = false; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dev/minecraftconsole/ConsoleFiltersConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dev/minecraftconsole/ConsoleFiltersConfig.java new file mode 100644 index 000000000..6f537f300 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dev/minecraftconsole/ConsoleFiltersConfig.java @@ -0,0 +1,53 @@ +package at.hannibal2.skyhanni.config.features.dev.minecraftconsole; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class ConsoleFiltersConfig { + @Expose + @ConfigOption(name = "Filter Chat", desc = "Filter chat messages.") + @ConfigEditorBoolean + public boolean filterChat = false; + + @Expose + @ConfigOption(name = "Filter Grow Buffer", desc = "Filter 'Needed to grow BufferBuilder buffer:'") + @ConfigEditorBoolean + public boolean filterGrowBuffer = true; + + @Expose + @ConfigOption(name = "Filter Sound Error", desc = "Filter 'Unable to play unknown soundEvent'.") + @ConfigEditorBoolean + public boolean filterUnknownSound = true; + + @Expose + @ConfigOption(name = "Filter Scoreboard Errors", desc = "Filter error messages with Scoreboard: removeTeam, createTeam, " + + "removeObjective and 'scoreboard team already exists'.") + @ConfigEditorBoolean + public boolean filterScoreboardErrors = true; + + @Expose + @ConfigOption(name = "Filter Particle", desc = "Filter message 'Could not spawn particle effect VILLAGER_HAPPY'.") + @ConfigEditorBoolean + public boolean filterParticleVillagerHappy = true; + + @Expose + @ConfigOption(name = "Filter OptiFine", desc = "Filter OptiFine messages CustomItems and ConnectedTextures during loading.") + @ConfigEditorBoolean + public boolean filterOptiFine = true; + + @Expose + @ConfigOption(name = "Filter AsmHelper Transformer", desc = "Filter messages when AsmHelper is Transforming a class during loading.") + @ConfigEditorBoolean + public boolean filterAmsHelperTransformer = true; + + @Expose + @ConfigOption(name = "Filter Applying AsmWriter", desc = "Filter messages when AsmHelper is applying AsmWriter ModifyWriter.") + @ConfigEditorBoolean + public boolean filterAsmHelperApplying = true; + + @Expose + @ConfigOption(name = "Filter Biome ID Bounds", desc = "Filter message 'Biome ID is out of bounds'.") + @ConfigEditorBoolean + public boolean filterBiomeIdBounds = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dev/minecraftconsole/MinecraftConsoleConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dev/minecraftconsole/MinecraftConsoleConfig.java new file mode 100644 index 000000000..bdca34590 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dev/minecraftconsole/MinecraftConsoleConfig.java @@ -0,0 +1,40 @@ +package at.hannibal2.skyhanni.config.features.dev.minecraftconsole; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class MinecraftConsoleConfig { + @Expose + @ConfigOption(name = "Unfiltered Debug", desc = "Print the debug information for unfiltered console messages.") + @ConfigEditorBoolean + public boolean printUnfilteredDebugs = false; + + @Expose + @ConfigOption(name = "Unfiltered Debug File", desc = "Print the debug information into log files instead of into the console for unfiltered console messages.") + @ConfigEditorBoolean + public boolean logUnfilteredFile = false; + + @Expose + @ConfigOption( + name = "Outside SkyBlock", + desc = "Print the debug information for unfiltered console messages outside SkyBlock too." + ) + @ConfigEditorBoolean + public boolean printUnfilteredDebugsOutsideSkyBlock = false; + + @Expose + @ConfigOption( + name = "Log Filtered", + desc = "Log the filtered messages into the console." + ) + @ConfigEditorBoolean + public boolean printFilteredReason = false; + + @Expose + @ConfigOption(name = "Console Filters", desc = "") + @Accordion + public ConsoleFiltersConfig consoleFilter = new ConsoleFiltersConfig(); + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/CleanEndConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/CleanEndConfig.java new file mode 100644 index 000000000..4dcdc6d7f --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/CleanEndConfig.java @@ -0,0 +1,21 @@ +package at.hannibal2.skyhanni.config.features.dungeon; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class CleanEndConfig { + @Expose + @ConfigOption(name = "Enabled", desc = "After the last Dungeon boss has died, all entities and " + + "particles are no longer displayed and the music stops playing, but the loot chests are still displayed.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Ignore Guardians", desc = "Ignore F3 and M3 Guardians from the clean end feature when " + + "sneaking. Makes it easier to kill them after the boss died already. Thanks Hypixel.") + @ConfigEditorBoolean + public boolean F3IgnoreGuardians = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonConfig.java new file mode 100644 index 000000000..84cba4de7 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonConfig.java @@ -0,0 +1,102 @@ +package at.hannibal2.skyhanni.config.features.dungeon; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class DungeonConfig { + + @Expose + @ConfigOption(name = "Clicked Blocks", desc = "Highlight levers, chests, and Wither Essence when clicked in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightClickedBlocks = false; + + @Expose + @ConfigOption(name = "Milestones Display", desc = "Show the current milestone in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean showMilestonesDisplay = false; + + @Expose + public Position showMileStonesDisplayPos = new Position(10, 10, false, true); + + @Expose + @ConfigOption(name = "Death Counter Display", desc = "Display the total amount of deaths in the current Dungeon.") + @ConfigEditorBoolean + @FeatureToggle + public boolean deathCounterDisplay = false; + + @Expose + public Position deathCounterPos = new Position(10, 10, false, true); + + @Expose + @ConfigOption(name = "Clean End", desc = "") + @Accordion + public CleanEndConfig cleanEnd = new CleanEndConfig(); + + @Expose + @ConfigOption(name = "Boss Damage Splash", desc = "Hides damage splashes while inside the boss room (fixes a Skytils feature).") + @ConfigEditorBoolean + @FeatureToggle + public boolean damageSplashBoss = false; + + @Expose + @ConfigOption(name = "Highlight Deathmites", desc = "Highlight Deathmites in Dungeons in red color.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightDeathmites = true; + + @Expose + @ConfigOption(name = "Highlight Teammates", desc = "Highlight Dungeon teammates with a glowing outline.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightTeammates = true; + + @Expose + @ConfigOption(name = "Object Hider", desc = "Hide various things in Dungeons.") + @Accordion + public ObjectHiderConfig objectHider = new ObjectHiderConfig(); + + @Expose + @ConfigOption(name = "Message Filter", desc = "") + @Accordion + public MessageFilterConfig messageFilter = new MessageFilterConfig(); + + @Expose + @ConfigOption(name = "Dungeon Copilot", desc = "") + @Accordion + public DungeonCopilotConfig dungeonCopilot = new DungeonCopilotConfig(); + + @Expose + @ConfigOption(name = "Party Finder", desc = "") + @Accordion + public PartyFinderConfig partyFinder = new PartyFinderConfig(); + + @Expose + @ConfigOption(name = "Tab List", desc = "") + @Accordion + public TabListConfig tabList = new TabListConfig(); + + @Expose + @ConfigOption(name = "Livid Finder", desc = "") + @Accordion + public LividFinderConfig lividFinder = new LividFinderConfig(); + + @Expose + @ConfigOption(name = "Moving Skeleton Skulls", desc = "Highlight Skeleton Skulls when combining into an " + + "orange Skeletor (not useful when combined with feature Hide Skeleton Skull).") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightSkeletonSkull = true; + + @Expose + @ConfigOption(name = "Croesus Chest", desc = "Adds a visual highlight to the Croesus inventory that " + + "shows unopened chests.") + @ConfigEditorBoolean + @FeatureToggle + public boolean croesusUnopenedChestTracker = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonCopilotConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonCopilotConfig.java new file mode 100644 index 000000000..e285fd951 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonCopilotConfig.java @@ -0,0 +1,18 @@ +package at.hannibal2.skyhanni.config.features.dungeon; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class DungeonCopilotConfig { + @Expose + @ConfigOption(name = "Copilot Enabled", desc = "Suggests what to do next in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + public Position pos = new Position(10, 10, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/LividFinderConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/LividFinderConfig.java new file mode 100644 index 000000000..4525d1c31 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/LividFinderConfig.java @@ -0,0 +1,20 @@ +package at.hannibal2.skyhanni.config.features.dungeon; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class LividFinderConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Helps find the correct livid in F5 and in M5.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Hide Wrong Livids", desc = "Hide wrong livids entirely.") + @ConfigEditorBoolean + public boolean hideWrong = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/MessageFilterConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/MessageFilterConfig.java new file mode 100644 index 000000000..5455ab0f5 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/MessageFilterConfig.java @@ -0,0 +1,14 @@ +package at.hannibal2.skyhanni.config.features.dungeon; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class MessageFilterConfig { + @Expose + @ConfigOption(name = "Keys and Doors", desc = "Hides the chat message when picking up keys or opening doors in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean keysAndDoors = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/ObjectHiderConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/ObjectHiderConfig.java new file mode 100644 index 000000000..690d09249 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/ObjectHiderConfig.java @@ -0,0 +1,65 @@ +package at.hannibal2.skyhanni.config.features.dungeon; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class ObjectHiderConfig { + @Expose + @ConfigOption(name = "Hide Superboom TNT", desc = "Hide Superboom TNT laying around in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideSuperboomTNT = false; + + @Expose + @ConfigOption(name = "Hide Blessings", desc = "Hide Blessings laying around in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideBlessing = false; + + @Expose + @ConfigOption(name = "Hide Revive Stones", desc = "Hide Revive Stones laying around in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideReviveStone = false; + + @Expose + @ConfigOption(name = "Hide Premium Flesh", desc = "Hide Premium Flesh laying around in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hidePremiumFlesh = false; + + @Expose + @ConfigOption(name = "Hide Journal Entry", desc = "Hide Journal Entry pages laying around in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideJournalEntry = false; + + @Expose + @ConfigOption(name = "Hide Skeleton Skull", desc = "Hide Skeleton Skulls laying around in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideSkeletonSkull = true; + + @Expose + @ConfigOption(name = "Hide Healer Orbs", desc = "Hides the damage, ability damage and defensive orbs that spawn when the Healer kills mobs.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideHealerOrbs = false; + + @Expose + @ConfigOption(name = "Hide Healer Fairy", desc = "Hide the Golden Fairy that follows the Healer in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideHealerFairy = false; + + @Expose + @ConfigOption( + name = "Hide Soulweaver Skulls", + desc = "Hide the annoying soulweaver skulls that float around you if you have the soulweaver gloves equipped.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideSoulweaverSkulls = false; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/PartyFinderConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/PartyFinderConfig.java new file mode 100644 index 000000000..2abb3ec22 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/PartyFinderConfig.java @@ -0,0 +1,44 @@ +package at.hannibal2.skyhanni.config.features.dungeon; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class PartyFinderConfig { + @Expose + @ConfigOption(name = "Colored Class Level", desc = "Color class levels in Party Finder.") + @ConfigEditorBoolean + @FeatureToggle + public boolean coloredClassLevel = true; + + @Expose + @ConfigOption(name = "Floor Stack Size", desc = "Display the party finder floor as the item stack size.") + @ConfigEditorBoolean + @FeatureToggle + public boolean floorAsStackSize = true; + + @Expose + @ConfigOption(name = "Mark Paid Carries", desc = "Highlight paid carries with a red background to make them easier to find/skip.") + @ConfigEditorBoolean + @FeatureToggle + public boolean markPaidCarries = true; + + @Expose + @ConfigOption(name = "Mark Low Levels", desc = "Highlight groups with players at or below the specified class level to make them easier to find/skip.") + @ConfigEditorSlider(minValue = 0, maxValue = 50, minStep = 1) + public int markBelowClassLevel = 0; + + @Expose + @ConfigOption(name = "Mark Ineligible Groups", desc = "Highlight groups with requirements that you do not meet.") + @ConfigEditorBoolean + @FeatureToggle + public boolean markIneligibleGroups = true; + + @Expose + @ConfigOption(name = "Mark Missing Class", desc = "Highlight groups that don't currently have any members of your selected dungeon class.") + @ConfigEditorBoolean + @FeatureToggle + public boolean markMissingClass = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/TabListConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/TabListConfig.java new file mode 100644 index 000000000..221cf4651 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/TabListConfig.java @@ -0,0 +1,15 @@ +package at.hannibal2.skyhanni.config.features.dungeon; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class TabListConfig { + + @Expose + @ConfigOption(name = "Colored Class Level", desc = "Color class levels in tab list. (Also hides rank colors and emblems, because who needs that in Dungeons anyway?)") + @ConfigEditorBoolean + @FeatureToggle + public boolean coloredClassLevel = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/CenturyConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/CenturyConfig.java new file mode 100644 index 000000000..d5636117d --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/CenturyConfig.java @@ -0,0 +1,24 @@ +package at.hannibal2.skyhanni.config.features.event; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class CenturyConfig { + + @ConfigOption(name = "Enable Active Player Timer", desc = "Show a HUD telling you how much longer you have to wait to be eligible for another free ticket.") + @Expose + @ConfigEditorBoolean + @FeatureToggle + public boolean enableActiveTimer = true; + + @Expose + public Position activeTimerPosition = new Position(100, 100, false, true); + + @ConfigOption(name = "Enable Active Player Alert", desc = "Loudly proclaim when it is time to break some wheat.") + @Expose + @ConfigEditorBoolean + public boolean enableActiveAlert = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/CityProjectConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/CityProjectConfig.java new file mode 100644 index 000000000..ec0b853bb --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/CityProjectConfig.java @@ -0,0 +1,31 @@ +package at.hannibal2.skyhanni.config.features.event; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class CityProjectConfig { + + @Expose + @ConfigOption(name = "Show Materials", desc = "Show materials needed for contributing to the City Project.") + @ConfigEditorBoolean + @FeatureToggle + public boolean showMaterials = true; + + @Expose + @ConfigOption(name = "Show Ready", desc = "Mark contributions that are ready to participate.") + @ConfigEditorBoolean + @FeatureToggle + public boolean showReady = true; + + @Expose + @ConfigOption(name = "Daily Reminder", desc = "Remind every 24 hours to participate.") + @ConfigEditorBoolean + @FeatureToggle + public boolean dailyReminder = true; + + @Expose + public Position pos = new Position(150, 150, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/EventConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/EventConfig.java new file mode 100644 index 000000000..ef27a42bd --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/EventConfig.java @@ -0,0 +1,51 @@ +package at.hannibal2.skyhanni.config.features.event; + +import at.hannibal2.skyhanni.config.features.event.bingo.BingoConfig; +import at.hannibal2.skyhanni.config.features.event.diana.DianaConfig; +import at.hannibal2.skyhanni.config.features.event.winter.WinterConfig; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.Category; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class EventConfig { + + @Category(name = "Bingo", desc = "Monthly Bingo Event settings") + @Expose + public BingoConfig bingo = new BingoConfig(); + + @Category(name = "Diana", desc = "Diana's Mythological Burrows") + @Expose + public DianaConfig diana = new DianaConfig(); + + @Category(name = "Winter", desc = "Winter Season on Jerry's Island") + @Expose + public WinterConfig winter = new WinterConfig(); + + @ConfigOption(name = "City Project", desc = "") + @Accordion + @Expose + public CityProjectConfig cityProject = new CityProjectConfig(); + + @ConfigOption(name = "Mayor Jerry's Jerrypocalypse", desc = "") + @Accordion + @Expose + public MayorJerryConfig jerry = new MayorJerryConfig(); + + @ConfigOption(name = "The Great Spook", desc = "") + @Accordion + @Expose + public GreatSpookConfig spook = new GreatSpookConfig(); + + // comment in if the event is needed again +// @ConfigOption(name = "300þ Anniversary Celebration", desc = "Features for the 300þ year of SkyBlock") + @Accordion + @Expose + public CenturyConfig century = new CenturyConfig(); + + @Expose + @ConfigOption(name = "Main Lobby Halloween Basket Waypoints", desc = "") + @Accordion + public HalloweenBasketConfig halloweenBasket = new HalloweenBasketConfig(); + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/GreatSpookConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/GreatSpookConfig.java new file mode 100644 index 000000000..69eb0ae06 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/GreatSpookConfig.java @@ -0,0 +1,44 @@ +package at.hannibal2.skyhanni.config.features.event; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class GreatSpookConfig { + + @Expose + @ConfigOption(name = "Primal Fear Timer", desc = "Shows cooldown timer for next primal fear.") + @ConfigEditorBoolean + @FeatureToggle + public boolean primalFearTimer = false; + + @Expose + @ConfigOption(name = "Primal Fear Notify", desc = "Plays a notification sound when the next primal fear can spawn.") + @ConfigEditorBoolean + @FeatureToggle + public boolean primalFearNotification = false; + + @Expose + public Position positionTimer = new Position(20, 20, false, true); + + @Expose + @ConfigOption(name = "Fear Stat Display", desc = "Shows your current Fear stat value.") + @ConfigEditorBoolean + @FeatureToggle + public boolean fearStatDisplay = false; + + @Expose + public Position positionFear = new Position(30, 30, false, true); + + @Expose + @ConfigOption(name = "IRL Time Left", desc = "Shows the IRL time left before The Great Spook ends.") + @ConfigEditorBoolean + @FeatureToggle + public boolean greatSpookTimeLeft = false; + + @Expose + public Position positionTimeLeft = new Position(40, 40, false, true); + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/HalloweenBasketConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/HalloweenBasketConfig.java new file mode 100644 index 000000000..5cb2bfef4 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/HalloweenBasketConfig.java @@ -0,0 +1,25 @@ +package at.hannibal2.skyhanni.config.features.event; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class HalloweenBasketConfig { + + @Expose + @ConfigOption(name = "Basket Waypoints", desc = "Show all Halloween Basket waypoints.\nShoutout to §bTobbbb §7for the coordinates.\n(AS OF 2023)") + @ConfigEditorBoolean + @FeatureToggle + public boolean allWaypoints = false; + + @Expose + @ConfigOption(name = "Entrance Waypoints", desc = "Show helper waypoints to Baskets #23, #24, and #25. Coordinates by §bErymanthus§7.") + @ConfigEditorBoolean + public boolean allEntranceWaypoints = false; + + @Expose + @ConfigOption(name = "Only Closest", desc = "Only show the closest waypoint") + @ConfigEditorBoolean + public boolean onlyClosest = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/MayorJerryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/MayorJerryConfig.java new file mode 100644 index 000000000..b3afe6c1a --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/MayorJerryConfig.java @@ -0,0 +1,16 @@ +package at.hannibal2.skyhanni.config.features.event; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class MayorJerryConfig { + + @Expose + @ConfigOption(name = "Highlight Jerries", desc = "Highlights Jerries found from the Jerrypocalypse perk. Highlight color is based on color of the Jerry.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightJerries = true; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/bingo/BingoCardConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/bingo/BingoCardConfig.java new file mode 100644 index 000000000..44dd23ec4 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/bingo/BingoCardConfig.java @@ -0,0 +1,45 @@ +package at.hannibal2.skyhanni.config.features.event.bingo; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import io.github.moulberry.moulconfig.observer.Property; + +public class BingoCardConfig { + @Expose + @ConfigOption(name = "Enable", desc = "Displays the Bingo Card.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + @Expose + @ConfigOption(name = "Quick Toggle", desc = "Quickly toggle the Bingo Card or the step helper by sneaking with SkyBlock Menu in hand.") + @ConfigEditorBoolean + public boolean quickToggle = true; + + @Expose + @ConfigOption(name = "Bingo Steps", desc = "Show help with the next step in Bingo instead of the Bingo Card. " + + "§cThis feature is in early development. Expect bugs and missing goals.") + @ConfigEditorBoolean + public boolean stepHelper = false; + + @Expose + @ConfigOption(name = "Hide Community Goals", desc = "Hide Community Goals from the Bingo Card display.") + @ConfigEditorBoolean + public Property hideCommunityGoals = Property.of(false); + + @Expose + @ConfigOption( + name = "Show Guide", + desc = "Show tips and difficulty for bingo goals inside the Bingo Card inventory.\n" + + "These tips are made from inspirations and guides from the community,\n" + + "aiming to help you to complete the bingo card." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean bingoSplashGuide = true; + + @Expose + public Position bingoCardPos = new Position(10, 10, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/bingo/BingoConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/bingo/BingoConfig.java new file mode 100644 index 000000000..816f8a194 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/bingo/BingoConfig.java @@ -0,0 +1,30 @@ +package at.hannibal2.skyhanni.config.features.event.bingo; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class BingoConfig { + + @Expose + @ConfigOption(name = "Bingo Card", desc = "") + @Accordion + public BingoCardConfig bingoCard = new BingoCardConfig(); + + @Expose + @ConfigOption(name = "Compact Chat Messages", desc = "") + @Accordion + public CompactChatConfig compactChat = new CompactChatConfig(); + + @Expose + @ConfigOption(name = "Minion Craft Helper", desc = "Show how many more items you need to upgrade the minion in your inventory. Especially useful for Bingo.") + @ConfigEditorBoolean + @FeatureToggle + public boolean minionCraftHelperEnabled = true; + + @Expose + public Position minionCraftHelperPos = new Position(10, 10, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/bingo/CompactChatConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/bingo/CompactChatConfig.java new file mode 100644 index 000000000..bbf737646 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/bingo/CompactChatConfig.java @@ -0,0 +1,27 @@ +package at.hannibal2.skyhanni.config.features.event.bingo; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class CompactChatConfig { + + @Expose + @ConfigOption(name = "Enable", desc = "Shortens chat messages about skill level ups, collection gains, " + + "new area discoveries and SkyBlock level up messages while on Bingo.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Hide Border", desc = "Hide the border messages before and after the compact level up messages.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideBorder = true; + + @Expose + @ConfigOption(name = "Outside Bingo", desc = "Compact the level up chat messages outside of an Bingo profile as well.") + @ConfigEditorBoolean + public boolean outsideBingo = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/diana/DianaConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/diana/DianaConfig.java new file mode 100644 index 000000000..b5d21bade --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/diana/DianaConfig.java @@ -0,0 +1,60 @@ +package at.hannibal2.skyhanni.config.features.event.diana; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import org.lwjgl.input.Keyboard; + +public class DianaConfig { + + @Expose + @ConfigOption(name = "Soopy Guess", desc = "Uses §eSoopy's Guess Logic §7to find the next burrow. Does not require SoopyV2 or ChatTriggers to be installed.") + @ConfigEditorBoolean + @FeatureToggle + public boolean burrowsSoopyGuess = false; + + @Expose + @ConfigOption(name = "Nearby Detection", desc = "Show burrows near you.") + @ConfigEditorBoolean + @FeatureToggle + public boolean burrowsNearbyDetection = false; + + @Expose + @ConfigOption(name = "Smooth Transition", desc = "Show the way from one burrow to another smoothly.") + @ConfigEditorBoolean + public boolean burrowSmoothTransition = false; + + @Expose + @ConfigOption(name = "Nearest Warp", desc = "Warps to the nearest warp point on the hub, if closer to the next burrow.") + @ConfigEditorBoolean + public boolean burrowNearestWarp = false; + + @Expose + @ConfigOption(name = "Warp Key", desc = "Press this key to warp to nearest burrow waypoint.") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int keyBindWarp = Keyboard.KEY_NONE; + + @Expose + @ConfigOption(name = "Ignored Warps", desc = "") + @Accordion + public IgnoredWarpsConfig ignoredWarps = new IgnoredWarpsConfig(); + + @Expose + @ConfigOption(name = "Inquisitor Waypoint Sharing", desc = "") + @Accordion + public InquisitorSharingConfig inquisitorSharing = new InquisitorSharingConfig(); + + @Expose + @ConfigOption(name = "Griffin Pet Warning", desc = "Warn when holding an Ancestral Spade if a Griffin Pet is not equipped.") + @ConfigEditorBoolean + @FeatureToggle + public boolean petWarning = true; + + @Expose + @ConfigOption(name = "Always Diana", desc = "Forcefully set the Diana event to be active. This is useful if the auto mayor detection fails.") + @ConfigEditorBoolean + public boolean alwaysDiana = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/diana/IgnoredWarpsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/diana/IgnoredWarpsConfig.java new file mode 100644 index 000000000..2cef22331 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/diana/IgnoredWarpsConfig.java @@ -0,0 +1,19 @@ +package at.hannibal2.skyhanni.config.features.event.diana; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class IgnoredWarpsConfig { + + @Expose + @ConfigOption(name = "Crypt", desc = "Ignore the Crypt warp point (Because it takes a long time to leave).") + @ConfigEditorBoolean + public boolean crypt = false; + + @Expose + @ConfigOption(name = "Wizard", desc = "Ignore the Wizard Tower warp point (Because it is easy to fall into the rift).") + @ConfigEditorBoolean + public boolean wizard = false; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/diana/InquisitorSharingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/diana/InquisitorSharingConfig.java new file mode 100644 index 000000000..c719a7101 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/diana/InquisitorSharingConfig.java @@ -0,0 +1,37 @@ +package at.hannibal2.skyhanni.config.features.event.diana; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import org.lwjgl.input.Keyboard; + +public class InquisitorSharingConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Shares your Inquisitor and receiving other Inquisitors via Party Chat.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Focus", desc = "Hide other waypoints when your Party finds an Inquisitor.") + @ConfigEditorBoolean + public boolean focusInquisitor = false; + + @Expose + @ConfigOption(name = "Instant Share", desc = "Share the waypoint as soon as you find an Inquisitor. As an alternative, you can share it only via key press.") + @ConfigEditorBoolean + public boolean instantShare = true; + + @Expose + @ConfigOption(name = "Share Key", desc = "Press this key to share your Inquisitor Waypoint.") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_Y) + public int keyBindShare = Keyboard.KEY_Y; + + @Expose + @ConfigOption(name = "Show Despawn Time", desc = "Show the time until the shared Inquisitor will despawn.") + @ConfigEditorBoolean + public boolean showDespawnTime = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/winter/FrozenTreasureConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/winter/FrozenTreasureConfig.java new file mode 100644 index 000000000..2b41265a6 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/winter/FrozenTreasureConfig.java @@ -0,0 +1,72 @@ +package at.hannibal2.skyhanni.config.features.event.winter; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class FrozenTreasureConfig { + + @Expose + @ConfigOption( + name = "Enabled", + desc = "Tracks all of your drops from Frozen Treasure in the Glacial Caves.\n" + + "§eIce calculations are an estimate but are relatively accurate." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption( + name = "Text Format", + desc = "Drag text to change the appearance of the overlay." + ) + @ConfigEditorDraggableList( + exampleText = { + "§1§lFrozen Treasure Tracker", + "§61,636 Treasures Mined", + "§33.2m Total Ice", + "§3342,192 Ice/hr", + "§81,002 Compact Procs", + " ", + "§b182 §fWhite Gift", + "§b94 §aGreen Gift", + "§b17 §9§cRed Gift", + "§b328 §fPacked Ice", + "§b80 §aEnchanted Ice", + "§b4 §9Enchanted Packed Ice", + "§b182 §aIce Bait", + "§b3 §aGlowy Chum Bait", + "§b36 §5Glacial Fragment", + "§b6 §fGlacial Talisman", + " ", + } + ) + public List textFormat = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 14, 15)); + + @Expose + @ConfigOption(name = "Only in Glacial Cave", desc = "Only shows the overlay while in the Glacial Cave.") + @ConfigEditorBoolean + public boolean onlyInCave = true; + + @Expose + @ConfigOption(name = "Show as Drops", desc = "Multiplies the numbers on the display by the base drop. \n" + + "E.g. 3 Ice Bait -> 48 Ice Bait") + @ConfigEditorBoolean + public boolean showAsDrops = false; + + @Expose + @ConfigOption(name = "Hide Chat Messages", desc = "Hides the chat messages from Frozen Treasures.") + @ConfigEditorBoolean + public boolean hideMessages = false; + + @Expose + public Position position = new Position(10, 80, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/winter/WinterConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/winter/WinterConfig.java new file mode 100644 index 000000000..8af9472b1 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/winter/WinterConfig.java @@ -0,0 +1,26 @@ +package at.hannibal2.skyhanni.config.features.event.winter; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class WinterConfig { + + @Expose + @ConfigOption(name = "Frozen Treasure Tracker", desc = "") + @Accordion + public FrozenTreasureConfig frozenTreasureTracker = new FrozenTreasureConfig(); + + @Expose + @ConfigOption(name = "Island Close Time", desc = "While on the Winter Island, show a timer until Jerry's Workshop closes.") + @ConfigEditorBoolean + @FeatureToggle + public boolean islandCloseTime = true; + + @Expose + public Position islandCloseTimePosition = new Position(10, 10, false, true); + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/BarnTimerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/BarnTimerConfig.java new file mode 100644 index 000000000..eb0577135 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/BarnTimerConfig.java @@ -0,0 +1,62 @@ +package at.hannibal2.skyhanni.config.features.fishing; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import org.lwjgl.input.Keyboard; + +public class BarnTimerConfig { + @Expose + @ConfigOption( + name = "Barn Fishing Timer", + desc = "Show the time and amount of sea creatures while fishing on the barn via hub." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption( + name = "Worm Fishing", + desc = "Show the Barn Fishing Timer even for worms or other sea creatures in the Crystal Hollows." + ) + @ConfigEditorBoolean + public boolean crystalHollows = true; + + @Expose + @ConfigOption( + name = "Stranded Fishing", + desc = "Show the Barn Fishing Timer even on all the different islands Stranded players can visit." + ) + @ConfigEditorBoolean + public boolean forStranded = true; + + @Expose + @ConfigOption( + name = "Worm Cap Alert", + desc = "Alerts you with title and sound if you hit the Worm Sea Creature limit of 60." + ) + @ConfigEditorBoolean + public boolean wormLimitAlert = true; + + @Expose + @ConfigOption(name = "Reset Timer Hotkey", desc = "Press this key to reset the timer manualy") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int manualResetTimer = Keyboard.KEY_NONE; + + @Expose + @ConfigOption(name = "Fishing Timer Alert", desc = "Change the amount of time in seconds until the timer dings.") + @ConfigEditorSlider( + minValue = 240, + maxValue = 360, + minStep = 10 + ) + public int alertTime = 330; + + @Expose + public Position pos = new Position(10, 10, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/ChumBucketHiderConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/ChumBucketHiderConfig.java new file mode 100644 index 000000000..aaf8a891e --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/ChumBucketHiderConfig.java @@ -0,0 +1,26 @@ +package at.hannibal2.skyhanni.config.features.fishing; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import io.github.moulberry.moulconfig.observer.Property; + +public class ChumBucketHiderConfig { + + @Expose + @ConfigOption(name = "Enable", desc = "Hide the Chum/Chumcap Bucket name tags for other players.") + @ConfigEditorBoolean + @FeatureToggle + public Property enabled = Property.of(true); + + @Expose + @ConfigOption(name = "Hide Bucket", desc = "Hide the Chum/Chumcap Bucket.") + @ConfigEditorBoolean + public Property hideBucket = Property.of(false); + + @Expose + @ConfigOption(name = "Hide Own", desc = "Hides your own Chum/Chumcap Bucket.") + @ConfigEditorBoolean + public Property hideOwn = Property.of(false); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishedItemNameConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishedItemNameConfig.java new file mode 100644 index 000000000..51c37e5ea --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishedItemNameConfig.java @@ -0,0 +1,21 @@ +package at.hannibal2.skyhanni.config.features.fishing; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class FishedItemNameConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Show the fished item name above the item when fishing.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Show Bait", desc = "Also show the name of the consumed bait.") + @ConfigEditorBoolean + public boolean showBaits = false; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishingBaitWarningsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishingBaitWarningsConfig.java new file mode 100644 index 000000000..ae2dd9c9b --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishingBaitWarningsConfig.java @@ -0,0 +1,20 @@ +package at.hannibal2.skyhanni.config.features.fishing; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class FishingBaitWarningsConfig { + @Expose + @ConfigOption(name = "Bait Change Warning", desc = "Show warning when fishing bait is changed") + @ConfigEditorBoolean + @FeatureToggle + public boolean baitChangeWarning = false; + + @Expose + @ConfigOption(name = "No Bait Warning", desc = "Show warning when no bait is used") + @ConfigEditorBoolean + @FeatureToggle + public boolean noBaitWarning = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishingConfig.java new file mode 100644 index 000000000..13ef30f84 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishingConfig.java @@ -0,0 +1,76 @@ +package at.hannibal2.skyhanni.config.features.fishing; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import at.hannibal2.skyhanni.config.features.fishing.trophyfishing.TrophyFishingConfig; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.Category; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class FishingConfig { + + @Expose + @Category(name = "Trophy Fishing", desc = "Trophy Fishing Settings") + public TrophyFishingConfig trophyFishing = new TrophyFishingConfig(); + + @Expose + @ConfigOption(name = "Thunder Spark", desc = "") + @Accordion + public ThunderSparkConfig thunderSpark = new ThunderSparkConfig(); + + @Expose + @ConfigOption(name = "Barn Fishing Timer", desc = "") + @Accordion + public BarnTimerConfig barnTimer = new BarnTimerConfig(); + + @Expose + @ConfigOption(name = "Chum/Chumcap Bucket Hider", desc = "") + @Accordion + public ChumBucketHiderConfig chumBucketHider = new ChumBucketHiderConfig(); + + @Expose + @ConfigOption(name = "Fished Item Name", desc = "") + @Accordion + public FishedItemNameConfig fishedItemName = new FishedItemNameConfig(); + + @Expose + @ConfigOption(name = "Fishing Hook Display", desc = "") + @Accordion + public FishingHookDisplayConfig fishingHookDisplay = new FishingHookDisplayConfig(); + + @Expose + @ConfigOption(name = "Bait Warnings", desc = "") + @Accordion + public FishingBaitWarningsConfig fishingBaitWarnings = new FishingBaitWarningsConfig(); + + @Expose + @ConfigOption(name = "Rare Sea Creatures", desc = "") + @Accordion + public RareCatchesConfig rareCatches = new RareCatchesConfig(); + + @Expose + @ConfigOption( + name = "Shark Fish Counter", + desc = "Counts how many Sharks have been caught." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean sharkFishCounter = false; + + @Expose + public Position sharkFishCounterPos = new Position(10, 10, false, true); + + @Expose + @ConfigOption(name = "Shorten Fishing Message", desc = "Shortens the chat message that says what type of Sea Creature you have fished.") + @ConfigEditorBoolean + @FeatureToggle + public boolean shortenFishingMessage = false; + + @Expose + @ConfigOption(name = "Compact Double Hook", desc = "Adds Double Hook to the Sea Creature chat message instead of in a previous line.") + @ConfigEditorBoolean + @FeatureToggle + public boolean compactDoubleHook = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishingHookDisplayConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishingHookDisplayConfig.java new file mode 100644 index 000000000..e2cfdfa05 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishingHookDisplayConfig.java @@ -0,0 +1,27 @@ +package at.hannibal2.skyhanni.config.features.fishing; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class FishingHookDisplayConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Display the Hypixel timer until the fishing hook can be pulled out of the water/lava, only bigger and on your screen.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption( + name = "Hide Armor Stand", + desc = "Hide the original armor stand from Hypixel when the SkyHanni display is enabled." + ) + @ConfigEditorBoolean + public boolean hideArmorStand = true; + + @Expose + public Position position = new Position(460, -240, 3.4f); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/RareCatchesConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/RareCatchesConfig.java new file mode 100644 index 000000000..b89347c65 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/RareCatchesConfig.java @@ -0,0 +1,32 @@ +package at.hannibal2.skyhanni.config.features.fishing; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class RareCatchesConfig { + + @Expose + @ConfigOption(name = "Alert (Own Sea Creatures)", desc = "Show an alert on screen when you catch a rare sea creature.") + @ConfigEditorBoolean + @FeatureToggle + public boolean alertOwnCatches = true; + + @Expose + @ConfigOption(name = "Alert (Other Sea Creatures)", desc = "Show an alert on screen when other players nearby catch a rare sea creature.") + @ConfigEditorBoolean + public boolean alertOtherCatches = false; + + @Expose + @ConfigOption(name = "Play Sound Alert", desc = "Play a sound effect when rare sea creature alerts are displayed.") + @ConfigEditorBoolean + public boolean playSound = true; + + @Expose + @ConfigOption(name = "Highlight", desc = "Highlight nearby rare sea creatures.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlight = false; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/ThunderSparkConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/ThunderSparkConfig.java new file mode 100644 index 000000000..78e75f6c4 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/ThunderSparkConfig.java @@ -0,0 +1,20 @@ +package at.hannibal2.skyhanni.config.features.fishing; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class ThunderSparkConfig { + @Expose + @ConfigOption(name = "Thunder Spark Highlight", desc = "Highlight Thunder Sparks after killing a Thunder.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlight = false; + + @Expose + @ConfigOption(name = "Thunder Spark Color", desc = "Color of the Thunder Sparks.") + @ConfigEditorColour + public String color = "0:255:255:255:255"; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/ChatMessagesConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/ChatMessagesConfig.java new file mode 100644 index 000000000..f19fc0d86 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/ChatMessagesConfig.java @@ -0,0 +1,56 @@ +package at.hannibal2.skyhanni.config.features.fishing.trophyfishing; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class ChatMessagesConfig { + + @Expose + @ConfigOption( + name = "Trophy Counter", + desc = "Counts Trophy messages from chat and tells you how many you have found." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption( + name = "Trophy Counter Design", + desc = "§fStyle 1: §72. §6§lGOLD §5Moldfin\n" + + "§fStyle 2: §bYou caught a §5Moldfin §6§lGOLD§b. §7(2)\n" + + "§fStyle 3: §bYou caught your 2nd §6§lGOLD §5Moldfin§b." + ) + @ConfigEditorDropdown(values = {"Style 1", "Style 2", "Style 3"}) + public int design = 0; + + @Expose + @ConfigOption(name = "Show Total Amount", desc = "Show total amount of all rarities at the end of the chat message.") + @ConfigEditorBoolean + public boolean totalAmount = false; + + @Expose + @ConfigOption(name = "Trophy Fish Info", desc = "Show information and stats about a Trophy Fish when hovering over a catch message in chat.") + @ConfigEditorBoolean + @FeatureToggle + public boolean tooltip = true; + + @Expose + @ConfigOption(name = "Hide Repeated Catches", desc = "Delete past catches of the same Trophy Fish from chat.") + @ConfigEditorBoolean + @FeatureToggle + public boolean duplicateHider = false; + + @Expose + @ConfigOption(name = "Bronze Duplicates", desc = "Hide duplicate messages for bronze Trophy Fishes from chat.") + @ConfigEditorBoolean + public boolean bronzeHider = false; + + @Expose + @ConfigOption(name = "Silver Duplicates", desc = "Hide duplicate messages for silver Trophy Fishes from chat.") + @ConfigEditorBoolean + public boolean silverHider = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishingConfig.java new file mode 100644 index 000000000..ce774a72f --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishingConfig.java @@ -0,0 +1,27 @@ +package at.hannibal2.skyhanni.config.features.fishing.trophyfishing; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class TrophyFishingConfig { + + @Expose + @ConfigOption(name = "Trophy Fishing Chat Messages", desc = "") + @Accordion + public ChatMessagesConfig chatMessages = new ChatMessagesConfig(); + + @Expose + @ConfigOption(name = "Fillet Tooltip", desc = "Show fillet value of Trophy Fish in tooltip.") + @ConfigEditorBoolean + @FeatureToggle + public boolean filletTooltip = true; + + @Expose + @ConfigOption(name = "Odger Waypoint", desc = "Show the Odger waypoint when Trophy Fishes are in the inventory and no lava rod in hand.") + @ConfigEditorBoolean + @FeatureToggle + public boolean odgerLocation = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/AnitaShopConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/AnitaShopConfig.java new file mode 100644 index 000000000..f45f8cbc1 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/AnitaShopConfig.java @@ -0,0 +1,30 @@ +package at.hannibal2.skyhanni.config.features.garden; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class AnitaShopConfig { + @Expose + @ConfigOption( + name = "Medal Prices", + desc = "Helps to identify profitable items to buy at the Anita item shop " + + "and potential profit from selling the item in the Auction House." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean medalProfitEnabled = true; + + @Expose + @ConfigOption( + name = "Extra Farming Fortune", + desc = "Show current tier and cost to max out in the item tooltip.") + @ConfigEditorBoolean + @FeatureToggle + public boolean extraFarmingFortune = true; + + @Expose + public Position medalProfitPos = new Position(206, 158, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/CropStartLocationConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/CropStartLocationConfig.java new file mode 100644 index 000000000..33a797bcb --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/CropStartLocationConfig.java @@ -0,0 +1,16 @@ +package at.hannibal2.skyhanni.config.features.garden; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class CropStartLocationConfig { + + @Expose + @ConfigOption(name = "Enable", desc = "Show the start waypoint for your farm with the currently holding tool.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/DicerCounterConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/DicerCounterConfig.java new file mode 100644 index 000000000..63087dab1 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/DicerCounterConfig.java @@ -0,0 +1,24 @@ +package at.hannibal2.skyhanni.config.features.garden; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class DicerCounterConfig { + @Expose + @ConfigOption(name = "RNG Drop Counter", desc = "Count RNG drops for Melon Dicer and Pumpkin Dicer.") + @ConfigEditorBoolean + @FeatureToggle + public boolean display = true; + + @Expose + @ConfigOption(name = "Hide Chat", desc = "Hide the chat message when dropping a RNG Dicer drop.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideChat = false; + + @Expose + public Position pos = new Position(16, -232, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/EliteFarmingWeightConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/EliteFarmingWeightConfig.java new file mode 100644 index 000000000..c192ac763 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/EliteFarmingWeightConfig.java @@ -0,0 +1,53 @@ +package at.hannibal2.skyhanni.config.features.garden; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorText; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class EliteFarmingWeightConfig { + @Expose + @ConfigOption(name = "Display", desc = "Display your farming weight on screen. " + + "The calculation and API is provided by The Elite SkyBlock farmers. " + + "See §ehttps://elitebot.dev/info §7for more info.") + @ConfigEditorBoolean + @FeatureToggle + public boolean display = true; + + @Expose + public Position pos = new Position(180, 10, false, true); + + @Expose + @ConfigOption(name = "Leaderboard Ranking", desc = "Show your position in the farming weight leaderboard. " + + "Only if your farming weight is high enough! Updates every 10 minutes.") + @ConfigEditorBoolean + public boolean leaderboard = true; + + @Expose + @ConfigOption(name = "Overtake ETA", desc = "Show a timer estimating when you'll move up a spot in the leaderboard! " + + "Will show an ETA to rank #10,000 if you're not on the leaderboard yet.") + @ConfigEditorBoolean + public boolean overtakeETA = false; + + @Expose + @ConfigOption(name = "Offscreen Drop Message", desc = "Show a chat message when joining Garden how many spots you have dropped since last Garden join.") + @ConfigEditorBoolean + public boolean offScreenDropMessage = true; + + @Expose + @ConfigOption(name = "Always ETA", desc = "Show the Overtake ETA always, even when not farming at the moment.") + @ConfigEditorBoolean + public boolean overtakeETAAlways = true; + + @Expose + @ConfigOption(name = "ETA Goal", desc = "Override the Overtake ETA to show when you'll reach the specified rank (if not there yet). (Default: \"10,000\")") + @ConfigEditorText + public String ETAGoalRank = "10000"; + + @Expose + @ConfigOption(name = "Show below 200", desc = "Show the farming weight data even if you are below 200 weight.") + @ConfigEditorBoolean + public boolean ignoreLow = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/FarmingArmorDropsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/FarmingArmorDropsConfig.java new file mode 100644 index 000000000..64d04f932 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/FarmingArmorDropsConfig.java @@ -0,0 +1,24 @@ +package at.hannibal2.skyhanni.config.features.garden; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class FarmingArmorDropsConfig { + @Expose + @ConfigOption(name = "Show Counter", desc = "Count all §9Cropie§7, §5Squash §7and §6Fermento §7dropped.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Hide Chat", desc = "Hide the chat message when receiving a farming armor drop.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideChat = false; + + @Expose + public Position pos = new Position(16, -232, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/FarmingFortuneConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/FarmingFortuneConfig.java new file mode 100644 index 000000000..aadf97fee --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/FarmingFortuneConfig.java @@ -0,0 +1,36 @@ +package at.hannibal2.skyhanni.config.features.garden; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.commands.Commands; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorButton; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class FarmingFortuneConfig { + @Expose + @ConfigOption( + name = "FF Display", + desc = "Displays the true Farming Fortune for the current crop, including all crop-specific and hidden bonuses." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean display = true; + + @Expose + @ConfigOption( + name = "Show As Drop Multiplier", + desc = "Adds 100 to the displayed Farming Fortune so that it represents a drop multiplier rather than" + + " the chance for bonus drops. " + ) + @ConfigEditorBoolean + public boolean dropMultiplier = true; + + @ConfigOption(name = "Farming Fortune Guide", desc = "Opens a guide that breaks down your Farming Fortune.\n§eCommand: /ff") + @ConfigEditorButton(buttonText = "Open") + public Runnable open = Commands::openFortuneGuide; + + @Expose + public Position pos = new Position(5, -180, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java new file mode 100644 index 000000000..65a416dca --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java @@ -0,0 +1,205 @@ +package at.hannibal2.skyhanni.config.features.garden; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import at.hannibal2.skyhanni.config.features.garden.composter.ComposterConfig; +import at.hannibal2.skyhanni.config.features.garden.cropmilestones.CropMilestonesConfig; +import at.hannibal2.skyhanni.config.features.garden.optimalspeed.OptimalSpeedConfig; +import at.hannibal2.skyhanni.config.features.garden.visitor.VisitorConfig; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.Category; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class GardenConfig { + + @Expose + @ConfigOption(name = "SkyMart", desc = "") + @Accordion + public SkyMartConfig skyMart = new SkyMartConfig(); + + @Expose + @Category(name = "Visitor", desc = "Visitor Settings") + public VisitorConfig visitors = new VisitorConfig(); + + @Expose + @ConfigOption(name = "Numbers", desc = "") + @Accordion + public NumbersConfig number = new NumbersConfig(); + + @Expose + @Category(name = "Crop Milestones", desc = "Crop Milestones Settings") + public CropMilestonesConfig cropMilestones = new CropMilestonesConfig(); + + // TODO moulconfig runnable support + @Expose + @ConfigOption(name = "Custom Keybinds", desc = "") + @Accordion + public KeyBindConfig keyBind = new KeyBindConfig(); + + @Expose + @Category(name = "Optimal Speed", desc = "Optimal Speed Settings") + public OptimalSpeedConfig optimalSpeeds = new OptimalSpeedConfig(); + + @Expose + @ConfigOption(name = "Garden Level", desc = "") + @Accordion + public GardenLevelConfig gardenLevels = new GardenLevelConfig(); + + @Expose + @ConfigOption(name = "Farming Weight", desc = "") + @Accordion + public EliteFarmingWeightConfig eliteFarmingWeights = new EliteFarmingWeightConfig(); + + @Expose + @ConfigOption(name = "Dicer Counter", desc = "") + @Accordion + public DicerCounterConfig dicerCounters = new DicerCounterConfig(); + + @Expose + @ConfigOption(name = "Money per Hour", desc = "") + @Accordion + public MoneyPerHourConfig moneyPerHours = new MoneyPerHourConfig(); + + @Expose + @ConfigOption(name = "Next Jacob's Contest", desc = "") + @Accordion + public NextJacobContestConfig nextJacobContests = new NextJacobContestConfig(); + + @Expose + @ConfigOption(name = "Farming Armor Drops", desc = "") + + @Accordion + public FarmingArmorDropsConfig farmingArmorDrop = new FarmingArmorDropsConfig(); + + @Expose + @ConfigOption(name = "Anita Shop", desc = "") + @Accordion + public AnitaShopConfig anitaShop = new AnitaShopConfig(); + + @Expose + @Category(name = "Composter", desc = "Composter Settings") + public ComposterConfig composters = new ComposterConfig(); + + @Expose + @ConfigOption(name = "Farming Fortune Display", desc = "") + @Accordion + public FarmingFortuneConfig farmingFortunes = new FarmingFortuneConfig(); + + @Expose + @ConfigOption(name = "Tooltip Tweaks", desc = "") + @Accordion + public TooltipTweaksConfig tooltipTweak = new TooltipTweaksConfig(); + + @Expose + @ConfigOption(name = "Yaw and Pitch", desc = "") + @Accordion + public YawPitchDisplayConfig yawPitchDisplay = new YawPitchDisplayConfig(); + + @Expose + @ConfigOption(name = "Crop Start Location", desc = "") + @Accordion + public CropStartLocationConfig cropStartLocation = new CropStartLocationConfig(); + + @Expose + @ConfigOption(name = "Garden Plot Icon", desc = "") + @Accordion + public PlotIconConfig plotIcon = new PlotIconConfig(); + + @Expose + @ConfigOption(name = "Plot Price", desc = "Show the price of the plot in coins when inside the Configure Plots inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean plotPrice = true; + + @Expose + @ConfigOption(name = "Desk in Menu", desc = "Show a Desk button in the SkyBlock Menu. Opens the /desk command on click.") + @ConfigEditorBoolean + @FeatureToggle + public boolean deskInSkyBlockMenu = true; + + @Expose + @ConfigOption(name = "Fungi Cutter Warning", desc = "Warn when breaking mushroom with the wrong Fungi Cutter mode.") + @ConfigEditorBoolean + @FeatureToggle + public boolean fungiCutterWarn = true; + + @Expose + @ConfigOption(name = "Burrowing Spores", desc = "Show a notification when a Burrowing Spores spawns while farming mushrooms.") + @ConfigEditorBoolean + @FeatureToggle + public boolean burrowingSporesNotification = true; + + @Expose + @ConfigOption(name = "Wild Strawberry", desc = "Show a notification when a Wild Strawberry Dye drops while farming.") + @ConfigEditorBoolean + @FeatureToggle + public boolean wildStrawberryDyeNotification = true; + + @Expose + @ConfigOption( + name = "FF for Contest", + desc = "Show the minimum needed Farming Fortune for reaching each medal in Jacob's Farming Contest inventory." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean farmingFortuneForContest = true; + + @Expose + public Position farmingFortuneForContestPos = new Position(180, 156, false, true); + + @Expose + @ConfigOption( + name = "Contest Time Needed", + desc = "Show the time and missing FF for every crop inside Jacob's Farming Contest inventory." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean jacobContextTimes = true; + + @Expose + @ConfigOption( + name = "Custom BPS", + desc = "Use custom Blocks per Second value in some GUIs instead of the real one." + ) + @ConfigEditorBoolean + public boolean jacobContestCustomBps = true; + + // TODO moulconfig runnable support + @Expose + @ConfigOption(name = "Custom BPS Value", desc = "Set a custom Blocks per Second value.") + @ConfigEditorSlider( + minValue = 15, + maxValue = 20, + minStep = 0.1f + ) + public double jacobContestCustomBpsValue = 19.9; + + @Expose + public Position jacobContextTimesPos = new Position(-359, 149, false, true); + + @Expose + @ConfigOption( + name = "Contest Summary", + desc = "Show the average Blocks Per Second and blocks clicked at the end of a Jacob Farming Contest in chat." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean jacobContestSummary = true; + + @Expose + @ConfigOption(name = "Always Finnegan", desc = "Forcefully set the Finnegan Farming Simulator perk to be active. This is useful if the auto mayor detection fails.") + @ConfigEditorBoolean + public boolean forcefullyEnabledAlwaysFinnegan = false; + + @Expose + public Position cropSpeedMeterPos = new Position(278, -236, false, true); + + @Expose + @ConfigOption(name = "Enable Plot Borders", desc = "Enable the use of F3 + G hotkey to show Garden plot borders. Similar to how later Minecraft version render chunk borders.") + @ConfigEditorBoolean + @FeatureToggle + public boolean plotBorders = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenLevelConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenLevelConfig.java new file mode 100644 index 000000000..07f330dcd --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenLevelConfig.java @@ -0,0 +1,18 @@ +package at.hannibal2.skyhanni.config.features.garden; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class GardenLevelConfig { + @Expose + @ConfigOption(name = "Display", desc = "Show the current Garden level and progress to the next level.") + @ConfigEditorBoolean + @FeatureToggle + public boolean display = true; + + @Expose + public Position pos = new Position(390, 40, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/KeyBindConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/KeyBindConfig.java new file mode 100644 index 000000000..c016cac7c --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/KeyBindConfig.java @@ -0,0 +1,87 @@ +package at.hannibal2.skyhanni.config.features.garden; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorButton; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import net.minecraft.client.Minecraft; +import org.lwjgl.input.Keyboard; + +public class KeyBindConfig { + @Expose + @ConfigOption(name = "Enabled", desc = "Use custom keybinds while holding a farming tool or Daedalus Axe in the hand.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @ConfigOption(name = "Disable All", desc = "Disable all keys.") + @ConfigEditorButton(buttonText = "Disable") + public Runnable presetDisable = () -> { + attack = Keyboard.KEY_NONE; + useItem = Keyboard.KEY_NONE; + left = Keyboard.KEY_NONE; + right = Keyboard.KEY_NONE; + forward = Keyboard.KEY_NONE; + back = Keyboard.KEY_NONE; + jump = Keyboard.KEY_NONE; + sneak = Keyboard.KEY_NONE; + + Minecraft.getMinecraft().thePlayer.closeScreen(); + }; + + @ConfigOption(name = "Set Default", desc = "Reset all keys to default.") + @ConfigEditorButton(buttonText = "Default") + public Runnable presetDefault = () -> { + attack = -100; + useItem = -99; + left = Keyboard.KEY_A; + right = Keyboard.KEY_D; + forward = Keyboard.KEY_W; + back = Keyboard.KEY_S; + jump = Keyboard.KEY_SPACE; + sneak = Keyboard.KEY_LSHIFT; + Minecraft.getMinecraft().thePlayer.closeScreen(); + }; + + @Expose + @ConfigOption(name = "Attack", desc = "") + @ConfigEditorKeybind(defaultKey = -100) + public int attack = -100; + + @Expose + @ConfigOption(name = "Use Item", desc = "") + @ConfigEditorKeybind(defaultKey = -99) + public int useItem = -99; + + @Expose + @ConfigOption(name = "Move Left", desc = "") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_A) + public int left = Keyboard.KEY_A; + + @Expose + @ConfigOption(name = "Move Right", desc = "") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_D) + public int right = Keyboard.KEY_D; + + @Expose + @ConfigOption(name = "Move Forward", desc = "") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_W) + public int forward = Keyboard.KEY_W; + + @Expose + @ConfigOption(name = "Move Back", desc = "") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_S) + public int back = Keyboard.KEY_S; + + @Expose + @ConfigOption(name = "Jump", desc = "") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_SPACE) + public int jump = Keyboard.KEY_SPACE; + + @Expose + @ConfigOption(name = "Sneak", desc = "") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_LSHIFT) + public int sneak = Keyboard.KEY_LSHIFT; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/MoneyPerHourConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/MoneyPerHourConfig.java new file mode 100644 index 000000000..5606e5e3d --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/MoneyPerHourConfig.java @@ -0,0 +1,126 @@ +package at.hannibal2.skyhanni.config.features.garden; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class MoneyPerHourConfig { + @Expose + @ConfigOption(name = "Show Money per Hour", + desc = "Displays the money per hour YOU get with YOUR crop/minute value when selling the item to bazaar. " + + "Supports Bountiful, Mushroom Cow Perk, Armor Crops and Dicer Drops. Their toggles are below.") + @ConfigEditorBoolean + @FeatureToggle + public boolean display = true; + + // TODO moulconfig runnable support + @Expose + @ConfigOption(name = "Only Show Top", desc = "Only show the best # items.") + @ConfigEditorSlider( + minValue = 1, + maxValue = 25, + minStep = 1 + ) + public int showOnlyBest = 5; + + @Expose + @ConfigOption(name = "Extend Top List", desc = "Add current crop to the list if its lower ranked than the set limit by extending the list.") + @ConfigEditorBoolean + public boolean showCurrent = true; + + // TODO moulconfig runnable support + @Expose + @ConfigOption( + name = "Always On", + desc = "Always show the money/hour Display while on the garden.") + @ConfigEditorBoolean + public boolean alwaysOn = false; + + @Expose + @ConfigOption( + name = "Compact Mode", + desc = "Hide the item name and the position number.") + @ConfigEditorBoolean + public boolean compact = false; + + @Expose + @ConfigOption( + name = "Compact Price", + desc = "Show the price more compact.") + @ConfigEditorBoolean + public boolean compactPrice = false; + + @Expose + @ConfigOption( + name = "Use Custom", + desc = "Use the custom format below instead of classic ➜ §eSell Offer §7and other profiles ➜ §eNPC Price.") + @ConfigEditorBoolean + public boolean useCustomFormat = false; + + @Expose + @ConfigOption( + name = "Custom Format", + desc = "Set what prices to show") + @ConfigEditorDraggableList( + exampleText = { + "§eSell Offer", + "§eInstant Sell", + "§eNPC Price" + }, + requireNonEmpty = true + ) + public List customFormat = new ArrayList<>(Arrays.asList(0, 1, 2)); + + @Expose + @ConfigOption( + name = "Merge Seeds", + desc = "Merge the seeds price with the wheat price.") + @ConfigEditorBoolean + public boolean mergeSeeds = true; + + @Expose + @ConfigOption( + name = "Include Bountiful", + desc = "Includes the coins from Bountiful in the calculation.") + @ConfigEditorBoolean + public boolean bountiful = true; + + @Expose + @ConfigOption( + name = "Include Mooshroom Cow", + desc = "Includes the coins you get from selling the mushrooms from your Mooshroom Cow pet.") + @ConfigEditorBoolean + public boolean mooshroom = true; + + @Expose + @ConfigOption( + name = "Include Armor Drops", + desc = "Includes the average coins/hr from your armor.") + @ConfigEditorBoolean + public boolean armor = true; + + @Expose + @ConfigOption( + name = "Include Dicer Drops", + desc = "Includes the average coins/hr from your melon or pumpkin dicer.") + @ConfigEditorBoolean + public boolean dicer = true; + + @Expose + @ConfigOption( + name = "Hide Title", + desc = "Hides the first line of 'Money Per Hour' entirely.") + @ConfigEditorBoolean + public boolean hideTitle = false; + + @Expose + public Position pos = new Position(-330, 170, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/NextJacobContestConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/NextJacobContestConfig.java new file mode 100644 index 000000000..f9b0f80e4 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/NextJacobContestConfig.java @@ -0,0 +1,59 @@ +package at.hannibal2.skyhanni.config.features.garden; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class NextJacobContestConfig { + @Expose + @ConfigOption(name = "Show Jacob's Contest", desc = "Show the current or next Jacob's farming contest time and crops.") + @ConfigEditorBoolean + @FeatureToggle + public boolean display = true; + + @Expose + @ConfigOption(name = "Outside Garden", desc = "Show the timer not only in Garden but everywhere in SkyBlock.") + @ConfigEditorBoolean + public boolean everywhere = false; + + @Expose + @ConfigOption(name = "In Other Guis", desc = "Mark the current or next Farming Contest crops in other farming GUIs as underlined.") + @ConfigEditorBoolean + public boolean otherGuis = false; + + @Expose + @ConfigOption(name = "Fetch Contests", desc = "Automatically fetch Contests from elitebot.dev for the current year if they're uploaded already.") + @ConfigEditorBoolean + public boolean fetchAutomatically = true; + + @Expose + @ConfigOption(name = "Share Contests", desc = "Share the list of upcoming Contests to elitebot.dev for everyone else to then fetch automatically.") + @ConfigEditorDropdown(values = {"Ask When Needed", "Share Automatically", "Disabled"}) + public int shareAutomatically = 0; + + @Expose + @ConfigOption(name = "Warning", desc = "Show a warning shortly before a new Jacob's Contest starts.") + @ConfigEditorBoolean + public boolean warn = false; + + @Expose + @ConfigOption(name = "Warning Time", desc = "Set the warning time in seconds before a Jacob's Contest begins.") + @ConfigEditorSlider( + minValue = 10, + maxValue = 60 * 5, + minStep = 1 + ) + public int warnTime = 60 * 2; + + @Expose + @ConfigOption(name = "Popup Warning", desc = "Opens a popup when the warning time is reached and Minecraft is not in focus.") + @ConfigEditorBoolean + public boolean warnPopup = false; + + @Expose + public Position pos = new Position(-200, 10, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/NumbersConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/NumbersConfig.java new file mode 100644 index 000000000..106af45c8 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/NumbersConfig.java @@ -0,0 +1,32 @@ +package at.hannibal2.skyhanni.config.features.garden; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class NumbersConfig { + @Expose + @ConfigOption(name = "Crop Milestone", desc = "Show the number of crop milestones in the inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean cropMilestone = true; + + @Expose + @ConfigOption(name = "Average Milestone", desc = "Show the average crop milestone in the crop milestone inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean averageCropMilestone = true; + + @Expose + @ConfigOption(name = "Crop Upgrades", desc = "Show the number of upgrades in the crop upgrades inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean cropUpgrades = true; + + @Expose + @ConfigOption(name = "Composter Upgrades", desc = "Show the number of upgrades in the Composter upgrades inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean composterUpgrades = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/PlotIconConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/PlotIconConfig.java new file mode 100644 index 000000000..cb47862a2 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/PlotIconConfig.java @@ -0,0 +1,24 @@ +package at.hannibal2.skyhanni.config.features.garden; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.features.garden.inventory.GardenPlotIcon; +import at.hannibal2.skyhanni.utils.LorenzUtils; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorButton; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class PlotIconConfig { + @Expose + @ConfigOption(name = "Enable", desc = "Enable icon replacement in the Configure Plots menu.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @ConfigOption(name = "Hard Reset", desc = "Reset every slot to its original item.") + @ConfigEditorButton(buttonText = "Reset") + public Runnable hardReset = () -> { + GardenPlotIcon.INSTANCE.setHardReset(true); + LorenzUtils.INSTANCE.sendCommandToServer("desk"); + }; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/SkyMartConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/SkyMartConfig.java new file mode 100644 index 000000000..7dfd94b34 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/SkyMartConfig.java @@ -0,0 +1,23 @@ +package at.hannibal2.skyhanni.config.features.garden; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class SkyMartConfig { + @Expose + @ConfigOption(name = "Copper Price", desc = "Show copper to coin prices inside the SkyMart inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean copperPrice = true; + + @Expose + @ConfigOption(name = "Advanced Stats", desc = "Show the BIN price and copper price for every item.") + @ConfigEditorBoolean + public boolean copperPriceAdvancedStats = false; + + @Expose + public Position copperPricePos = new Position(211, 132, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/TooltipTweaksConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/TooltipTweaksConfig.java new file mode 100644 index 000000000..560fcaaa7 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/TooltipTweaksConfig.java @@ -0,0 +1,47 @@ +package at.hannibal2.skyhanni.config.features.garden; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import org.lwjgl.input.Keyboard; + +public class TooltipTweaksConfig { + @Expose + @ConfigOption( + name = "Compact Descriptions", + desc = "Hides redundant parts of reforge descriptions, generic counter description, and Farmhand perk explanation." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean compactToolTooltips = false; + + @Expose + @ConfigOption( + name = "Breakdown Hotkey", + desc = "When the keybind is pressed, show a breakdown of all fortune sources on a tool." + ) + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_LSHIFT) + public int fortuneTooltipKeybind = Keyboard.KEY_LSHIFT; + + @Expose + @ConfigOption( + name = "Tooltip Format", + desc = "Show crop-specific Farming Fortune in tooltip.\n" + + "§fShow: §7Crop-specific Fortune indicated as §6[+196]\n" + + "§fReplace: §7Edits the total Fortune to include crop-specific Fortune." + ) + @ConfigEditorDropdown(values = {"Default", "Show", "Replace"}) + public int cropTooltipFortune = 1; + + @Expose + @ConfigOption( + name = "Total Crop Milestone", + desc = "Shows the progress bar till maxed crop milestone in the crop milestone inventory." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean cropMilestoneTotalProgress = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/YawPitchDisplayConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/YawPitchDisplayConfig.java new file mode 100644 index 000000000..dd7997fba --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/YawPitchDisplayConfig.java @@ -0,0 +1,64 @@ +package at.hannibal2.skyhanni.config.features.garden; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class YawPitchDisplayConfig { + + @Expose + @ConfigOption(name = "Enable", desc = "Displays yaw and pitch while holding a farming tool. Automatically fades out if there is no movement.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Yaw Precision", desc = "Yaw precision up to specified decimal.") + @ConfigEditorSlider( + minValue = 1, + maxValue = 10, + minStep = 1 + ) + public int yawPrecision = 4; + + @Expose + @ConfigOption(name = "Pitch Precision", desc = "Pitch precision up to specified decimal.") + @ConfigEditorSlider( + minValue = 1, + maxValue = 10, + minStep = 1 + ) + public int pitchPrecision = 4; + + @Expose + @ConfigOption(name = "Display Timeout", desc = "Duration in seconds for which the overlay is being displayed after moving.") + @ConfigEditorSlider( + minValue = 1, + maxValue = 20, + minStep = 1 + ) + public int timeout = 5; + + @Expose + @ConfigOption(name = "Show Without Tool", desc = "Does not require you to hold a tool for the overlay to show.") + @ConfigEditorBoolean + public boolean showWithoutTool = false; + + @Expose + @ConfigOption(name = "Show Outside Garden", desc = "The overlay will work outside of the Garden.") + @ConfigEditorBoolean + public boolean showEverywhere = false; + + @Expose + @ConfigOption(name = "Ignore Timeout", desc = "Ignore the timeout after not moving mouse.") + @ConfigEditorBoolean + public boolean showAlways = false; + + @Expose + public Position pos = new Position(445, 225, false, true); + @Expose + public Position posOutside = new Position(445, 225, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/composter/ComposterConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/composter/ComposterConfig.java new file mode 100644 index 000000000..700c4fc49 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/composter/ComposterConfig.java @@ -0,0 +1,108 @@ +package at.hannibal2.skyhanni.config.features.garden.composter; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class ComposterConfig { + @Expose + @ConfigOption( + name = "Composter Overlay", + desc = "Show organic matter, fuel, and profit prices while inside the Composter Inventory." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean overlay = true; + + @Expose + @ConfigOption(name = "Overlay Price", desc = "Toggle for Bazaar 'buy order' vs 'instant buy' price in composter overlay.") + @ConfigEditorDropdown(values = {"Instant Buy", "Buy Order"}) + public int overlayPriceType = 0; + + @Expose + @ConfigOption(name = "Retrieve From", desc = "Change where to retrieve the materials from in the composter overlay: The Bazaar or Sacks.") + @ConfigEditorDropdown(values = {"Bazaar", "Sacks"}) + public int retrieveFrom = 0; + + @Expose + public Position overlayOrganicMatterPos = new Position(140, 152, false, true); + + @Expose + public Position overlayFuelExtrasPos = new Position(-320, 152, false, true); + + @Expose + @ConfigOption( + name = "Display Element", + desc = "Displays the Compost data from the tab list as GUI element." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean displayEnabled = true; + + @Expose + @ConfigOption( + name = "Outside Garden", + desc = "Show Time till Composter is empty outside Garden" + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean displayOutsideGarden = false; + + @Expose + @ConfigOption( + name = "Composter Warning", + desc = "Warn when the Composter gets close to empty, even outside Garden." + ) + @ConfigEditorBoolean + public boolean warnAlmostClose = false; + + @Expose + @ConfigOption( + name = "Upgrade Price", + desc = "Show the price for the Composter Upgrade in the lore." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean upgradePrice = true; + + @Expose + @ConfigOption( + name = "Round Amount Needed", + desc = "Rounds the amount needed to fill your Composter down so that you don't overspend." + ) + @ConfigEditorBoolean + public boolean roundDown = true; + + @Expose + @ConfigOption( + name = "Highlight Upgrade", + desc = "Highlight Upgrades that can be bought right now." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightUpgrade = true; + + @Expose + @ConfigOption( + name = "Inventory Numbers", + desc = "Show the amount of Organic Matter, Fuel and Composts Available while inside the Composter Inventory." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean inventoryNumbers = true; + + @Expose + @ConfigOption(name = "Notification When Low Composter", desc = "") + @Accordion + public NotifyLowConfig notifyLow = new NotifyLowConfig(); + + @Expose + public Position displayPos = new Position(-390, 10, false, true); + + @Expose + public Position outsideGardenPos = new Position(-363, 13, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/composter/NotifyLowConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/composter/NotifyLowConfig.java new file mode 100644 index 000000000..a854fa6a9 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/composter/NotifyLowConfig.java @@ -0,0 +1,38 @@ +package at.hannibal2.skyhanni.config.features.garden.composter; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class NotifyLowConfig { + @Expose + @ConfigOption(name = "Enable", desc = "Show a notification when Organic Matter or Fuel runs low in your Composter.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Show Title", desc = "Send a title to notify.") + @ConfigEditorBoolean + public boolean title = false; + + @Expose + @ConfigOption(name = "Min Organic Matter", desc = "Warn when Organic Matter is below this value.") + @ConfigEditorSlider( + minValue = 1_000, + maxValue = 80_000, + minStep = 1 + ) + public int organicMatter = 20_000; + + @Expose + @ConfigOption(name = "Min Fuel Cap", desc = "Warn when Fuel is below this value.") + @ConfigEditorSlider( + minValue = 500, + maxValue = 40_000, + minStep = 1 + ) + public int fuel = 10_000; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/cropmilestones/CropMilestonesConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/cropmilestones/CropMilestonesConfig.java new file mode 100644 index 000000000..053ffe900 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/cropmilestones/CropMilestonesConfig.java @@ -0,0 +1,101 @@ +package at.hannibal2.skyhanni.config.features.garden.cropmilestones; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import io.github.moulberry.moulconfig.observer.Property; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class CropMilestonesConfig { + @Expose + @ConfigOption( + name = "Progress Display", + desc = "Shows the progress and ETA until the next crop milestone is reached and the current crops/minute value. " + + "§eRequires a tool with either a counter or Cultivating enchantment for full accuracy." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean progress = true; + + @Expose + @ConfigOption( + name = "Warn When Close", + desc = "Warn with title and sound when the next crop milestone upgrade happens in 5 seconds. " + + "Useful for switching to a different pet for leveling.") + @ConfigEditorBoolean + public boolean warnClose = false; + + @Expose + @ConfigOption( + name = "Time Format", + desc = "Change the highest time unit to show (1h30m vs 90min)") + @ConfigEditorDropdown(values = {"Year", "Day", "Hour", "Minute", "Second"}) + public Property highestTimeFormat = Property.of(0); + + @Expose + @ConfigOption( + name = "Maxed Milestone", + desc = "Calculate the progress and ETA till maxed milestone (46) instead of next milestone.") + @ConfigEditorBoolean + public Property bestShowMaxedNeeded = Property.of(false); + + @Expose + @ConfigOption( + name = "Milestone Text", + desc = "Drag text to change the appearance of the overlay.\n" + + "Hold a farming tool to show the overlay." + ) + @ConfigEditorDraggableList( + exampleText = { + "§6Crop Milestones", + "§7Pumpkin Tier 22", + "§e12,300§8/§e100,000", + "§7In §b12m 34s", + "§7Crops/Minute§8: §e12,345", + "§7Blocks/Second§8: §e19.85", + "§7Percentage: §e12.34%", + } + ) + public List text = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5)); + + @Expose + @ConfigOption(name = "Block Broken Precision", desc = "The amount of decimals displayed in blocks/second.") + @ConfigEditorSlider( + minValue = 0, + maxValue = 6, + minStep = 1 + ) + public int blocksBrokenPrecision = 2; + + @Expose + @ConfigOption(name = "Seconds Before Reset", desc = "How many seconds of not farming until blocks/second resets.") + @ConfigEditorSlider( + minValue = 2, + maxValue = 60, + minStep = 1 + ) + public int blocksBrokenResetTime = 5; + + @Expose + public Position progressDisplayPos = new Position(-400, -200, false, true); + + @Expose + @ConfigOption(name = "Best Crop", desc = "") + @Accordion + public NextConfig next = new NextConfig(); + + @Expose + @ConfigOption(name = "Mushroom Pet Perk", desc = "") + @Accordion + public MushroomPetPerkConfig mushroomPetPerk = new MushroomPetPerkConfig(); + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/cropmilestones/MushroomPetPerkConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/cropmilestones/MushroomPetPerkConfig.java new file mode 100644 index 000000000..66ef83a4c --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/cropmilestones/MushroomPetPerkConfig.java @@ -0,0 +1,43 @@ +package at.hannibal2.skyhanni.config.features.garden.cropmilestones; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +// TODO moulconfig runnable support +public class MushroomPetPerkConfig { + @Expose + @ConfigOption( + name = "Display Enabled", + desc = "Show the progress and ETA for mushroom crops when farming other crops because of the Mooshroom Cow perk.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption( + name = "Mushroom Text", + desc = "Drag text to change the appearance of the overlay.\n" + + "Hold a farming tool to show the overlay." + ) + @ConfigEditorDraggableList( + exampleText = { + "§6Mooshroom Cow Perk", + "§7Mushroom Tier 8", + "§e6,700§8/§e15,000", + "§7In §b12m 34s", + "§7Percentage: §e12.34%", + } + ) + public List text = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + + @Expose + public Position pos = new Position(-112, -143, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/cropmilestones/NextConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/cropmilestones/NextConfig.java new file mode 100644 index 000000000..6dcd047a9 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/cropmilestones/NextConfig.java @@ -0,0 +1,66 @@ +package at.hannibal2.skyhanni.config.features.garden.cropmilestones; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +// TODO moulconfig runnable support +public class NextConfig { + @Expose + @ConfigOption( + name = "Best Display", + desc = "Lists all crops and their ETA till next milestone. Sorts for best crop for getting garden or SkyBlock levels.") + @ConfigEditorBoolean + @FeatureToggle + public boolean bestDisplay = true; + + // TODO moulconfig runnable support + @Expose + @ConfigOption(name = "Sort Type", desc = "Sort the crops by either garden or SkyBlock EXP.") + @ConfigEditorDropdown(values = {"Garden Exp", "SkyBlock Exp"}) + public int bestType = 0; + + // TODO moulconfig runnable support + @Expose + @ConfigOption(name = "Only Show Top", desc = "Only show the top # crops.") + @ConfigEditorSlider( + minValue = 1, + maxValue = 10, + minStep = 1 + ) + public int showOnlyBest = 10; + + @Expose + @ConfigOption(name = "Extend Top List", desc = "Add current crop to the list if its lower ranked than the set limit by extending the list.") + @ConfigEditorBoolean + public boolean showCurrent = true; + + // TODO moulconfig runnable support + @Expose + @ConfigOption( + name = "Always On", + desc = "Show the Best Display always while on the garden.") + @ConfigEditorBoolean + public boolean bestAlwaysOn = false; + + @Expose + @ConfigOption( + name = "Compact Display", + desc = "A more compact best crop time: Removing the crop name and exp, hide the # number and using a more compact time format.") + @ConfigEditorBoolean + public boolean bestCompact = false; + + @Expose + @ConfigOption( + name = "Hide Title", + desc = "Hides the 'Best Crop Time' line entirely.") + @ConfigEditorBoolean + public boolean bestHideTitle = false; + + @Expose + public Position displayPos = new Position(-200, -200, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/optimalspeed/CustomSpeedConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/optimalspeed/CustomSpeedConfig.java new file mode 100644 index 000000000..615883c96 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/optimalspeed/CustomSpeedConfig.java @@ -0,0 +1,79 @@ +package at.hannibal2.skyhanni.config.features.garden.optimalspeed; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class CustomSpeedConfig { + + @Expose + @ConfigOption(name = "Wheat", desc = "Suggested farm speed:\n" + + "§e5 Blocks§7: §f✦ 93 speed\n" + + "§e4 Blocks§7: §f✦ 116 speed") + @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) + public int wheat = 93; + + @Expose + @ConfigOption(name = "Carrot", desc = "Suggested farm speed:\n" + + "§e5 Blocks§7: §f✦ 93 speed\n" + + "§e4 Blocks§7: §f✦ 116 speed") + @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) + public int carrot = 93; + + @Expose + @ConfigOption(name = "Potato", desc = "Suggested farm speed:\n" + + "§e5 Blocks§7: §f✦ 93 speed\n" + + "§e4 Blocks§7: §f✦ 116 speed") + @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) + public int potato = 93; + + @Expose + @ConfigOption(name = "Nether Wart", desc = "Suggested farm speed:\n" + + "§e5 Blocks§7: §f✦ 93 speed\n" + + "§e4 Blocks§7: §f✦ 116 speed") + @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) + public int netherWart = 93; + + @Expose + @ConfigOption(name = "Pumpkin", desc = "Suggested farm speed:\n" + + "§e3 Blocks§7: §f✦ 155 speed\n" + + "§e2 Blocks§7: §f✦ 265 §7or §f400 speed") + @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) + public int pumpkin = 155; + + @Expose + @ConfigOption(name = "Melon", desc = "Suggested farm speed:\n" + + "§e3 Blocks§7: §f✦ 155 speed\n" + + "§e2 Blocks§7: §f✦ 265 or 400 speed") + @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) + public int melon = 155; + + @Expose + @ConfigOption(name = "Cocoa Beans", desc = "Suggested farm speed:\n" + + "§e3 Blocks§7: §f✦ 155 speed\n" + + "§e4 Blocks§7: §f✦ 116 speed") + @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) + public int cocoaBeans = 155; + + // TODO does other speed settings exist? + @Expose + @ConfigOption(name = "Sugar Cane", desc = "Suggested farm speed:\n" + + "§eYaw 45§7: §f✦ 328 speed") + @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) + public int sugarCane = 328; + + @Expose + @ConfigOption(name = "Cactus", desc = "Suggested farm speed:\n" + + "§eNormal§7: §f✦ 400 speed\n" + + "§eRacing Helmet§7: §f✦ 464 speed\n" + + "§eBlack Cat§7: §f✦ 464 speed") + @ConfigEditorSlider(minValue = 1, maxValue = 500, minStep = 1) + public int cactus = 400; + + // TODO does other speed settings exist? + @Expose + @ConfigOption(name = "Mushroom", desc = "Suggested farm speed:\n" + + "§eYaw 60§7: §f✦ 233 speed") + @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) + public int mushroom = 233; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/optimalspeed/OptimalSpeedConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/optimalspeed/OptimalSpeedConfig.java new file mode 100644 index 000000000..385d7907f --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/optimalspeed/OptimalSpeedConfig.java @@ -0,0 +1,39 @@ +package at.hannibal2.skyhanni.config.features.garden.optimalspeed; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class OptimalSpeedConfig { + @Expose + @ConfigOption(name = "Enabled", desc = "Show the optimal speed for your current tool in the hand.\n" + + "(Thanks MelonKingDE for the default values).") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Warning Title", desc = "Warn via title when you don't have the optimal speed.") + @ConfigEditorBoolean + public boolean warning = false; + + @Expose + @ConfigOption(name = "Rancher Boots", desc = "Allows you to set the optimal speed in the Rancher Boots overlay by clicking on the presets.") + @ConfigEditorBoolean + @FeatureToggle + public boolean signEnabled = true; + + @Expose + public Position signPosition = new Position(20, -195, false, true); + + @Expose + @ConfigOption(name = "Custom Speed", desc = "Change the exact speed for every single crop.") + @Accordion + public CustomSpeedConfig customSpeed = new CustomSpeedConfig(); + + @Expose + public Position pos = new Position(5, -200, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/DropsStatisticsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/DropsStatisticsConfig.java new file mode 100644 index 000000000..7fd332d25 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/DropsStatisticsConfig.java @@ -0,0 +1,78 @@ +package at.hannibal2.skyhanni.config.features.garden.visitor; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class DropsStatisticsConfig { + + @Expose + @ConfigOption( + name = "Enabled", + desc = "Tallies up statistic about visitors and the rewards you have received from them." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption( + name = "Text Format", + desc = "Drag text to change the appearance of the overlay." + ) + @ConfigEditorDraggableList( + exampleText = { + "§e§lVisitor Statistics", + "§e1,636 Total", + "§a1,172§f-§9382§f-§681§f-§c1", + "§21,382 Accepted", + "§c254 Denied", + " ", + "§c62,072 Copper", + "§33.2m Farming EXP", + "§647.2m Coins Spent", + "§b23 §9Flowering Bouquet", + "§b4 §9Overgrown Grass", + "§b2 §5Green Bandana", + "§b1 §9Dedication IV", + "§b6 §b◆ Music Rune I", + "§b1 §cSpace Helmet", + "§b1 §9Cultivating I", + "§b1 §9Replenish I", + " ", // If they want another empty row + "§212,600 Garden EXP", + "§b4.2k Bits", + "§220k Mithril Powder", + "§d18k Gemstone Powder", + } + ) + public List textFormat = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12)); + + + @Expose + @ConfigOption(name = "Display Numbers First", desc = "Determines whether the number or drop name displays first. " + + "§eNote: Will not update the preview above!") + @ConfigEditorBoolean + public boolean displayNumbersFirst = true; + + @Expose + @ConfigOption(name = "Display Icons", desc = "Replaces the drop names with icons. " + + "§eNote: Will not update the preview above!") + @ConfigEditorBoolean + public boolean displayIcons = false; + + @Expose + @ConfigOption(name = "Only on Barn Plot", desc = "Only shows the overlay while on the Barn plot.") + @ConfigEditorBoolean + public boolean onlyOnBarn = true; + + @Expose + public Position pos = new Position(5, 20, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/InventoryConfig.java new file mode 100644 index 000000000..5c671d4e7 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/InventoryConfig.java @@ -0,0 +1,37 @@ +package at.hannibal2.skyhanni.config.features.garden.visitor; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class InventoryConfig { + @Expose + @ConfigOption(name = "Visitor Price", desc = "Show the Bazaar price of the items required for the visitors, like in NEU.") + @ConfigEditorBoolean + @FeatureToggle + public boolean showPrice = false; + + @Expose + @ConfigOption(name = "Amount and Time", desc = "Show the exact item amount and the remaining time when farmed manually. Especially useful for Ironman.") + @ConfigEditorBoolean + public boolean exactAmountAndTime = true; + + @Expose + @ConfigOption(name = "Copper Price", desc = "Show the price per copper inside the visitor GUI.") + @ConfigEditorBoolean + @FeatureToggle + public boolean copperPrice = true; + + @Expose + @ConfigOption(name = "Copper Time", desc = "Show the time required per copper inside the visitor GUI.") + @ConfigEditorBoolean + @FeatureToggle + public boolean copperTime = false; + + @Expose + @ConfigOption(name = "Garden Exp Price", desc = "Show the price per garden experience inside the visitor GUI.") + @ConfigEditorBoolean + @FeatureToggle + public boolean experiencePrice = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/NeedsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/NeedsConfig.java new file mode 100644 index 000000000..b60b6207f --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/NeedsConfig.java @@ -0,0 +1,40 @@ +package at.hannibal2.skyhanni.config.features.garden.visitor; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class NeedsConfig { + @Expose + @ConfigOption(name = "Items Needed", desc = "Show all items needed for the visitors.") + @ConfigEditorBoolean + @FeatureToggle + public boolean display = true; + + @Expose + public Position pos = new Position(180, 170, false, true); + + @Expose + @ConfigOption(name = "Only when Close", desc = "Only show the needed items when close to the visitors.") + @ConfigEditorBoolean + public boolean onlyWhenClose = false; + + @Expose + @ConfigOption(name = "Bazaar Alley", desc = "Show the Visitor Items List while inside the Bazaar Alley in the Hub. " + + "This helps buying the correct amount when not having a Booster Cookie Buff active.") + @ConfigEditorBoolean + public boolean inBazaarAlley = true; + + @Expose + @ConfigOption(name = "Show Price", desc = "Show the coin price in the items needed list.") + @ConfigEditorBoolean + public boolean showPrice = true; + + @Expose + @ConfigOption(name = "Item Preview", desc = "Show the base type for the required items next to new visitors. §cNote that some visitors may require any crop.") + @ConfigEditorBoolean + @FeatureToggle + public boolean itemPreview = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/RewardWarningConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/RewardWarningConfig.java new file mode 100644 index 000000000..f83fc5518 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/RewardWarningConfig.java @@ -0,0 +1,62 @@ +package at.hannibal2.skyhanni.config.features.garden.visitor; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import org.lwjgl.input.Keyboard; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class RewardWarningConfig { + + @Expose + @ConfigOption(name = "Notify in Chat", desc = "Send a chat message once you talk to a visitor with reward.") + @ConfigEditorBoolean + @FeatureToggle + public boolean notifyInChat = true; + + @Expose + @ConfigOption(name = "Show over Name", desc = "Show the reward name above the visitor name.") + @ConfigEditorBoolean + @FeatureToggle + public boolean showOverName = true; + + @Expose + @ConfigOption(name = "Prevent Refusing", desc = "Prevent the refusal of a visitor with reward.") + @ConfigEditorBoolean + @FeatureToggle + public boolean preventRefusing = true; + + @Expose + @ConfigOption(name = "Bypass Key", desc = "Hold that key to bypass the Prevent Refusing feature.") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int bypassKey = Keyboard.KEY_NONE; + + + /** + * Sync up with {at.hannibal2.skyhanni.features.garden.visitor.VisitorReward} + */ + @Expose + @ConfigOption( + name = "Items", + desc = "Warn for these reward items." + ) + @ConfigEditorDraggableList( + exampleText = { + "§9Flowering Bouquet", + "§9Overgrown Grass", + "§9Green Bandana", + "§9Dedication IV", + "§9Music Rune", + "§cSpace Helmet", + "§9Cultivating I", + "§9Replenish I", + } + ) + public List drops = new ArrayList<>(Arrays.asList(1, 2, 3, 4, 5, 6)); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/TimerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/TimerConfig.java new file mode 100644 index 000000000..d85f7d048 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/TimerConfig.java @@ -0,0 +1,37 @@ +package at.hannibal2.skyhanni.config.features.garden.visitor; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class TimerConfig { + @Expose + @ConfigOption(name = "Visitor Timer", desc = "Timer when the next visitor will appear, " + + "and a number for how many visitors are already waiting.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Sixth Visitor Estimate", desc = "Estimate when the sixth visitor in the queue will arrive. " + + "May be inaccurate with co-op members farming simultaneously.") + @ConfigEditorBoolean + public boolean sixthVisitorEnabled = true; + + @Expose + @ConfigOption(name = "Sixth Visitor Warning", desc = "Notifies when it is believed that the sixth visitor has arrived. " + + "May be inaccurate with co-op members farming simultaneously.") + @ConfigEditorBoolean + public boolean sixthVisitorWarning = true; + + @Expose + @ConfigOption(name = "New Visitor Ping", desc = "Pings you when you are less than 10 seconds away from getting a new visitor. " + + "§eUseful for getting Ephemeral Gratitudes during the 2023 Halloween event.") + @ConfigEditorBoolean + public boolean newVisitorPing = false; + + @Expose + public Position pos = new Position(390, 65, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/VisitorConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/VisitorConfig.java new file mode 100644 index 000000000..d010b11d3 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/VisitorConfig.java @@ -0,0 +1,118 @@ +package at.hannibal2.skyhanni.config.features.garden.visitor; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import org.lwjgl.input.Keyboard; + +public class VisitorConfig { + @Expose + @ConfigOption(name = "Visitor Timer", desc = "") + @Accordion + public TimerConfig timer = new TimerConfig(); + + @Expose + @ConfigOption(name = "Visitor Items Needed", desc = "") + @Accordion + public NeedsConfig needs = new NeedsConfig(); + + @Expose + @ConfigOption(name = "Visitor Inventory", desc = "") + @Accordion + public InventoryConfig inventory = new InventoryConfig(); + + @Expose + @ConfigOption(name = "Visitor Reward Warning", desc = "") + @Accordion + public RewardWarningConfig rewardWarning = new RewardWarningConfig(); + + @Expose + @ConfigOption(name = "Notification Chat", desc = "Show in chat when a new visitor is visiting your island.") + @ConfigEditorBoolean + @FeatureToggle + public boolean notificationChat = true; + + @Expose + @ConfigOption(name = "Notification Title", desc = "Show a title when a new visitor is visiting your island.") + @ConfigEditorBoolean + @FeatureToggle + public boolean notificationTitle = true; + + @Expose + @ConfigOption(name = "Highlight Status", desc = "Highlight the status for visitors with a text above or with color.") + @ConfigEditorDropdown(values = {"Color Only", "Name Only", "Both", "Disabled"}) + public int highlightStatus = 2; + + @Expose + @ConfigOption(name = "Colored Name", desc = "Show the visitor name in the color of the rarity.") + @ConfigEditorBoolean + @FeatureToggle + public boolean coloredName = true; + + @Expose + @ConfigOption(name = "Hypixel Message", desc = "Hide the chat message from Hypixel that a new visitor has arrived at your garden.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hypixelArrivedMessage = true; + + @Expose + @ConfigOption(name = "Hide Chat", desc = "Hide chat messages from the visitors in garden. (Except Beth and Spaceman)") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideChat = true; + + @Expose + @ConfigOption(name = "Visitor Drops Statistics Counter", desc = "") + @Accordion + public DropsStatisticsConfig dropsStatistics = new DropsStatisticsConfig(); + + @Expose + @ConfigOption( + name = "Accept Hotkey", + desc = "Accept a visitor when you press this keybind while in the visitor GUI. " + + "§eUseful for getting Ephemeral Gratitudes during the 2023 Halloween event." + ) + @ConfigEditorKeybind( + defaultKey = Keyboard.KEY_NONE + ) + public int acceptHotkey = Keyboard.KEY_NONE; + + + @Expose + @ConfigOption( + name = "Highlight Visitors in SkyBlock", + desc = "Highlights Visitors outside of the Garden" + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightVisitors = false; + + + @Expose + @ConfigOption( + name = "Block Interacting with Visitors", + desc = "Blocks you from interacting with / unlocking Visitors to allow for Dedication Cycling" + ) + @ConfigEditorDropdown + public VisitorBlockBehaviour blockInteracting = VisitorBlockBehaviour.ONLY_ON_BINGO; + + public enum VisitorBlockBehaviour { + DONT("Don't"), ALWAYS("Always"), ONLY_ON_BINGO("Only on Bingo"); + + final String str; + + VisitorBlockBehaviour(String str) { + this.str = str; + } + + @Override + public String toString() { + return str; + } + } + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/GUIConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/GUIConfig.java new file mode 100644 index 000000000..9e1816107 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/GUIConfig.java @@ -0,0 +1,74 @@ +package at.hannibal2.skyhanni.config.features.gui; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import at.hannibal2.skyhanni.data.GuiEditManager; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorButton; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import org.lwjgl.input.Keyboard; + +public class GUIConfig { + + @ConfigOption(name = "Edit GUI Locations", desc = "Change the position of SkyHanni's overlays.") + @ConfigEditorButton(buttonText = "Edit") + public Runnable positions = GuiEditManager::openGuiPositionEditor; + + @Expose + @ConfigOption(name = "Open Hotkey", desc = "Press this key to open the GUI Editor.") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int keyBindOpen = Keyboard.KEY_NONE; + + @Expose + @ConfigOption(name = "Global GUI Scale", desc = "Globally scale all SkyHanni GUIs.") + @ConfigEditorSlider(minValue = 0.1F, maxValue = 10, minStep = 0.05F) + public float globalScale = 1F; + + @Expose + @ConfigOption(name = "Modify Visual Words", desc = "") + @Accordion + public ModifyWordsConfig modifyWords = new ModifyWordsConfig(); + + @Expose + @ConfigOption(name = "Custom Text Box", desc = "") + @Accordion + public TextBoxConfig customTextBox = new TextBoxConfig(); + + @Expose + @ConfigOption(name = "Real Time", desc = "Display the current computer time, a handy feature when playing in full-screen mode.") + @ConfigEditorBoolean + @FeatureToggle + public boolean realTime = false; + + @Expose + @ConfigOption(name = "Real Time 12h Format", desc = "Display the current computer time in 12hr Format rather than 24h Format.") + @ConfigEditorBoolean + public boolean realTimeFormatToggle = false; + + @Expose + public Position realTimePosition = new Position(10, 10, false, true); + + @Expose + @ConfigOption(name = "In-Game Date", desc = "") + @Accordion + public InGameDateConfig inGameDate = new InGameDateConfig(); + + @Expose + @ConfigOption(name = "TPS Display", desc = "Show the TPS of the current server, like in Soopy.") + @ConfigEditorBoolean + @FeatureToggle + public boolean tpsDisplay = false; + + @Expose + public Position tpsDisplayPosition = new Position(10, 10, false, true); + + @Expose + @ConfigOption(name = "Config Button", desc = "Add a button to the pause menu to configure SkyHanni.") + @ConfigEditorBoolean + @FeatureToggle + public boolean configButtonOnPause = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/InGameDateConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/InGameDateConfig.java new file mode 100644 index 000000000..5985e5131 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/InGameDateConfig.java @@ -0,0 +1,63 @@ +package at.hannibal2.skyhanni.config.features.gui; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class InGameDateConfig { + + @Expose + @ConfigOption( + name = "Enabled", + desc = "Show the in-game date of SkyBlock (like in Apec, §ebut with mild delays§7).\n" + + "(Though this one includes the SkyBlock year!)" + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + public Position position = new Position(10, 10, false, true); + + @Expose + @ConfigOption( + name = "Use Scoreboard for Date", + desc = "Uses the scoreboard instead to find the current month, date, and time. Greater \"accuracy\", depending on who's asking." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean useScoreboard = true; + + @Expose + @ConfigOption( + name = "Show Sun/Moon", + desc = "Show the sun or moon symbol seen on the scoreboard." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean includeSunMoon = true; + + @Expose + @ConfigOption( + name = "Show Date Ordinal", + desc = "Show the date's ordinal suffix. Ex: (1st <-> 1, 22nd <-> 22, 23rd <-> 3, 24th <-> 24, etc.)" + ) + @ConfigEditorBoolean + public boolean includeOrdinal = false; + + @Expose + @ConfigOption( + name = "Refresh Rate", + desc = "Change the time in seconds you would like to refresh the In-Game Date Display." + + "\n§eNOTE: If \"Use Scoreboard for Date\" is enabled, this setting is ignored." + ) + @ConfigEditorSlider( + minValue = 1, + maxValue = 60, + minStep = 1 + ) + public int refreshSeconds = 30; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/ModifyWordsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/ModifyWordsConfig.java new file mode 100644 index 000000000..498dba83d --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/ModifyWordsConfig.java @@ -0,0 +1,28 @@ +package at.hannibal2.skyhanni.config.features.gui; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.commands.Commands; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorButton; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class ModifyWordsConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Enables replacing all instances of a word or phrase with another word or phrase.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Work Outside SkyBlock", desc = "Allows modifying visual words anywhere on Hypixel.") + @ConfigEditorBoolean + @FeatureToggle + public boolean workOutside = false; + + @ConfigOption(name = "Open Config", desc = "Opens the menu to setup the visual words.\n§eCommand: /shwords") + @ConfigEditorButton(buttonText = "Open") + public Runnable open = Commands::openVisualWords; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/TextBoxConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/TextBoxConfig.java new file mode 100644 index 000000000..134732465 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/TextBoxConfig.java @@ -0,0 +1,26 @@ +package at.hannibal2.skyhanni.config.features.gui; + +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorText; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import io.github.moulberry.moulconfig.observer.Property; + +public class TextBoxConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Enables showing the textbox while in SkyBlock.") + @ConfigEditorBoolean + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Text", desc = "Enter text you want to display here.\n" + + "§eUse '&' as the colour code character.\n" + + "§eUse '\\n' as the line break character.") + @ConfigEditorText + public Property text = Property.of("&aYour Text Here\\n&bYour new line here"); + + @Expose + public Position position = new Position(10, 80, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/ChestValueConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/ChestValueConfig.java new file mode 100644 index 000000000..62eb30385 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/ChestValueConfig.java @@ -0,0 +1,88 @@ +package at.hannibal2.skyhanni.config.features.inventory; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class ChestValueConfig { + @Expose + @ConfigOption(name = "Enabled", desc = "Enable estimated value of chest.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Enabled in dungeons", desc = "Enable the feature in dungeons.") + @ConfigEditorBoolean + public boolean enableInDungeons = false; + + @Expose + @ConfigOption(name = "Enable during Item Value", desc = "Show this display even if the Estimated Item Value is visible.") + @ConfigEditorBoolean + public boolean showDuringEstimatedItemValue = false; + + @Expose + @ConfigOption(name = "Show Stacks", desc = "Show the item icon before name.") + @ConfigEditorBoolean + public boolean showStacks = true; + + @Expose + @ConfigOption(name = "Display Type", desc = "Try to align everything to look nicer.") + @ConfigEditorBoolean + public boolean alignedDisplay = true; + + @Expose + @ConfigOption(name = "Name Length", desc = "Reduce item name length to gain extra space on screen.\n§cCalculated in pixels!") + @ConfigEditorSlider(minStep = 1, minValue = 100, maxValue = 150) + public int nameLength = 100; + + @Expose + @ConfigOption(name = "Highlight Slot", desc = "Highlight slot where the item is when you hover over it in the display.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enableHighlight = true; + + @Expose + @ConfigOption(name = "Highlight Color", desc = "Choose the highlight color.") + @ConfigEditorColour + public String highlightColor = "0:249:0:255:88"; + + @Expose + @ConfigOption(name = "Sorting Type", desc = "Price sorting type.") + @ConfigEditorDropdown(values = {"Descending", "Ascending"}) + public int sortingType = 0; + + @Expose + @ConfigOption(name = "Value formatting Type", desc = "Format of the price.") + @ConfigEditorDropdown(values = {"Short", "Long"}) + public int formatType = 0; + + @Expose + @ConfigOption(name = "Item To Show", desc = "Choose how many items are displayed.\n" + + "All items in the chest are still counted for the total value.") + @ConfigEditorSlider( + minValue = 0, + maxValue = 54, + minStep = 1 + ) + public int itemToShow = 15; + + @Expose + @ConfigOption(name = "Hide below", desc = "Item item value below configured amount.\n" + + "Items are still counted for the total value.") + @ConfigEditorSlider( + minValue = 50_000, + maxValue = 10_000_000, + minStep = 50_000 + ) + public int hideBelow = 100_000; + + + @Expose + public Position position = new Position(107, 141, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/HideNotClickableConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/HideNotClickableConfig.java new file mode 100644 index 000000000..9c0c01602 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/HideNotClickableConfig.java @@ -0,0 +1,43 @@ +package at.hannibal2.skyhanni.config.features.inventory; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class HideNotClickableConfig { + @Expose + @ConfigOption(name = "Enabled", desc = "Hide items that are not clickable in the current inventory: ah, bz, accessory bag, etc.") + @ConfigEditorBoolean + @FeatureToggle + public boolean items = false; + + @Expose + @ConfigOption(name = "Block Clicks", desc = "Block the clicks on these items.") + @ConfigEditorBoolean + public boolean itemsBlockClicks = true; + + @Expose + @ConfigOption( + name = "Opacity", + desc = "How strong should the items be grayed out?" + ) + @ConfigEditorSlider( + minValue = 0, + maxValue = 255, + minStep = 5 + ) + public int opacity = 180; + + @Expose + @ConfigOption(name = "Bypass With Control", desc = "Adds the ability to bypass not clickable items when holding the control key.") + @ConfigEditorBoolean + public boolean itemsBypass = true; + + @Expose + @ConfigOption(name = "Green Line", desc = "Adds green line around items that are clickable.") + @ConfigEditorBoolean + public boolean itemsGreenLine = true; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java new file mode 100644 index 000000000..1794a20d0 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java @@ -0,0 +1,127 @@ +package at.hannibal2.skyhanni.config.features.inventory; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.features.inventory.helper.HelperConfig; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.Category; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class InventoryConfig { + + @Expose + @ConfigOption(name = "Not Clickable Items", desc = "") + @Accordion + public HideNotClickableConfig hideNotClickable = new HideNotClickableConfig(); + + @Expose + @ConfigOption(name = "RNG Meter", desc = "") + @Accordion + public RngMeterConfig rngMeter = new RngMeterConfig(); + + @Expose + @ConfigOption(name = "Stats Tuning", desc = "") + @Accordion + public StatsTuningConfig statsTuning = new StatsTuningConfig(); + + @Expose + @ConfigOption(name = "Jacob Farming Contest", desc = "") + @Accordion + public JacobFarmingContestConfig jacobFarmingContests = new JacobFarmingContestConfig(); + + + @Expose + @ConfigOption(name = "Sack Items Display", desc = "") + @Accordion + public SackDisplayConfig sackDisplay = new SackDisplayConfig(); + + @Expose + @ConfigOption(name = "Chest Value", desc = "") + @Accordion + public ChestValueConfig chestValueConfig = new ChestValueConfig(); + + @Expose + @Category(name = "Helpers", desc = "Settings for Helpers") + public HelperConfig helper = new HelperConfig(); + + @Expose + @ConfigOption( + name = "Item Number", + desc = "Showing the item number as a stack size for these items." + ) + @ConfigEditorDraggableList( + exampleText = { + "§bMaster Star Tier", + "§bMaster Skull Tier", + "§bDungeon Head Floor Number", + "§bNew Year Cake", + "§bPet Level", + "§bMinion Tier", + "§bCrimson Armor", + "§7(Removed)", + "§bKuudra Key", + "§bSkill Level", + "§bCollection Level", + "§bRancher's Boots speed", + "§bLarva Hook", + "§bDungeon Potion Level" + } + ) + public List itemNumberAsStackSize = new ArrayList<>(Arrays.asList(3, 9, 11, 12)); + + @Expose + @ConfigOption( + name = "Quick Craft Confirmation", + desc = "Require Ctrl+Click to craft items that aren't often quick crafted " + + "(e.g. armor, weapons, accessories). Sack items can be crafted normally." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean quickCraftingConfirmation = false; + + @Expose + @ConfigOption(name = "Sack Name", desc = "Show an abbreviation of the sack name.") + @ConfigEditorBoolean + @FeatureToggle + public boolean displaySackName = false; + + @Expose + @ConfigOption(name = "Anvil Combine Helper", desc = "Suggests the same item in the inventory when trying to combine two items in the anvil.") + @ConfigEditorBoolean + @FeatureToggle + public boolean anvilCombineHelper = false; + + @Expose + @ConfigOption(name = "Item Stars", + desc = "Show a compact star count in the item name for all items.") + @ConfigEditorBoolean + @FeatureToggle + public boolean itemStars = false; + + @Expose + @ConfigOption(name = "Missing Tasks", + desc = "Highlight missing tasks in the SkyBlock Level Guide inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightMissingSkyBlockLevelGuide = true; + + @Expose + @ConfigOption(name = "Highlight Auctions", + desc = "Highlight own items that are sold in green and that are expired in red.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightAuctions = true; + + @Expose + @ConfigOption(name = "Shift Click Equipment", desc = "Makes normal clicks to shift clicks in equipment inventory") + @ConfigEditorBoolean + @FeatureToggle + public boolean shiftClickForEquipment = false; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/JacobFarmingContestConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/JacobFarmingContestConfig.java new file mode 100644 index 000000000..dc18bd29d --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/JacobFarmingContestConfig.java @@ -0,0 +1,32 @@ +package at.hannibal2.skyhanni.config.features.inventory; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class JacobFarmingContestConfig { + @Expose + @ConfigOption(name = "Unclaimed Rewards", desc = "Highlight contests with unclaimed rewards in the Jacob inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightRewards = true; + + @Expose + @ConfigOption(name = "Contest Time", desc = "Adds the real time format to the Contest description.") + @ConfigEditorBoolean + @FeatureToggle + public boolean realTime = true; + + @Expose + @ConfigOption(name = "Medal Icon", desc = "Adds a symbol that shows what medal you received in this Contest. " + + "§eIf you use a texture pack this may cause conflicting icons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean medalIcon = true; + + @Expose + @ConfigOption(name = "Finnegan Icon", desc = "Uses a different indicator for when the Contest happened during Mayor Finnegan.") + @ConfigEditorBoolean + public boolean finneganIcon = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/RngMeterConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/RngMeterConfig.java new file mode 100644 index 000000000..e57e95b5c --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/RngMeterConfig.java @@ -0,0 +1,26 @@ +package at.hannibal2.skyhanni.config.features.inventory; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class RngMeterConfig { + @Expose + @ConfigOption(name = "Floor Names", desc = "Show the Floor names in the Catacombs RNG Meter inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean floorName = false; + + @Expose + @ConfigOption(name = "No Drop", desc = "Highlight floors without a drop selected in the Catacombs RNG Meter inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean noDrop = false; + + @Expose + @ConfigOption(name = "Selected Drop", desc = "Highlight the selected drop in the Catacombs or Slayer RNG Meter inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean selectedDrop = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/SackDisplayConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/SackDisplayConfig.java new file mode 100644 index 000000000..37eab2be3 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/SackDisplayConfig.java @@ -0,0 +1,84 @@ +package at.hannibal2.skyhanni.config.features.inventory; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class SackDisplayConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Show contained items inside a sack inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption( + name = "Highlight Full", + desc = "Highlight items that are full in red.\n" + + "§eDoes not need the option above to be enabled." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightFull = true; + + @Expose + @ConfigOption(name = "Number Format", desc = "Either show Default, Formatted or Unformatted numbers.\n" + + "§eDefault: §72,240/2.2k\n" + + "§eFormatted: §72.2k/2.2k\n" + + "§eUnformatted: §72,240/2,200") + @ConfigEditorDropdown(values = {"Default", "Formatted", "Unformatted"}) + public int numberFormat = 1; + + @Expose + @ConfigOption(name = "Extra space", desc = "Space between each line of text.") + @ConfigEditorSlider( + minValue = 0, + maxValue = 10, + minStep = 1) + public int extraSpace = 1; + + @Expose + @ConfigOption(name = "Sorting Type", desc = "Sorting type of items in sack.") + @ConfigEditorDropdown(values = {"Descending (Stored)", "Ascending (Stored)", "Descending (Price)", "Ascending (Price)"}) + public int sortingType = 0; + + @Expose + @ConfigOption(name = "Item To Show", desc = "Choose how many items are displayed. (Some sacks have too many items to fit\n" + + "in larger GUI scales, like the nether sack.)") + @ConfigEditorSlider( + minValue = 0, + maxValue = 45, + minStep = 1 + ) + public int itemToShow = 15; + + @Expose + @ConfigOption(name = "Show Empty Item", desc = "Show empty item quantity in the display.") + @ConfigEditorBoolean + public boolean showEmpty = true; + + @Expose + @ConfigOption(name = "Show Price", desc = "Show price for each item in sack.") + @ConfigEditorBoolean + public boolean showPrice = true; + + @Expose + @ConfigOption(name = "Price Format", desc = "Format of the price displayed.\n" + + "§eFormatted: §7(12k)\n" + + "§eUnformatted: §7(12,421)") + @ConfigEditorDropdown(values = {"Formatted", "Unformatted"}) + public int priceFormat = 0; + + @Expose + @ConfigOption(name = "Show Price From", desc = "Show price from Bazaar or NPC.") + @ConfigEditorDropdown(values = {"Bazaar", "NPC"}) + public int priceFrom = 0; + + @Expose + public Position position = new Position(144, 139, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/StatsTuningConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/StatsTuningConfig.java new file mode 100644 index 000000000..2f6111fee --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/StatsTuningConfig.java @@ -0,0 +1,32 @@ +package at.hannibal2.skyhanni.config.features.inventory; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class StatsTuningConfig { + @Expose + @ConfigOption(name = "Selected Stats", desc = "Show the tuning stats in the Thaumaturgy inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean selectedStats = true; + + @Expose + @ConfigOption(name = "Tuning Points", desc = "Show the amount of selected Tuning Points in the Stats Tuning inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean points = true; + + @Expose + @ConfigOption(name = "Selected Template", desc = "Highlight the selected template in the Stats Tuning inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean selectedTemplate = true; + + @Expose + @ConfigOption(name = "Template Stats", desc = "Show the type of stats for the Tuning Point templates.") + @ConfigEditorBoolean + @FeatureToggle + public boolean templateStats = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/HarpConfigKeyBinds.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/HarpConfigKeyBinds.java new file mode 100644 index 000000000..fcdac1d57 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/HarpConfigKeyBinds.java @@ -0,0 +1,37 @@ +package at.hannibal2.skyhanni.config.features.inventory.helper; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import org.lwjgl.input.Keyboard; + +public class HarpConfigKeyBinds { + @Expose + @ConfigOption(name = "Key 1", desc = "Key for the first Node") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_1) + public int key1 = Keyboard.KEY_1; + @Expose + @ConfigOption(name = "Key 2", desc = "Key for the second Node") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_2) + public int key2 = Keyboard.KEY_2; + @Expose + @ConfigOption(name = "Key 3", desc = "Key for the third Node") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_3) + public int key3 = Keyboard.KEY_3; + @Expose + @ConfigOption(name = "Key 4", desc = "Key for the fourth Node") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_4) + public int key4 = Keyboard.KEY_4; + @Expose + @ConfigOption(name = "Key 5", desc = "Key for the fifth Node") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_5) + public int key5 = Keyboard.KEY_5; + @Expose + @ConfigOption(name = "Key 6", desc = "Key for the sixth Node") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_6) + public int key6 = Keyboard.KEY_6; + @Expose + @ConfigOption(name = "Key 7", desc = "Key for the seventh Node") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_7) + public int key7 = Keyboard.KEY_7; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/HelperConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/HelperConfig.java new file mode 100644 index 000000000..02c06f39a --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/HelperConfig.java @@ -0,0 +1,37 @@ +package at.hannibal2.skyhanni.config.features.inventory.helper; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class HelperConfig { + @Expose + @ConfigOption(name = "Melody's Hair Harp", desc = "") + @Accordion + public HarpConfig harp = new HarpConfig(); + + public static class HarpConfig { + @Expose + @ConfigOption(name = "Use Keybinds", desc = "In the Harp, press buttons with your number row on the keyboard instead of clicking.") + @ConfigEditorBoolean + @FeatureToggle + public boolean keybinds = false; + + @Expose + @ConfigOption(name = "Show Numbers", desc = "In the Harp, show buttons as stack size (intended to be used with the Keybinds).") + @ConfigEditorBoolean + public boolean showNumbers = false; + + @Expose + @ConfigOption(name = "Keybinds", desc = "") + @Accordion + public HarpConfigKeyBinds harpKeybinds = new HarpConfigKeyBinds(); + } + + @Expose + @ConfigOption(name = "Tia Relay Abiphone Network Maintenance", desc = "") + @Accordion + public TiaRelayConfig tiaRelay = new TiaRelayConfig(); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/TiaRelayConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/TiaRelayConfig.java new file mode 100644 index 000000000..78480b4df --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/TiaRelayConfig.java @@ -0,0 +1,32 @@ +package at.hannibal2.skyhanni.config.features.inventory.helper; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class TiaRelayConfig { + + @Expose + @ConfigOption(name = "Sound Puzzle Helper", desc = "Helps with solving the sound puzzle for Tia (The 9 Operator Chips to do maintainance for the Abiphone Network).") + @ConfigEditorBoolean + @FeatureToggle + public boolean soundHelper = true; + + @Expose + @ConfigOption(name = "Next Waypoint", desc = "Show the next relay waypoint for Tia the Fairy, where maintenance for the Abiphone network needs to be done.") + @ConfigEditorBoolean + @FeatureToggle + public boolean nextWaypoint = true; + + @Expose + @ConfigOption(name = "All Waypoints", desc = "Show all relay waypoints at once (intended for debugging).") + @ConfigEditorBoolean + public boolean allWaypoints = false; + + @Expose + @ConfigOption(name = "Mute Sound", desc = "Mutes the sound when close to the relay.") + @ConfigEditorBoolean + @FeatureToggle + public boolean tiaRelayMute = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/itemability/ChickenHeadConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/itemability/ChickenHeadConfig.java new file mode 100644 index 000000000..49c803cd5 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/itemability/ChickenHeadConfig.java @@ -0,0 +1,25 @@ +package at.hannibal2.skyhanni.config.features.itemability; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class ChickenHeadConfig { + + @Expose + @ConfigOption(name = "Checken Head Timer", desc = "Show the cooldown until the next time you can lay an egg with the Chicken Head.") + @ConfigEditorBoolean + @FeatureToggle + public boolean displayTimer = false; + + @Expose + public Position position = new Position(-372, 73, false, true); + + @Expose + @ConfigOption(name = "Hide Chat", desc = "Hide the 'You laid an egg!' chat message.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideChat = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/itemability/FireVeilWandConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/itemability/FireVeilWandConfig.java new file mode 100644 index 000000000..a05558d94 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/itemability/FireVeilWandConfig.java @@ -0,0 +1,21 @@ +package at.hannibal2.skyhanni.config.features.itemability; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class FireVeilWandConfig { + @Expose + @ConfigOption(name = "Fire Veil Design", desc = "Changes the flame particles of the Fire Veil Wand ability.") + @ConfigEditorDropdown(values = {"Particles", "Line", "Off"}) + public int display = 0; + + @Expose + @ConfigOption( + name = "Line Color", + desc = "Changes the color of the Fire Veil Wand line." + ) + @ConfigEditorColour + public String displayColor = "0:245:255:85:85"; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/itemability/ItemAbilityConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/itemability/ItemAbilityConfig.java new file mode 100644 index 000000000..a53075016 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/itemability/ItemAbilityConfig.java @@ -0,0 +1,38 @@ +package at.hannibal2.skyhanni.config.features.itemability; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class ItemAbilityConfig { + + @Expose + @ConfigOption(name = "Ability Cooldown", desc = "Show the cooldown of item abilities.") + @ConfigEditorBoolean + @FeatureToggle + public boolean itemAbilityCooldown = false; + + @Expose + @ConfigOption(name = "Ability Cooldown Background", desc = "Show the cooldown color of item abilities in the background.") + @ConfigEditorBoolean + public boolean itemAbilityCooldownBackground = false; + + @Expose + @ConfigOption(name = "Fire Veil", desc = "") + @Accordion + public FireVeilWandConfig fireVeilWands = new FireVeilWandConfig(); + + @ConfigOption(name = "Chicken Head", desc = "") + @Accordion + @Expose + public ChickenHeadConfig chickenHead = new ChickenHeadConfig(); + + @Expose + @ConfigOption(name = "Depleted Bonzo's Masks", + desc = "Highlights used Bonzo's Masks and Spirit Masks with a background.") + @ConfigEditorBoolean + @FeatureToggle + public boolean depletedBonzosMasks = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/markedplayer/MarkedPlayerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/markedplayer/MarkedPlayerConfig.java new file mode 100644 index 000000000..431e5f29c --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/markedplayer/MarkedPlayerConfig.java @@ -0,0 +1,24 @@ +package at.hannibal2.skyhanni.config.features.markedplayer; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import io.github.moulberry.moulconfig.observer.Property; + +public class MarkedPlayerConfig { + + @Expose + @ConfigOption(name = "Highlight in World", desc = "Highlight marked players in the world.") + @ConfigEditorBoolean + public boolean highlightInWorld = true; + + @Expose + @ConfigOption(name = "Highlight in Chat", desc = "Highlight marked player names in chat.") + @ConfigEditorBoolean + public boolean highlightInChat = true; + + @Expose + @ConfigOption(name = "Mark Own Name", desc = "Mark own player name.") + @ConfigEditorBoolean() + public Property markOwnName = Property.of(false); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/mining/KingTalismanConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/mining/KingTalismanConfig.java new file mode 100644 index 000000000..e98ae5740 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/mining/KingTalismanConfig.java @@ -0,0 +1,25 @@ +package at.hannibal2.skyhanni.config.features.mining; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class KingTalismanConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Show kings you have not talked to yet, and when the next missing king will appear.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Outside Mines", desc = "Show the display even while outside the Dwarven Mines.") + @ConfigEditorBoolean + @FeatureToggle + public boolean outsideMines = false; + + @Expose + public Position position = new Position(-400, 220, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java new file mode 100644 index 000000000..feeb465ab --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java @@ -0,0 +1,32 @@ +package at.hannibal2.skyhanni.config.features.mining; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class MiningConfig { + + @Expose + @ConfigOption(name = "Powder Tracker", desc = "") + @Accordion + public PowderTrackerConfig powderTracker = new PowderTrackerConfig(); + + @Expose + @ConfigOption(name = "King Talisman", desc = "") + @Accordion + public KingTalismanConfig kingTalisman = new KingTalismanConfig(); + + @Expose + @ConfigOption(name = "Highlight Commission Mobs", desc = "Highlight Mobs that are part of active commissions.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightCommissionMobs = false; + + @Expose + @ConfigOption(name = "Names in Core", desc = "Show the names of the 4 areas while in the center of the Crystal Hollows.") + @ConfigEditorBoolean + @FeatureToggle + public boolean crystalHollowsNamesInCore = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderTrackerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderTrackerConfig.java new file mode 100644 index 000000000..50bff2a9b --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderTrackerConfig.java @@ -0,0 +1,84 @@ +package at.hannibal2.skyhanni.config.features.mining; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import io.github.moulberry.moulconfig.observer.Property; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class PowderTrackerConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Enable the Powder Tracker overlay for mining.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Only when Grinding", desc = "Only show the overlay when powder grinding.") + @ConfigEditorBoolean + public boolean onlyWhenPowderGrinding = false; + + @Expose + @ConfigOption(name = "Great Explorer", desc = "Enable this if your Great Explorer perk is maxed.") + @ConfigEditorBoolean + public boolean greatExplorerMaxed = false; + + @Expose + @ConfigOption( + name = "Text Format", + desc = "Drag text to change the appearance of the overlay." + ) + @ConfigEditorDraggableList( + exampleText = { + "§b§lPowder Tracker", + "§7Display Mode: §a[Total] §e[This Session]", + "§d852 Total chests Picked §7(950/h)", + "§bx2 Powder: §aActive!", + "§b250,420 §aMithril Powder §7(350,000/h)", + "§b250,420 §dGemstone Powder §7(350,000/h)", + "", + "§b129 §bDiamond Essence §7(600/h)", + "§b234 §6Gold Essence §7(700/h)", + "", + "§50§7-§90§7-§a0§f-0 §cRuby Gemstone", + "§50§7-§90§7-§a0§f-0 §bSapphire Gemstone", + "§50§7-§90§7-§a0§f-0 §6Amber Gemstone", + "§50§7-§90§7-§a0§f-0 §5Amethyst Gemstone", + "§50§7-§90§7-§a0§f-0 §aJade Gemstone", + "§50§7-§90§7-§a0§f-0 §eTopaz Gemstone", + + "§b14 §9FTX 3070", + "§b14 §9Electron Transmitter", + "§b14 §9Robotron Reflector", + "§b14 §9Superlite Motor", + "§b14 §9Control Switch", + "§b14 §9Synthetic Heart", + "§b14 §9Total Robot Parts", + + "§90§7-§a0§7-§c0§f-§e0§f-§30 §fGoblin Egg", + + "§b12 §aWishing Compass", + + "§b320 §aSludge Juice", + "§b2 §9Ascension Rope", + "§b6 §5Treasurite", + "§b4 §6Jungle Heart", + "§b1 §5Pickonimbus 2000", + "§b14 §aYoggie", + "§b9 §fPrehistoric Egg", + "§b25 §aOil Barrel" + } + ) + public Property> textFormat = Property.of(new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18))); + + @Expose + public Position position = new Position(-274, 0, false, true); + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/minion/EmptiedTimeConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/minion/EmptiedTimeConfig.java new file mode 100644 index 000000000..53f324e00 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/minion/EmptiedTimeConfig.java @@ -0,0 +1,27 @@ +package at.hannibal2.skyhanni.config.features.minion; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class EmptiedTimeConfig { + @Expose + @ConfigOption(name = "Emptied Time Display", desc = "Show the time when the hopper in the minion was last emptied.") + @ConfigEditorBoolean + @FeatureToggle + public boolean display = false; + + @Expose + @ConfigOption( + name = "Distance", + desc = "Maximum distance to display minion data." + ) + @ConfigEditorSlider( + minValue = 3, + maxValue = 30, + minStep = 1 + ) + public int distance = 10; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/minion/LastClickedMinionConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/minion/LastClickedMinionConfig.java new file mode 100644 index 000000000..391a10468 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/minion/LastClickedMinionConfig.java @@ -0,0 +1,36 @@ +package at.hannibal2.skyhanni.config.features.minion; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class LastClickedMinionConfig { + @Expose + @ConfigOption(name = "Last Minion Display", desc = "Marks the location of the last clicked minion, even through walls.") + @ConfigEditorBoolean + @FeatureToggle + public boolean display = false; + + @Expose + @ConfigOption( + name = "Last Minion Color", + desc = "The color in which the last minion should be displayed." + ) + @ConfigEditorColour + public String color = "0:245:85:255:85"; + + @Expose + @ConfigOption( + name = "Last Minion Time", + desc = "Time in seconds how long the last minion should be displayed." + ) + @ConfigEditorSlider( + minValue = 3, + maxValue = 120, + minStep = 1 + ) + public int time = 20; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/minion/MinionsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/minion/MinionsConfig.java new file mode 100644 index 000000000..d54e3d464 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/minion/MinionsConfig.java @@ -0,0 +1,46 @@ +package at.hannibal2.skyhanni.config.features.minion; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class MinionsConfig { + + @Expose + @ConfigOption(name = "Name Display", desc = "Show the minion name and tier over the minion.") + @ConfigEditorBoolean + @FeatureToggle + public boolean nameDisplay = true; + + @Expose + @ConfigOption(name = "Only Tier", desc = "Show only the tier number over the minion. (Useful for Bingo)") + @ConfigEditorBoolean + public boolean nameOnlyTier = false; + + @Expose + @ConfigOption(name = "Last Clicked", desc = "") + @Accordion + public LastClickedMinionConfig lastClickedMinion = new LastClickedMinionConfig(); + + @Expose + @ConfigOption(name = "Emptied Time", desc = "") + @Accordion + public EmptiedTimeConfig emptiedTime = new EmptiedTimeConfig(); + + @Expose + @ConfigOption(name = "Hopper Profit Display", desc = "Use the hopper's held coins and the last empty time to calculate the coins per day.") + @ConfigEditorBoolean + public boolean hopperProfitDisplay = true; + + @Expose + public Position hopperProfitPos = new Position(360, 90, false, true); + + @Expose + @ConfigOption(name = "Hide Mob Nametag", desc = "Hiding the nametag of mobs close to minions.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideMobsNametagNearby = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/DiscordRPCConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/DiscordRPCConfig.java new file mode 100644 index 000000000..ab4a18d47 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/DiscordRPCConfig.java @@ -0,0 +1,97 @@ +package at.hannibal2.skyhanni.config.features.misc; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigEditorText; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import io.github.moulberry.moulconfig.observer.Property; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class DiscordRPCConfig { + + @Expose + @ConfigOption(name = "Enable Discord RPC", desc = "Details about your SkyBlock session displayed through Discord.") + @ConfigEditorBoolean + @FeatureToggle + public Property enabled = Property.of(false); + + @Expose + @ConfigOption(name = "First Line", desc = "Decide what to show in the first line.") + @ConfigEditorDropdown(values = { + "Nothing", + "Location", + "Purse", + "Bits", + "Stats", + "Held Item", + "SkyBlock Date", + "Profile", + "Slayer", + "Custom", + "Dynamic", + "Crop Milestone", + "Current Pet" + }) + public Property firstLine = Property.of(0); + + @Expose + @ConfigOption(name = "Second Line", desc = "Decide what to show in the second line.") + @ConfigEditorDropdown(values = { + "Nothing", + "Location", + "Purse", + "Bits", + "Stats", + "Held Item", + "SkyBlock Date", + "Profile", + "Slayer", + "Custom", + "Dynamic", + "Crop Milestone", + "Current Pet" + }) + public Property secondLine = Property.of(0); + + @Expose + @ConfigOption(name = "Custom", desc = "What should be displayed if you select \"Custom\" above.") + @ConfigEditorText + public Property customText = Property.of(""); + + @Expose + @ConfigOption(name = "Dynamic Priority", desc = "Disable certain dynamic statuses, or change the priority in case two are triggered at the same time (higher up means higher priority).") + @ConfigEditorDraggableList( + exampleText = { + "Crop Milestones", + "Slayer", + "Stacking Enchantment", + "Dungeon", + "AFK Indicator" + } + ) + public List autoPriority = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4)); + + @Expose + @ConfigOption(name = "Dynamic Fallback", desc = "What to show when none of your \"Dynamic Priority\" statuses are active.") + @ConfigEditorDropdown(values = { + "Nothing", + "Location", + "Purse", + "Bits", + "Stats", + "Held Item", + "SkyBlock Date", + "Profile", + "Slayer", + "Custom", + "Crop Milestone", + "Current Pet" + }) + public Property auto = Property.of(0); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/EstimatedItemValueConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/EstimatedItemValueConfig.java new file mode 100644 index 000000000..2513cd66b --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/EstimatedItemValueConfig.java @@ -0,0 +1,52 @@ +package at.hannibal2.skyhanni.config.features.misc; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import io.github.moulberry.moulconfig.observer.Property; +import org.lwjgl.input.Keyboard; + +public class EstimatedItemValueConfig { + @Expose + @ConfigOption(name = "Enable Estimated Price", desc = "Displays an Estimated Item Value for the item you hover over.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Hotkey", desc = "Press this key to show the Estimated Item Value.") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int hotkey = Keyboard.KEY_NONE; + + @Expose + @ConfigOption(name = "Show Always", desc = "Ignore the hotkey and always display the item value.") + @ConfigEditorBoolean + public boolean alwaysEnabled = true; + + @Expose + @ConfigOption(name = "Enchantments Cap", desc = "Only show the top # most expensive enchantments.") + @ConfigEditorSlider( + minValue = 1, + maxValue = 30, + minStep = 1 + ) + public Property enchantmentsCap = Property.of(7); + + @Expose + @ConfigOption(name = "Show Exact Price", desc = "Show the exact total price instead of the compact number.") + @ConfigEditorBoolean + public boolean exactPrice = false; + + @Expose + @ConfigOption(name = "Show Armor Value", desc = "Show the value of the full armor set in the Wardrobe inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean armor = true; + + @Expose + public Position itemPriceDataPos = new Position(140, 90, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/GlowingDroppedItemsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/GlowingDroppedItemsConfig.java new file mode 100644 index 000000000..4b5a260a1 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/GlowingDroppedItemsConfig.java @@ -0,0 +1,26 @@ +package at.hannibal2.skyhanni.config.features.misc; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class GlowingDroppedItemsConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Draws a glowing outline around all dropped items on the ground.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Highlight Showcase Items", desc = "Draws a glowing outline around showcase items.") + @ConfigEditorBoolean + public boolean highlightShowcase = false; + + @Expose + @ConfigOption(name = "Highlight Fishing Bait", desc = "Draws a glowing outline around fishing bait.") + @ConfigEditorBoolean + public boolean highlightFishingBait = false; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/HideArmorConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/HideArmorConfig.java new file mode 100644 index 000000000..286249061 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/HideArmorConfig.java @@ -0,0 +1,20 @@ +package at.hannibal2.skyhanni.config.features.misc; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class HideArmorConfig { + + @Expose + @ConfigOption(name = "Mode", desc = "Hide the armor of players.") + @ConfigEditorDropdown(values = {"All", "Own Armor", "Other's Armor", "Off"}) + public int mode = 3; + + @Expose + @ConfigOption(name = "Only Helmet", desc = "Only hide the helmet.") + @ConfigEditorBoolean() + public Boolean onlyHelmet = false; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/HighlightPartyMembersConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/HighlightPartyMembersConfig.java new file mode 100644 index 000000000..8dc4d7c02 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/HighlightPartyMembersConfig.java @@ -0,0 +1,25 @@ +package at.hannibal2.skyhanni.config.features.misc; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class HighlightPartyMembersConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Marking party members with a bright outline to better find them in the world.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption( + name = "Outline Color", + desc = "The color to outline party members in." + ) + @ConfigEditorColour + public String outlineColor = "0:245:85:255:85"; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/KickDurationConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/KickDurationConfig.java new file mode 100644 index 000000000..0d5af9046 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/KickDurationConfig.java @@ -0,0 +1,34 @@ +package at.hannibal2.skyhanni.config.features.misc; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import io.github.moulberry.moulconfig.observer.Property; + +public class KickDurationConfig { + + @Expose + @ConfigOption( + name = "Enabled", + desc = "Show in the Hypixel lobby since when you were last kicked from SkyBlock (" + + "useful if you get blocked because of '§cYou were kicked while joining that server!§7')." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Warn Time", desc = "Send warning and sound this seconds after a SkyBlock kick.") + @ConfigEditorSlider( + minValue = 5, + maxValue = 300, + minStep = 1 + ) + public Property warnTime = Property.of(60); + + @Expose + public Position position = new Position(400, 200, 1.3f); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java new file mode 100644 index 000000000..3358db12f --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java @@ -0,0 +1,209 @@ +package at.hannibal2.skyhanni.config.features.misc; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import at.hannibal2.skyhanni.config.features.misc.compacttablist.CompactTabListConfig; +import at.hannibal2.skyhanni.config.features.misc.cosmetic.CosmeticConfig; +import at.hannibal2.skyhanni.config.features.misc.pets.PetConfig; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.Category; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class MiscConfig { + + @Expose + @Category(name = "Pets", desc = "Pets Settings") + public PetConfig pets = new PetConfig(); + + @ConfigOption(name = "Hide Armor", desc = "") + @Accordion + @Expose + public HideArmorConfig hideArmor2 = new HideArmorConfig(); + + @Expose + @ConfigOption(name = "Potion Effects", desc = "") + @Accordion + public PotionEffectsConfig potionEffect = new PotionEffectsConfig(); + + @Expose + @ConfigOption(name = "Particle Hider", desc = "") + @Accordion + public ParticleHiderConfig particleHiders = new ParticleHiderConfig(); + + @Expose + @ConfigOption(name = "Estimated Item Value", desc = "(Prices for Enchantments, Reforge Stones, Gemstones, Drill Parts and more)") + @Accordion + public EstimatedItemValueConfig estimatedItemValues = new EstimatedItemValueConfig(); + + @ConfigOption(name = "Discord Rich Presence", desc = "") + @Accordion + @Expose + public DiscordRPCConfig discordRPC = new DiscordRPCConfig(); + + @ConfigOption(name = "Trevor The Trapper", desc = "") + @Accordion + @Expose + public TrevorTheTrapperConfig trevorTheTrapper = new TrevorTheTrapperConfig(); + + @ConfigOption(name = "Teleport Pads On Private Island", desc = "") + @Accordion + @Expose + public TeleportPadConfig teleportPad = new TeleportPadConfig(); + + @ConfigOption(name = "Pocket Sack-In-A-Sack", desc = "") + @Accordion + @Expose + public PocketSackInASackConfig pocketSackInASack = new PocketSackInASackConfig(); + + @ConfigOption(name = "Quick Mod Menu Switch", desc = "") + @Accordion + @Expose + public QuickModMenuSwitchConfig quickModMenuSwitch = new QuickModMenuSwitchConfig(); + + @Expose + @Category(name = "Cosmetic", desc = "Cosmetics Settings") + public CosmeticConfig cosmetic = new CosmeticConfig(); + + + @Expose + @ConfigOption(name = "Glowing Dropped Items", desc = "") + @Accordion + public GlowingDroppedItemsConfig glowingDroppedItems = new GlowingDroppedItemsConfig(); + + @Expose + @ConfigOption(name = "Highlight Party Members", desc = "") + @Accordion + public HighlightPartyMembersConfig highlightPartyMembers = new HighlightPartyMembersConfig(); + + @Expose + @Category(name = "Compact Tab List", desc = "Compact Tab List Settings") + @Accordion + public CompactTabListConfig compactTabList = new CompactTabListConfig(); + + @Expose + @ConfigOption(name = "Kick Duration", desc = "") + @Accordion + public KickDurationConfig kickDuration = new KickDurationConfig(); + + @Expose + @ConfigOption(name = "Exp Bottles", desc = "Hides all the experience orbs lying on the ground.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideExpBottles = false; + + @Expose + public Position collectionCounterPos = new Position(10, 10, false, true); + + @Expose + @ConfigOption(name = "Brewing Stand Overlay", desc = "Display the Item names directly inside the Brewing Stand.") + @ConfigEditorBoolean + @FeatureToggle + public boolean brewingStandOverlay = true; + + @Expose + @ConfigOption(name = "Red Scoreboard Numbers", desc = "Hide the red scoreboard numbers on the right side of the screen.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideScoreboardNumbers = false; + + @Expose + @ConfigOption(name = "Hide Piggy", desc = "Replacing 'Piggy' with 'Purse' in the Scoreboard.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hidePiggyScoreboard = true; + + @Expose + @ConfigOption(name = "Explosions Hider", desc = "Hide explosions.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideExplosions = false; + + @Expose + @ConfigOption(name = "CH Join", desc = "Helps buy a Pass for accessing the Crystal Hollows if needed.") + @ConfigEditorBoolean + @FeatureToggle + public boolean crystalHollowsJoin = true; + + @Expose + @ConfigOption(name = "Fire Overlay Hider", desc = "Hide the fire overlay (Like in Skytils).") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideFireOverlay = false; + + @Expose + @ConfigOption(name = "Paste Into Signs", desc = "Allows you to paste the clipboard into signs when you press Ctrl + V.") + @ConfigEditorBoolean + @FeatureToggle + public boolean pasteIntoSigns = true; + + @Expose + @ConfigOption(name = "Movement Speed", desc = "Show the player movement speed in blocks per second.") + @ConfigEditorBoolean + @FeatureToggle + public boolean playerMovementSpeed = false; + + @Expose + public Position playerMovementSpeedPos = new Position(394, 124, false, true); + + @Expose + @ConfigOption(name = "Pet Candy Used", desc = "Show the number of Pet Candy used on a pet.") + @ConfigEditorBoolean + @FeatureToggle + public boolean petCandyUsed = true; + + @Expose + @ConfigOption(name = "Server Restart Title", desc = "Show a title with seconds remaining until the server restarts after a Game Update or Scheduled Restart.") + @ConfigEditorBoolean + @FeatureToggle + public boolean serverRestartTitle = true; + + @Expose + @ConfigOption(name = "Piece Of Wizard Portal", desc = "Restore the Earned By lore line on bought Piece Of Wizard Portal.") + @ConfigEditorBoolean + @FeatureToggle + public boolean restorePieceOfWizardPortalLore = true; + + @Expose + @ConfigOption(name = "Patcher Coords Waypoint", desc = "Highlight the coordinates sent by Patcher.") + @ConfigEditorBoolean + @FeatureToggle + public boolean patcherSendCoordWaypoint = false; + + + @Expose + @ConfigOption(name = "Account Upgrade Reminder", desc = "Remind you to claim account upgrades when complete.") + @ConfigEditorBoolean + @FeatureToggle + public boolean accountUpgradeReminder = true; + + @Expose + @ConfigOption(name = "Superpairs Clicks Alert", desc = "Display an alert when you reach the maximum clicks gained from Chronomatron or Ultrasequencer.") + @ConfigEditorBoolean + @FeatureToggle + public boolean superpairsClicksAlert = false; + + @Expose + @ConfigOption(name = "NEU Heavy Pearls", desc = "Fixing NEU Heavy Pearl detection.") + @ConfigEditorBoolean + @FeatureToggle + public boolean fixNeuHeavyPearls = true; + + @Expose + @ConfigOption( + name = "Time In Limbo", + desc = "Show the time since you entered the limbo.") + @ConfigEditorBoolean + @FeatureToggle + public boolean showTimeInLimbo = true; + + @Expose + public Position showTimeInLimboPosition = new Position(400, 200, 1.3f); + + @Expose + public Position lockedMouseDisplay = new Position(400, 200, 0.8f); + + @Expose + public Position inventoryLoadPos = new Position(394, 124, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/ParticleHiderConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/ParticleHiderConfig.java new file mode 100644 index 000000000..45f7c445e --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/ParticleHiderConfig.java @@ -0,0 +1,50 @@ +package at.hannibal2.skyhanni.config.features.misc; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class ParticleHiderConfig { + @Expose + @ConfigOption(name = "Blaze Particles", desc = "Hide Blaze particles.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideBlazeParticles = false; + + @Expose + @ConfigOption(name = "Enderman Particles", desc = "Hide Enderman particles.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideEndermanParticles = false; + + @Expose + @ConfigOption(name = "Fireball Particles", desc = "Hide fireball particles.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideFireballParticles = true; + + @Expose + @ConfigOption(name = "Fire Particles", desc = "Hide particles from the fire block.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideFireBlockParticles = true; + + @Expose + @ConfigOption(name = "Smoke Particles", desc = "Hide smoke particles.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideSmokeParticles = false; + + @Expose + @ConfigOption(name = "Far Particles", desc = "Hide particles that are more than 40 blocks away.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideFarParticles = true; + + @Expose + @ConfigOption(name = "Close Redstone Particles", desc = "Hide Redstone particles around the player (appear for some potion effects).") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideCloseRedstoneParticles = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/PocketSackInASackConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/PocketSackInASackConfig.java new file mode 100644 index 000000000..c3a57d993 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/PocketSackInASackConfig.java @@ -0,0 +1,21 @@ +package at.hannibal2.skyhanni.config.features.misc; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class PocketSackInASackConfig { + + @Expose + @ConfigOption(name = "Show in Overlay", desc = "Show the number of Pocket Sack-In-A-Sack applied on a sack icon as an overlay.") + @ConfigEditorBoolean + @FeatureToggle + public boolean showOverlay = false; + + @Expose + @ConfigOption(name = "Replace In Lore", desc = "Replace how text is displayed in lore.\nShow §eis stitched with 2/3...\n§7Instead of §eis stitched with two...") + @ConfigEditorBoolean + @FeatureToggle + public boolean replaceLore = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/PotionEffectsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/PotionEffectsConfig.java new file mode 100644 index 000000000..19711ffdb --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/PotionEffectsConfig.java @@ -0,0 +1,24 @@ +package at.hannibal2.skyhanni.config.features.misc; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class PotionEffectsConfig { + @Expose + @ConfigOption(name = "Non God Pot Effects", desc = "Display the active potion effects that are not part of the God Pot.") + @ConfigEditorBoolean + @FeatureToggle + public boolean nonGodPotEffectDisplay = false; + + @Expose + @ConfigOption(name = "Show Mixins", desc = "Include God Pot mixins in the Non God Pot Effects display.") + @ConfigEditorBoolean + @FeatureToggle + public boolean nonGodPotEffectShowMixins = false; + + @Expose + public Position nonGodPotEffectPos = new Position(10, 10, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/QuickModMenuSwitchConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/QuickModMenuSwitchConfig.java new file mode 100644 index 000000000..a1361d4a2 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/QuickModMenuSwitchConfig.java @@ -0,0 +1,29 @@ +package at.hannibal2.skyhanni.config.features.misc; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class QuickModMenuSwitchConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Adding a mod list, allowing to quickly switch between different mod menus.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Inside Escape Menu", desc = "Show the mod list while inside the Escape menu.") + @ConfigEditorBoolean + public boolean insideEscapeMenu = true; + + @Expose + @ConfigOption(name = "Inside Inventory", desc = "Show the mod list while inside the player inventory (no chest inventory).") + @ConfigEditorBoolean + public boolean insidePlayerInventory = false; + + @Expose + public Position pos = new Position(-178, 143, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/TeleportPadConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/TeleportPadConfig.java new file mode 100644 index 000000000..f16165547 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/TeleportPadConfig.java @@ -0,0 +1,21 @@ +package at.hannibal2.skyhanni.config.features.misc; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class TeleportPadConfig { + + @Expose + @ConfigOption(name = "Compact Name", desc = "Hide the 'Warp to' and 'No Destination' texts over teleport pads.") + @ConfigEditorBoolean + @FeatureToggle + public boolean compactName = false; + + @Expose + @ConfigOption(name = "Inventory Numbers", desc = "Show the number of the teleport pads inside the 'Change Destination' inventory as stack size.") + @ConfigEditorBoolean + @FeatureToggle + public boolean inventoryNumbers = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/TrevorTheTrapperConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/TrevorTheTrapperConfig.java new file mode 100644 index 000000000..0c4226034 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/TrevorTheTrapperConfig.java @@ -0,0 +1,110 @@ +package at.hannibal2.skyhanni.config.features.misc; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import org.lwjgl.input.Keyboard; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class TrevorTheTrapperConfig { + + @Expose + @ConfigOption( + name = "Enable Data Tracker", + desc = "Tracks all of your data from doing Trevor Quests.\n" + + "Shows based on the setting below." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean dataTracker = true; + + @Expose + @ConfigOption( + name = "Show Between Quests", + desc = "Shows the tracker during and between quests otherwise it will only show during them." + + "Will show in the Trapper's Den regardless. §cToggle 'Enable Data Tracker' above." + ) + @ConfigEditorBoolean + public boolean displayType = true; + + @Expose + @ConfigOption( + name = "Text Format", + desc = "Drag text to change the appearance of the overlay." + ) + @ConfigEditorDraggableList( + exampleText = { + "§b§lTrevor Data Tracker", + "§b1,428 §9Quests Started", + "§b11,281 §5Total Pelts Gained", + "§b2,448 §5Pelts Per Hour", + "", + "§b850 §cKilled Animals", + "§b153 §cSelf Killing Animals", + "§b788 §fTrackable Animals", + "§b239 §aUntrackable Animals", + "§b115 §9Undetected Animals", + "§b73 §5Endangered Animals", + "§b12 §6Elusive Animals" + } + ) + public List textFormat = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11)); + + @Expose + public Position position = new Position(10, 80, false, true); + + @Expose + @ConfigOption(name = "Trapper Solver", desc = "Assists you in finding Trevor's mobs. §eNote: May not always work as expected. " + + "§cWill not help you to find rabbits or sheep in the Oasis!") + @ConfigEditorBoolean + @FeatureToggle + public boolean trapperSolver = true; + + @Expose + @ConfigOption(name = "Mob Dead Warning", desc = "Show a message when Trevor's mob dies.") + @ConfigEditorBoolean + public boolean trapperMobDiedMessage = true; + + @Expose + @ConfigOption(name = "Warp to Trapper", desc = "Warp to Trevor's Den. Works only inside the Farming Islands.") + @ConfigEditorBoolean + @FeatureToggle + public boolean warpToTrapper = false; + + @Expose + @ConfigOption(name = "Accept Trapper Quest", desc = "Click this key after the chat prompt to accept Trevor's quest.") + @ConfigEditorBoolean + @FeatureToggle + public boolean acceptQuest = false; + + @Expose + @ConfigOption(name = "Trapper Hotkey", desc = "Press this key to warp to Trevor's Den or to accept the quest. " + + "§eRequires the relevant above settings to be toggled") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int keyBindWarpTrapper = Keyboard.KEY_NONE; + + + @Expose + @ConfigOption(name = "Trapper Cooldown", desc = "Change the color of Trevor and adds a cooldown over his head.") + @ConfigEditorBoolean + @FeatureToggle + public boolean trapperTalkCooldown = true; + + @Expose + @ConfigOption( + name = "Trapper Cooldown GUI", + desc = "Show the cooldown on screen in an overlay (intended for Abiphone users)." + ) + @ConfigEditorBoolean + public boolean trapperCooldownGui = false; + + @Expose + public Position trapperCooldownPos = new Position(10, 10, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/compacttablist/AdvancedPlayerListConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/compacttablist/AdvancedPlayerListConfig.java new file mode 100644 index 000000000..0bd6360d6 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/compacttablist/AdvancedPlayerListConfig.java @@ -0,0 +1,73 @@ +package at.hannibal2.skyhanni.config.features.misc.compacttablist; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class AdvancedPlayerListConfig { + + @Expose + @ConfigOption(name = "Player Sort", desc = "Change the sort order of player names in the tab list.") + @ConfigEditorDropdown(values = {"Rank (Default)", "SB Level", "Name (Abc)", "Ironman/Bingo", "Party/Friends/Guild", "Random"}) + public int playerSortOrder = 0; + + @Expose + @ConfigOption(name = "Invert Sort", desc = "Flip the player list order on its head (also works with default rank).") + @ConfigEditorBoolean + public boolean reverseSort = false; + + @Expose + @ConfigOption(name = "Hide Player Icons", desc = "Hide the icons/skins of player in the tab list.") + @ConfigEditorBoolean + public boolean hidePlayerIcons = false; + + @Expose + @ConfigOption(name = "Hide Rank Color", desc = "Hide the player rank color.") + @ConfigEditorBoolean + public boolean hideRankColor = false; + + @Expose + @ConfigOption(name = "Hide Emblems", desc = "Hide the emblems behind the player name.") + @ConfigEditorBoolean + public boolean hideEmblem = false; + + @Expose + @ConfigOption(name = "Hide Level", desc = "Hide the SkyBlock level numbers.") + @ConfigEditorBoolean + public boolean hideLevel = false; + + @Expose + @ConfigOption(name = "Hide Level Brackets", desc = "Hide the gray brackets in front of and behind the level numbers.") + @ConfigEditorBoolean + public boolean hideLevelBrackets = false; + + @Expose + @ConfigOption(name = "Level Color As Name", desc = "Use the color of the SkyBlock level for the player color.") + @ConfigEditorBoolean + public boolean useLevelColorForName = false; + + @Expose + @ConfigOption(name = "Bingo Rank Number", desc = "Show the number of the bingo rank next to the icon. Useful if you are not so familar with bingo.") + @ConfigEditorBoolean + public boolean showBingoRankNumber = false; + + @Expose + @ConfigOption(name = "Hide Factions", desc = "Hide the icon of the Crimson Isle Faction in the tab list.") + @ConfigEditorBoolean + public boolean hideFactions = false; + + @Expose + @ConfigOption(name = "Mark Special Persons", desc = "Show special icons behind the name of guild members, party members, friends, and marked players.") + @ConfigEditorBoolean + public boolean markSpecialPersons = false; + + @Expose + @ConfigOption( + name = "Mark SkyHanni Devs", + desc = "Adds a §c:O §7behind the tablist name of §cSkyHanni's contributors§7. " + + "§eThose are the folks that coded the mod for you for free :)" + ) + @ConfigEditorBoolean + public boolean markSkyHanniContributors = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/compacttablist/CompactTabListConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/compacttablist/CompactTabListConfig.java new file mode 100644 index 000000000..2236d886b --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/compacttablist/CompactTabListConfig.java @@ -0,0 +1,27 @@ +package at.hannibal2.skyhanni.config.features.misc.compacttablist; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class CompactTabListConfig { + @Expose + @ConfigOption(name = "Enabled", desc = "Compacts the tablist to make it look much nicer like SBA did. Also " + + "doesn't break god-pot detection and shortens some other lines.") + //made tablist one word here so both searches will pick it up + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Hide Hypixel Adverts", desc = "Hides text from advertising the Hypixel server or store in the tablist.") + @ConfigEditorBoolean + public boolean hideAdverts = false; + + @Expose + @ConfigOption(name = "Advanced Player List", desc = "") + @Accordion + public AdvancedPlayerListConfig advancedPlayerList = new AdvancedPlayerListConfig(); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/cosmetic/ArrowTrailConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/cosmetic/ArrowTrailConfig.java new file mode 100644 index 000000000..7f8a044ed --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/cosmetic/ArrowTrailConfig.java @@ -0,0 +1,46 @@ +package at.hannibal2.skyhanni.config.features.misc.cosmetic; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class ArrowTrailConfig { + @Expose + @ConfigOption(name = "Enabled", desc = "Draw a colored line behind arrows in the air.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Hide Nonplayer Arrows", desc = "Only shows for arrows the player has shot.") + @ConfigEditorBoolean + public boolean hideOtherArrows = true; + + @Expose + @ConfigOption(name = "Arrow Color", desc = "Color of the line.") + @ConfigEditorColour + public String arrowColor = "0:200:85:255:85"; + + @Expose + @ConfigOption(name = "Player Arrows", desc = "Different color for the line of arrows that you have shot.") + @ConfigEditorBoolean + public boolean handlePlayerArrowsDifferently = false; + + @Expose + @ConfigOption(name = "Player Arrow Color", desc = "Color of the line of your own arrows.") + @ConfigEditorColour + public String playerArrowColor = "0:200:85:255:255"; + + @Expose + @ConfigOption(name = "Time Alive", desc = "Time in seconds until the trail fades out.") + @ConfigEditorSlider(minStep = 0.1f, minValue = 0.1f, maxValue = 10) + public float secondsAlive = 0.5f; + + @Expose + @ConfigOption(name = "Line Width", desc = "Width of the line.") + @ConfigEditorSlider(minStep = 1, minValue = 1, maxValue = 10) + public int lineWidth = 4; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/cosmetic/CosmeticConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/cosmetic/CosmeticConfig.java new file mode 100644 index 000000000..80b5c6043 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/cosmetic/CosmeticConfig.java @@ -0,0 +1,18 @@ +package at.hannibal2.skyhanni.config.features.misc.cosmetic; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class CosmeticConfig { + + @Expose + @ConfigOption(name = "Following Line", desc = "") + @Accordion + public FollowingLineConfig followingLine = new FollowingLineConfig(); + + @Expose + @ConfigOption(name = "Arrow Trail", desc = "") + @Accordion + public ArrowTrailConfig arrowTrail = new ArrowTrailConfig(); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/cosmetic/FollowingLineConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/cosmetic/FollowingLineConfig.java new file mode 100644 index 000000000..87f846e71 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/cosmetic/FollowingLineConfig.java @@ -0,0 +1,37 @@ +package at.hannibal2.skyhanni.config.features.misc.cosmetic; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class FollowingLineConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Draw a colored line behind the player.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Line Color", desc = "Color of the line.") + @ConfigEditorColour + public String lineColor = "0:255:255:255:255"; + + @Expose + @ConfigOption(name = "Time Alive", desc = "Time in seconds until the line fades out.") + @ConfigEditorSlider(minStep = 1, minValue = 1, maxValue = 30) + public int secondsAlive = 3; + + @Expose + @ConfigOption(name = "Max Line Width", desc = "Max width of the line.") + @ConfigEditorSlider(minStep = 1, minValue = 1, maxValue = 10) + public int lineWidth = 4; + + @Expose + @ConfigOption(name = "Behind Blocks", desc = "Show behind blocks.") + @ConfigEditorBoolean + public boolean behindBlocks = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/pets/PetConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/pets/PetConfig.java new file mode 100644 index 000000000..c6a32cee9 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/pets/PetConfig.java @@ -0,0 +1,24 @@ +package at.hannibal2.skyhanni.config.features.misc.pets; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class PetConfig { + @Expose + @ConfigOption(name = "Pet Display", desc = "Show the currently active pet.") + @ConfigEditorBoolean + @FeatureToggle + public boolean display = false; + + @Expose + public Position displayPos = new Position(-330, -15, false, true); + + @Expose + @ConfigOption(name = "Pet Experience Tooltip", desc = "") + @Accordion + public PetExperienceToolTipConfig petExperienceToolTip = new PetExperienceToolTipConfig(); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/pets/PetExperienceToolTipConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/pets/PetExperienceToolTipConfig.java new file mode 100644 index 000000000..71ad44ba3 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/pets/PetExperienceToolTipConfig.java @@ -0,0 +1,27 @@ +package at.hannibal2.skyhanni.config.features.misc.pets; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class PetExperienceToolTipConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Show the full pet exp and the progress to level 100 (ignoring rarity) when hovering over a pet while pressing shift key.") + @ConfigEditorBoolean + @FeatureToggle + public boolean petDisplay = true; + + + @Expose + @ConfigOption(name = "Show Always", desc = "Show this info always, even if not pressing shift key.") + @ConfigEditorBoolean + public boolean showAlways = false; + + @Expose + @ConfigOption(name = "Dragon Egg", desc = "For a Golden Dragon Egg, show progress to level 100 instead of 200.") + @ConfigEditorBoolean + public boolean showGoldenDragonEgg = true; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/CruxTalismanDisplayConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/CruxTalismanDisplayConfig.java new file mode 100644 index 000000000..fc69df292 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/CruxTalismanDisplayConfig.java @@ -0,0 +1,30 @@ +package at.hannibal2.skyhanni.config.features.rift; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import io.github.moulberry.moulconfig.observer.Property; + +public class CruxTalismanDisplayConfig { + @Expose + @ConfigOption(name = "Crux Talisman Display", desc = "Display progress of the Crux Talisman on screen.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Compact", desc = "Show a compacted version of the overlay when the talisman is maxed.") + @ConfigEditorBoolean + public boolean compactWhenMaxed = false; + + @Expose + @ConfigOption(name = "Show Bonuses", desc = "Show bonuses you get from the talisman.") + @ConfigEditorBoolean + @FeatureToggle + public Property showBonuses = Property.of(true); + + @Expose + public Position position = new Position(144, 139, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/EnigmaSoulConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/EnigmaSoulConfig.java new file mode 100644 index 000000000..9b80b718d --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/EnigmaSoulConfig.java @@ -0,0 +1,22 @@ +package at.hannibal2.skyhanni.config.features.rift; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class EnigmaSoulConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Click on Enigma Souls in Rift Guides to highlight their location.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Color", desc = "Color of the Enigma Souls.") + @ConfigEditorColour + public String color = "0:120:13:49:255"; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/MotesOrbsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/MotesOrbsConfig.java new file mode 100644 index 000000000..ebcdb2e57 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/MotesOrbsConfig.java @@ -0,0 +1,28 @@ +package at.hannibal2.skyhanni.config.features.rift; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class MotesOrbsConfig { + + @Expose + @ConfigOption(name = "Highlight Motes Orbs", desc = "Highlight flying Motes Orbs.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Highlight Size", desc = "Set render size for highlighted Motes Orbs.") + @ConfigEditorSlider(minStep = 1, minValue = 1, maxValue = 5) + public int size = 3; + + @Expose + @ConfigOption(name = "Hide Particles", desc = "Hide normal Motes Orbs particles.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideParticles = false; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/RiftConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/RiftConfig.java new file mode 100644 index 000000000..ca20e01f9 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/RiftConfig.java @@ -0,0 +1,53 @@ +package at.hannibal2.skyhanni.config.features.rift; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.features.rift.area.RiftAreasConfig; +import at.hannibal2.skyhanni.config.features.rift.motes.MotesConfig; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.Category; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class RiftConfig { + + @ConfigOption(name = "Rift Timer", desc = "") + @Accordion + @Expose + public RiftTimerConfig timer = new RiftTimerConfig(); + + @ConfigOption(name = "Crux Talisman Progress", desc = "") + @Accordion + @Expose + public CruxTalismanDisplayConfig cruxTalisman = new CruxTalismanDisplayConfig(); + + @ConfigOption(name = "Enigma Soul Waypoints", desc = "") + @Accordion + @Expose + public EnigmaSoulConfig enigmaSoulWaypoints = new EnigmaSoulConfig(); + + @Category(name = "Rift Areas", desc = "Rift Area Settings") + @Expose + public RiftAreasConfig area = new RiftAreasConfig(); + + @Expose + @Category(name = "Motes", desc = "Motes Sell Price") + public MotesConfig motes = new MotesConfig(); + + @Expose + @ConfigOption(name = "Motes Orbs", desc = "") + @Accordion + public MotesOrbsConfig motesOrbs = new MotesOrbsConfig(); + + @Expose + @ConfigOption(name = "Highlight Guide", desc = "Highlight things to do in the Rift Guide.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightGuide = true; + + @Expose + @ConfigOption(name = "Horsezooka Hider", desc = "Hide horses while holding the Horsezooka in the hand.") + @ConfigEditorBoolean + @FeatureToggle + public boolean horsezookaHider = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/RiftTimerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/RiftTimerConfig.java new file mode 100644 index 000000000..f1c7f32dd --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/RiftTimerConfig.java @@ -0,0 +1,30 @@ +package at.hannibal2.skyhanni.config.features.rift; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class RiftTimerConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Show the remaining rift time, max time, percentage, and extra time changes.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Max Time", desc = "Show max time.") + @ConfigEditorBoolean + public boolean maxTime = true; + + @Expose + @ConfigOption(name = "Percentage", desc = "Show percentage.") + @ConfigEditorBoolean + public boolean percentage = true; + + @Expose + public Position timerPosition = new Position(10, 10, false, true); + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/RiftAreasConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/RiftAreasConfig.java new file mode 100644 index 000000000..397eb2b90 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/RiftAreasConfig.java @@ -0,0 +1,60 @@ +package at.hannibal2.skyhanni.config.features.rift.area; + +import at.hannibal2.skyhanni.config.features.rift.area.colosseum.ColosseumConfig; +import at.hannibal2.skyhanni.config.features.rift.area.dreadfarm.DreadfarmConfig; +import at.hannibal2.skyhanni.config.features.rift.area.livingcave.LivingCaveConfig; +import at.hannibal2.skyhanni.config.features.rift.area.mirrorverse.MirrorVerseConfig; +import at.hannibal2.skyhanni.config.features.rift.area.stillgorechateau.StillgoreChateauConfig; +import at.hannibal2.skyhanni.config.features.rift.area.westvillage.WestVillageConfig; +import at.hannibal2.skyhanni.config.features.rift.area.wyldwoods.WyldWoodsConfig; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class RiftAreasConfig { + + @ConfigOption(name = "Wyld Woods", desc = "") + @Accordion + @Expose + public WyldWoodsConfig wyldWoods = new WyldWoodsConfig(); + + @ConfigOption(name = "West Village", desc = "") + @Accordion + @Expose + public WestVillageConfig westVillage = new WestVillageConfig(); + + @Expose + @ConfigOption(name = "Dreadfarm", desc = "") + @Accordion + public DreadfarmConfig dreadfarm = new DreadfarmConfig(); + + @ConfigOption(name = "Mirrorverse", desc = "") + @Accordion + @Expose + public MirrorVerseConfig mirrorverse = new MirrorVerseConfig(); + +// @Expose +// @ConfigOption(name = "Village Plaza", desc = "") +// @Accordion +// public VillagePlazaConfig villagePlaza = new VillagePlazaConfig(); + + @Expose + @ConfigOption(name = "Living Cave", desc = "") + @Accordion + public LivingCaveConfig livingCave = new LivingCaveConfig(); + + @Expose + @ConfigOption(name = "Colosseum", desc = "") + @Accordion + public ColosseumConfig colosseum = new ColosseumConfig(); + + @Expose + @ConfigOption(name = "Stillgore Chateau", desc = "") + @Accordion + public StillgoreChateauConfig stillgoreChateau = new StillgoreChateauConfig(); + +// @Expose +// @ConfigOption(name = "Mountaintop", desc = "") +// @Accordion +// public MountaintopConfig mountaintop = new MountaintopConfig(); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/colosseum/ColosseumConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/colosseum/ColosseumConfig.java new file mode 100644 index 000000000..d9a662f0d --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/colosseum/ColosseumConfig.java @@ -0,0 +1,15 @@ +package at.hannibal2.skyhanni.config.features.rift.area.colosseum; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class ColosseumConfig { + + @Expose + @ConfigOption(name = "Highlight Blobbercysts", desc = "Highlight Blobbercysts in Bacte fight.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightBlobbercysts = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/dreadfarm/DreadfarmConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/dreadfarm/DreadfarmConfig.java new file mode 100644 index 000000000..9a17c70b8 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/dreadfarm/DreadfarmConfig.java @@ -0,0 +1,26 @@ +package at.hannibal2.skyhanni.config.features.rift.area.dreadfarm; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class DreadfarmConfig { + @Expose + @ConfigOption(name = "Agaricus Cap", desc = "Counts down the time until §eAgaricus Cap (Mushroom) " + + "§7changes color from brown to red and is breakable.") + @ConfigEditorBoolean + @FeatureToggle + public boolean agaricusCap = true; + + @ConfigOption(name = "Volt Crux", desc = "") + @Accordion + @Expose + public VoltCruxConfig voltCrux = new VoltCruxConfig(); + + @ConfigOption(name = "Wilted Berberis", desc = "") + @Accordion + @Expose + public WiltedBerberisConfig wiltedBerberis = new WiltedBerberisConfig(); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/dreadfarm/VoltCruxConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/dreadfarm/VoltCruxConfig.java new file mode 100644 index 000000000..307e57d45 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/dreadfarm/VoltCruxConfig.java @@ -0,0 +1,33 @@ +package at.hannibal2.skyhanni.config.features.rift.area.dreadfarm; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class VoltCruxConfig { + + @Expose + @ConfigOption(name = "Volt Warning", desc = "Shows a warning while a Volt is discharging lightning.") + @ConfigEditorBoolean + @FeatureToggle + public boolean voltWarning = true; + + @Expose + @ConfigOption(name = "Volt Range Highlighter", desc = "Shows the area in which a Volt might strike lightning.") + @ConfigEditorBoolean + @FeatureToggle + public boolean voltRange = true; + + @Expose + @ConfigOption(name = "Volt Range Highlighter Color", desc = "In which color should the Volt range be highlighted?") + @ConfigEditorColour + public String voltColour = "0:60:0:0:255"; + + @Expose + @ConfigOption(name = "Volt Mood Color", desc = "Change the color of the Volt enemy depending on their mood.") + @ConfigEditorBoolean + @FeatureToggle + public boolean voltMoodMeter = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/dreadfarm/WiltedBerberisConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/dreadfarm/WiltedBerberisConfig.java new file mode 100644 index 000000000..9cad5a475 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/dreadfarm/WiltedBerberisConfig.java @@ -0,0 +1,26 @@ +package at.hannibal2.skyhanni.config.features.rift.area.dreadfarm; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class WiltedBerberisConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Show Wilted Berberis helper.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Only on Farmland", desc = "Only show the helper while standing on Farmland blocks.") + @ConfigEditorBoolean + public boolean onlyOnFarmland = false; + + @Expose + @ConfigOption(name = "Hide Particles", desc = "Hide the Wilted Berberis particles.") + @ConfigEditorBoolean + public boolean hideparticles = false; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/livingcave/DefenseBlockConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/livingcave/DefenseBlockConfig.java new file mode 100644 index 000000000..1754afb1e --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/livingcave/DefenseBlockConfig.java @@ -0,0 +1,29 @@ +package at.hannibal2.skyhanni.config.features.rift.area.livingcave; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import io.github.moulberry.moulconfig.observer.Property; + +public class DefenseBlockConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Show a line between Defense blocks and the mob and highlight the blocks.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Hide Particles", desc = "Hide particles around Defense Blocks.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideParticles = false; + + @Expose + @ConfigOption(name = "Color", desc = "Set the color of the lines, blocks and the entity.") + @ConfigEditorColour + public Property color = Property.of("0:255:77:104:255"); + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/livingcave/LivingCaveConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/livingcave/LivingCaveConfig.java new file mode 100644 index 000000000..620238538 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/livingcave/LivingCaveConfig.java @@ -0,0 +1,23 @@ +package at.hannibal2.skyhanni.config.features.rift.area.livingcave; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class LivingCaveConfig { + + @Expose + @ConfigOption(name = "Living Metal Suit Progress", desc = "") + @Accordion + public LivingMetalSuitProgressConfig livingMetalSuitProgress = new LivingMetalSuitProgressConfig(); + + @Expose + @ConfigOption(name = "Defense Blocks", desc = "") + @Accordion + public DefenseBlockConfig defenseBlockConfig = new DefenseBlockConfig(); + + @Expose + @ConfigOption(name = "Living Metal Helper", desc = "") + @Accordion + public LivingCaveLivingMetalConfig livingCaveLivingMetalConfig = new LivingCaveLivingMetalConfig(); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/livingcave/LivingCaveLivingMetalConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/livingcave/LivingCaveLivingMetalConfig.java new file mode 100644 index 000000000..aab75d571 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/livingcave/LivingCaveLivingMetalConfig.java @@ -0,0 +1,22 @@ +package at.hannibal2.skyhanni.config.features.rift.area.livingcave; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class LivingCaveLivingMetalConfig { + + @Expose + @ConfigOption(name = "Living Metal", desc = "Show a moving animation between Living Metal and the next block.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Hide Particles", desc = "Hide Living Metal particles.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideParticles = false; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/livingcave/LivingMetalSuitProgressConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/livingcave/LivingMetalSuitProgressConfig.java new file mode 100644 index 000000000..d24520dc1 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/livingcave/LivingMetalSuitProgressConfig.java @@ -0,0 +1,24 @@ +package at.hannibal2.skyhanni.config.features.rift.area.livingcave; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class LivingMetalSuitProgressConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Display Living Metal Suit progress.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Compact", desc = "Show a compacted version of the overlay when the set is maxed.") + @ConfigEditorBoolean + public boolean compactWhenMaxed = false; + + @Expose + public Position position = new Position(100, 100); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/LavaMazeConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/LavaMazeConfig.java new file mode 100644 index 000000000..b3198cc4c --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/LavaMazeConfig.java @@ -0,0 +1,39 @@ +package at.hannibal2.skyhanni.config.features.rift.area.mirrorverse; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import io.github.moulberry.moulconfig.observer.Property; + +public class LavaMazeConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Helps solving the lava maze in the Mirrorverse by showing the correct way.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Look Ahead", desc = "Change how many platforms should be shown in front of you.") + @ConfigEditorSlider(minStep = 1, maxValue = 30, minValue = 1) + public Property lookAhead = Property.of(3); + + @Expose + @ConfigOption(name = "Rainbow Color", desc = "Show the rainbow color effect instead of a boring monochrome.") + @ConfigEditorBoolean + public Property rainbowColor = Property.of(true); + + @Expose + @ConfigOption(name = "Monochrome Color", desc = "Set a boring monochrome color for the parkour platforms.") + @ConfigEditorColour + public Property monochromeColor = Property.of("0:60:0:0:255"); + + @Expose + @ConfigOption(name = "Hide Others Players", desc = "Hide other players while doing the lava maze.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hidePlayers = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/MirrorVerseConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/MirrorVerseConfig.java new file mode 100644 index 000000000..e93324972 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/MirrorVerseConfig.java @@ -0,0 +1,29 @@ +package at.hannibal2.skyhanni.config.features.rift.area.mirrorverse; + +import at.hannibal2.skyhanni.config.features.rift.area.mirrorverse.danceroomhelper.DanceRoomHelperConfig; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class MirrorVerseConfig { + + @ConfigOption(name = "Lava Maze", desc = "") + @Accordion + @Expose + public LavaMazeConfig lavaMazeConfig = new LavaMazeConfig(); + + @ConfigOption(name = "Upside Down Parkour", desc = "") + @Accordion + @Expose + public UpsideDownParkourConfig upsideDownParkour = new UpsideDownParkourConfig(); + + @ConfigOption(name = "Dance Room Helper", desc = "") + @Accordion + @Expose + public DanceRoomHelperConfig danceRoomHelper = new DanceRoomHelperConfig(); + + @ConfigOption(name = "Tubulator", desc = "") + @Accordion + @Expose + public TubulatorConfig tubulatorConfig = new TubulatorConfig(); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/TubulatorConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/TubulatorConfig.java new file mode 100644 index 000000000..586ce2f4e --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/TubulatorConfig.java @@ -0,0 +1,44 @@ +package at.hannibal2.skyhanni.config.features.rift.area.mirrorverse; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import io.github.moulberry.moulconfig.observer.Property; + +public class TubulatorConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Highlights the location of the invisible Tubulator blocks (Laser Parkour).") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Look Ahead", desc = "Change how many platforms should be shown in front of you.") + @ConfigEditorSlider(minStep = 1, maxValue = 30, minValue = 1) + public Property lookAhead = Property.of(2); + + @Expose + @ConfigOption(name = "Outline", desc = "Outlines the top edge of the platforms.") + @ConfigEditorBoolean + public boolean outline = true; + + @Expose + @ConfigOption(name = "Rainbow Color", desc = "Show the rainbow color effect instead of a boring monochrome.") + @ConfigEditorBoolean + public Property rainbowColor = Property.of(true); + + @Expose + @ConfigOption(name = "Monochrome Color", desc = "Set a boring monochrome color for the parkour platforms.") + @ConfigEditorColour + public Property monochromeColor = Property.of("0:60:0:0:255"); + + @Expose + @ConfigOption(name = "Hide Other Players", desc = "Hide other players while doing the lava maze.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hidePlayers = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/UpsideDownParkourConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/UpsideDownParkourConfig.java new file mode 100644 index 000000000..e8712f310 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/UpsideDownParkourConfig.java @@ -0,0 +1,44 @@ +package at.hannibal2.skyhanni.config.features.rift.area.mirrorverse; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import io.github.moulberry.moulconfig.observer.Property; + +public class UpsideDownParkourConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Helps solving the upside down parkour in the Mirrorverse by showing the correct way.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Look Ahead", desc = "Change how many platforms should be shown in front of you.") + @ConfigEditorSlider(minStep = 1, maxValue = 9, minValue = 1) + public Property lookAhead = Property.of(3); + + @Expose + @ConfigOption(name = "Outline", desc = "Outlines the top edge of the platforms.") + @ConfigEditorBoolean + public boolean outline = true; + + @Expose + @ConfigOption(name = "Rainbow Color", desc = "Show the rainbow color effect instead of a boring monochrome.") + @ConfigEditorBoolean + public Property rainbowColor = Property.of(true); + + @Expose + @ConfigOption(name = "Monochrome Color", desc = "Set a boring monochrome color for the parkour platforms.") + @ConfigEditorColour + public Property monochromeColor = Property.of("0:60:0:0:255"); + + @Expose + @ConfigOption(name = "Hide Others Players", desc = "Hide other players while doing the upside down parkour.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hidePlayers = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/danceroomhelper/DanceRoomHelperConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/danceroomhelper/DanceRoomHelperConfig.java new file mode 100644 index 000000000..a5b61aee8 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/danceroomhelper/DanceRoomHelperConfig.java @@ -0,0 +1,48 @@ +package at.hannibal2.skyhanni.config.features.rift.area.mirrorverse.danceroomhelper; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import at.hannibal2.skyhanni.config.features.rift.area.mirrorverse.danceroomhelper.danceroomformatting.DanceRoomFormattingConfig; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class DanceRoomHelperConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Helps to solve the dance room in the Mirrorverse by showing multiple tasks at once.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Lines to Show", desc = "How many tasks you should see.") + @ConfigEditorSlider(minStep = 1, maxValue = 49, minValue = 1) + public int lineToShow = 3; + + @Expose + @ConfigOption(name = "Space", desc = "Change the space between each line.") + @ConfigEditorSlider(minStep = 1, maxValue = 10, minValue = -5) + public int extraSpace = 0; + + @Expose + @ConfigOption(name = "Hide Other Players", desc = "Hide other players inside the dance room.") + @ConfigEditorBoolean + public boolean hidePlayers = false; + + @Expose + @ConfigOption(name = "Hide Title", desc = "Hide Instructions, \"§aIt's happening!\" §7and \"§aKeep it up!\" §7titles.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideOriginalTitle = false; + + @Expose + @ConfigOption(name = "Formatting", desc = "") + @Accordion + public DanceRoomFormattingConfig danceRoomFormatting = new DanceRoomFormattingConfig(); + + @Expose + public Position position = new Position(442, 239, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/danceroomhelper/danceroomformatting/ColorConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/danceroomhelper/danceroomformatting/ColorConfig.java new file mode 100644 index 000000000..71f3013a6 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/danceroomhelper/danceroomformatting/ColorConfig.java @@ -0,0 +1,42 @@ +package at.hannibal2.skyhanni.config.features.rift.area.mirrorverse.danceroomhelper.danceroomformatting; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorText; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class ColorConfig { + @Expose + @ConfigOption(name = "Move", desc = "Color for the Move instruction") + @ConfigEditorText + public String move = "&e"; + + @Expose + @ConfigOption(name = "Stand", desc = "Color for the Stand instruction") + @ConfigEditorText + public String stand = "&e"; + + @Expose + @ConfigOption(name = "Sneak", desc = "Color for the Sneak instruction") + @ConfigEditorText + public String sneak = "&5"; + + @Expose + @ConfigOption(name = "Jump", desc = "Color for the Jump instruction") + @ConfigEditorText + public String jump = "&b"; + + @Expose + @ConfigOption(name = "Punch", desc = "Color for the Punch instruction") + @ConfigEditorText + public String punch = "&d"; + + @Expose + @ConfigOption(name = "Countdown", desc = "Color for the Countdown") + @ConfigEditorText + public String countdown = "&f"; + + @Expose + @ConfigOption(name = "Default", desc = "Fallback color") + @ConfigEditorText + public String fallback = "&f"; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/danceroomhelper/danceroomformatting/DanceRoomFormattingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/danceroomhelper/danceroomformatting/DanceRoomFormattingConfig.java new file mode 100644 index 000000000..1c35a3924 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/mirrorverse/danceroomhelper/danceroomformatting/DanceRoomFormattingConfig.java @@ -0,0 +1,29 @@ +package at.hannibal2.skyhanni.config.features.rift.area.mirrorverse.danceroomhelper.danceroomformatting; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorText; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class DanceRoomFormattingConfig { + + @Expose + @ConfigOption(name = "Now", desc = "Formatting for \"Now:\"") + @ConfigEditorText + public String now = "&7Now:"; + + @Expose + @ConfigOption(name = "Next", desc = "Formatting for \"Next:\"") + @ConfigEditorText + public String next = "&7Next:"; + + @Expose + @ConfigOption(name = "Later", desc = "Formatting for \"Later:\"") + @ConfigEditorText + public String later = "&7Later:"; + + @Expose + @ConfigOption(name = "Color Option", desc = "") + @Accordion + public ColorConfig color = new ColorConfig(); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/stillgorechateau/EffigiesConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/stillgorechateau/EffigiesConfig.java new file mode 100644 index 000000000..62a20c0e0 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/stillgorechateau/EffigiesConfig.java @@ -0,0 +1,37 @@ +package at.hannibal2.skyhanni.config.features.rift.area.stillgorechateau; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class EffigiesConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Show locations of inactive Blood Effigies.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Respawning Soon", desc = "Show effigies that are about to respawn.") + @ConfigEditorBoolean + @FeatureToggle + public boolean respawningSoon = false; + + @Expose + @ConfigOption(name = "Respawning Time", desc = "Time before effigies respawn to show.") + @ConfigEditorSlider( + minValue = 1, + maxValue = 15, + minStep = 1 + ) + public int respwningSoonTime = 3; + + @Expose + @ConfigOption(name = "Unknown Times", desc = "Show effigies without known time.") + @ConfigEditorBoolean + @FeatureToggle + public boolean unknownTime = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/stillgorechateau/StillgoreChateauConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/stillgorechateau/StillgoreChateauConfig.java new file mode 100644 index 000000000..761b7c1d2 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/stillgorechateau/StillgoreChateauConfig.java @@ -0,0 +1,14 @@ +package at.hannibal2.skyhanni.config.features.rift.area.stillgorechateau; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class StillgoreChateauConfig { + + @Expose + @ConfigOption(name = "Blood Effigies", desc = "") + @Accordion + public EffigiesConfig bloodEffigies = new EffigiesConfig(); + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/westvillage/KloonHackingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/westvillage/KloonHackingConfig.java new file mode 100644 index 000000000..346747aab --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/westvillage/KloonHackingConfig.java @@ -0,0 +1,27 @@ +package at.hannibal2.skyhanni.config.features.rift.area.westvillage; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class KloonHackingConfig { + + @Expose + @ConfigOption(name = "Hacking Solver", desc = "Highlights the correct button to click in the hacking inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean solver = true; + + @Expose + @ConfigOption(name = "Color Guide", desc = "Tells you which color to pick.") + @ConfigEditorBoolean + @FeatureToggle + public boolean colour = true; + + @Expose + @ConfigOption(name = "Terminal Waypoints", desc = "While wearing the helmet, waypoints will appear at each terminal location.") + @ConfigEditorBoolean + @FeatureToggle + public boolean waypoints = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/westvillage/WestVillageConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/westvillage/WestVillageConfig.java new file mode 100644 index 000000000..273080489 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/westvillage/WestVillageConfig.java @@ -0,0 +1,13 @@ +package at.hannibal2.skyhanni.config.features.rift.area.westvillage; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class WestVillageConfig { + + @ConfigOption(name = "Kloon Hacking", desc = "") + @Accordion + @Expose + public KloonHackingConfig hacking = new KloonHackingConfig(); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/wyldwoods/LarvasConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/wyldwoods/LarvasConfig.java new file mode 100644 index 000000000..b7a7aa240 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/wyldwoods/LarvasConfig.java @@ -0,0 +1,22 @@ +package at.hannibal2.skyhanni.config.features.rift.area.wyldwoods; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class LarvasConfig { + + @Expose + @ConfigOption(name = "Highlight", desc = "Highlight §cLarvas on trees §7while holding a §eLarva Hook §7in the hand.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlight = true; + + @Expose + @ConfigOption(name = "Color", desc = "Color of the Larvas.") + @ConfigEditorColour + public String highlightColor = "0:120:13:49:255"; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/wyldwoods/OdonataConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/wyldwoods/OdonataConfig.java new file mode 100644 index 000000000..e32e9e01b --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/wyldwoods/OdonataConfig.java @@ -0,0 +1,23 @@ +package at.hannibal2.skyhanni.config.features.rift.area.wyldwoods; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class OdonataConfig { + + @Expose + @ConfigOption(name = "Highlight", desc = "Highlight the small §cOdonatas §7flying around the trees while holding an " + + "§eEmpty Odonata Bottle §7in the hand.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlight = true; + + @Expose + @ConfigOption(name = "Color", desc = "Color of the Odonatas.") + @ConfigEditorColour + public String highlightColor = "0:120:13:49:255"; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/wyldwoods/WyldWoodsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/wyldwoods/WyldWoodsConfig.java new file mode 100644 index 000000000..3eae50fb5 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/wyldwoods/WyldWoodsConfig.java @@ -0,0 +1,27 @@ +package at.hannibal2.skyhanni.config.features.rift.area.wyldwoods; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class WyldWoodsConfig { + + @Expose + @ConfigOption(name = "Shy Crux Warning", desc = "Shows a warning when a Shy Crux is going to steal your time. " + + "Useful if you play without volume.") + @ConfigEditorBoolean + @FeatureToggle + public boolean shyWarning = true; + + @ConfigOption(name = "Larvas", desc = "") + @Accordion + @Expose + public LarvasConfig larvas = new LarvasConfig(); + + @ConfigOption(name = "Odonatas", desc = "") + @Accordion + @Expose + public OdonataConfig odonata = new OdonataConfig(); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/motes/InventoryValueConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/motes/InventoryValueConfig.java new file mode 100644 index 000000000..297a83a1c --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/motes/InventoryValueConfig.java @@ -0,0 +1,25 @@ +package at.hannibal2.skyhanni.config.features.rift.motes; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class InventoryValueConfig { + @Expose + @ConfigOption(name = "Inventory Value", desc = "Show total Motes NPC price for the current opened inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Number Format Type", desc = "Short: 1.2M\n" + + "Long: 1,200,000") + @ConfigEditorDropdown(values = {"Short", "Long"}) + public int formatType = 0; + + @Expose + public Position position = new Position(126, 156, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/motes/MotesConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/motes/MotesConfig.java new file mode 100644 index 000000000..2a65a6652 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/motes/MotesConfig.java @@ -0,0 +1,27 @@ +package at.hannibal2.skyhanni.config.features.rift.motes; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class MotesConfig { + + @Expose + @ConfigOption(name = "Show Motes Price", desc = "Show the Motes NPC price in the item lore.") + @ConfigEditorBoolean + @FeatureToggle + public boolean showPrice = true; + + @Expose + @ConfigOption(name = "Burger Stacks", desc = "Set your McGrubber's burger stacks.") + @ConfigEditorSlider(minStep = 1, minValue = 0, maxValue = 5) + public int burgerStacks = 0; + + @Expose + @ConfigOption(name = "Inventory Value", desc = "") + @Accordion + public InventoryValueConfig inventoryValue = new InventoryValueConfig(); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/slayer/ItemProfitTrackerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/ItemProfitTrackerConfig.java new file mode 100644 index 000000000..a7bc636db --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/ItemProfitTrackerConfig.java @@ -0,0 +1,50 @@ +package at.hannibal2.skyhanni.config.features.slayer; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class ItemProfitTrackerConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Count all items you pick up while doing slayer, " + + "keep track of how much you pay for starting slayers and calculating the overall profit.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + public Position pos = new Position(20, 20, false, true); + + @Expose + @ConfigOption(name = "Price in Chat", desc = "Show an extra chat message when you pick up an item. " + + "(This contains name, amount and price)") + @ConfigEditorBoolean + @FeatureToggle + public boolean priceInChat = false; + + @Expose + @ConfigOption(name = "Show Price From", desc = "Show price from Bazaar or NPC.") + @ConfigEditorDropdown(values = {"Instant Sell", "Sell Offer", "NPC"}) + public int priceFrom = 1; + + @Expose + @ConfigOption(name = "Minimum Price", desc = "Items below this price will not show up in chat.") + @ConfigEditorSlider(minValue = 1, maxValue = 5_000_000, minStep = 1) + public int minimumPrice = 100_000; + + @Expose + @ConfigOption(name = "Title Warning", desc = "Show a title for expensive item pickups.") + @ConfigEditorBoolean + @FeatureToggle + public boolean titleWarning = false; + + @Expose + @ConfigOption(name = "Title Price", desc = "Items above this price will show up as a title.") + @ConfigEditorSlider(minValue = 1, maxValue = 20_000_000, minStep = 1) + public int minimumPriceWarning = 500_000; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/slayer/ItemsOnGroundConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/ItemsOnGroundConfig.java new file mode 100644 index 000000000..4f3e2428d --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/ItemsOnGroundConfig.java @@ -0,0 +1,21 @@ +package at.hannibal2.skyhanni.config.features.slayer; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class ItemsOnGroundConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Show the name and price of items laying on the ground. §cOnly in slayer areas!") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Minimum Price", desc = "Items below this price will be ignored.") + @ConfigEditorSlider(minValue = 1, maxValue = 1_000_000, minStep = 1) + public int minimumPrice = 50_000; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/slayer/RngMeterDisplayConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/RngMeterDisplayConfig.java new file mode 100644 index 000000000..04b6c6704 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/RngMeterDisplayConfig.java @@ -0,0 +1,30 @@ +package at.hannibal2.skyhanni.config.features.slayer; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class RngMeterDisplayConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Display amount of bosses needed until next RNG meter drop.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Warn Empty", desc = "Warn when no item is set in the RNG Meter.") + @ConfigEditorBoolean + public boolean warnEmpty = false; + + @Expose + @ConfigOption(name = "Hide Chat", desc = "Hide the RNG meter message from chat if current item is selected.") + @ConfigEditorBoolean + public boolean hideChat = true; + + @Expose + public Position pos = new Position(410, 110, false, true); + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/slayer/SlayerBossWarningConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/SlayerBossWarningConfig.java new file mode 100644 index 000000000..1376a29a2 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/SlayerBossWarningConfig.java @@ -0,0 +1,26 @@ +package at.hannibal2.skyhanni.config.features.slayer; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class SlayerBossWarningConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Send a title when your boss is about to spawn.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Percent", desc = "The percentage at which the title and sound should be sent.") + @ConfigEditorSlider(minStep = 1, minValue = 50, maxValue = 90) + public int percent = 80; + + @Expose + @ConfigOption(name = "Repeat", desc = "Resend the title and sound on every kill after reaching the configured percent value.") + @ConfigEditorBoolean + public boolean repeat = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/slayer/SlayerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/SlayerConfig.java new file mode 100644 index 000000000..89128e7ff --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/SlayerConfig.java @@ -0,0 +1,77 @@ +package at.hannibal2.skyhanni.config.features.slayer; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.features.slayer.blaze.BlazeConfig; +import at.hannibal2.skyhanni.config.features.slayer.endermen.EndermanConfig; +import at.hannibal2.skyhanni.config.features.slayer.vampire.VampireConfig; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.Category; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class SlayerConfig { + + @Expose + @Category(name = "Endermen", desc = "Endermen Slayer Feature") + @Accordion + public EndermanConfig endermen = new EndermanConfig(); + + @Expose + @Category(name = "Blaze", desc = "Blaze Slayer Features") + public BlazeConfig blazes = new BlazeConfig(); + + @Expose + @Category(name = "Vampire", desc = "Vampire Slayer Features") + public VampireConfig vampire = new VampireConfig(); + + @Expose + @ConfigOption(name = "Item Profit Tracker", desc = "") + @Accordion + public ItemProfitTrackerConfig itemProfitTracker = new ItemProfitTrackerConfig(); + + @Expose + @ConfigOption(name = "Items on Ground", desc = "") + @Accordion + public ItemsOnGroundConfig itemsOnGround = new ItemsOnGroundConfig(); + + @Expose + @ConfigOption(name = "RNG Meter Display", desc = "") + @Accordion + public RngMeterDisplayConfig rngMeterDisplay = new RngMeterDisplayConfig(); + + @Expose + @ConfigOption(name = "Boss Spawn Warning", desc = "") + @Accordion + public SlayerBossWarningConfig slayerBossWarning = new SlayerBossWarningConfig(); + + @Expose + @ConfigOption(name = "Miniboss Highlight", desc = "Highlight Slayer Mini-Boss in blue color.") + @ConfigEditorBoolean + @FeatureToggle + public boolean slayerMinibossHighlight = false; + + @Expose + @ConfigOption(name = "Line to Miniboss", desc = "Adds a line to every Slayer Mini-Boss around you.") + @ConfigEditorBoolean + @FeatureToggle + public boolean slayerMinibossLine = false; + + @Expose + @ConfigOption(name = "Hide Mob Names", desc = "Hide the name of the mobs you need to kill in order for the Slayer boss to spawn. Exclude mobs that are damaged, corrupted, runic or semi rare.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideMobNames = false; + + @Expose + @ConfigOption(name = "Quest Warning", desc = "Warning when wrong Slayer quest is selected, or killing mobs for the wrong Slayer.") + @ConfigEditorBoolean + @FeatureToggle + public boolean questWarning = true; + + @Expose + @ConfigOption(name = "Quest Warning Title", desc = "Sends a title when warning.") + @ConfigEditorBoolean + @FeatureToggle + public boolean questWarningTitle = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/slayer/blaze/BlazeConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/blaze/BlazeConfig.java new file mode 100644 index 000000000..c631b10f8 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/blaze/BlazeConfig.java @@ -0,0 +1,32 @@ +package at.hannibal2.skyhanni.config.features.slayer.blaze; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class BlazeConfig { + @Expose + @ConfigOption(name = "Hellion Shields", desc = "") + @Accordion + public BlazeHellionConfig hellion = new BlazeHellionConfig(); + + + @Expose + @ConfigOption(name = "Fire Pits", desc = "Warning when the fire pit phase starts for the Blaze Slayer tier 3 and 4.") + @ConfigEditorBoolean + @FeatureToggle + public boolean firePitsWarning = false; + + @Expose + @ConfigOption(name = "Phase Display", desc = "Show the current phase of the Blaze Slayer boss.") + @ConfigEditorBoolean + public boolean phaseDisplay = false; + + @Expose + @ConfigOption(name = "Clear View", desc = "Hide particles and fireballs near Blaze Slayer bosses and demons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean clearView = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/slayer/blaze/BlazeHellionConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/blaze/BlazeHellionConfig.java new file mode 100644 index 000000000..4a5e4af8c --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/blaze/BlazeHellionConfig.java @@ -0,0 +1,45 @@ +package at.hannibal2.skyhanni.config.features.slayer.blaze; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class BlazeHellionConfig { + @Expose + @ConfigOption(name = "Colored Mobs", desc = "Color the Blaze Slayer boss and the demons in the right hellion shield color.") + @ConfigEditorBoolean + @FeatureToggle + public boolean coloredMobs = false; + + @Expose + @ConfigOption(name = "Blaze Daggers", desc = "Faster and permanent display for the Blaze Slayer daggers.") + @ConfigEditorBoolean + @FeatureToggle + public boolean daggers = false; + + @Expose + @ConfigOption(name = "Right Dagger", desc = "Mark the right dagger to use for Blaze Slayer in the dagger overlay.") + @ConfigEditorBoolean + @FeatureToggle + public boolean markRightHellionShield = false; + + @Expose + @ConfigOption(name = "First Dagger", desc = "Select the first, left sided dagger for the display.") + @ConfigEditorDropdown(values = {"Spirit/Crystal", "Ashen/Auric"}) + public int firstDagger = 0; + + @Expose + @ConfigOption(name = "Hide Chat", desc = "Remove the wrong Blaze Slayer dagger messages from chat.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideDaggerWarning = false; + + @Expose + public Position positionTop = new Position(-475, 173, 4.4f, true); + + @Expose + public Position positionBottom = new Position(-475, 230, 3.2f, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/slayer/endermen/EndermanBeaconConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/endermen/EndermanBeaconConfig.java new file mode 100644 index 000000000..32592e4b9 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/endermen/EndermanBeaconConfig.java @@ -0,0 +1,46 @@ +package at.hannibal2.skyhanni.config.features.slayer.endermen; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class EndermanBeaconConfig { + + @Expose + @ConfigOption(name = "Highlight Beacon", + desc = "Highlight the Enderman Slayer Yang Glyph (beacon) in red color and added a timer for when he explodes. " + + "Supports beacon in hand and beacon flying.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightBeacon = true; + + @Expose + @ConfigOption(name = "Beacon Color", desc = "Color of the beacon.") + @ConfigEditorColour + public String beaconColor = "0:255:255:0:88"; + + @Expose + @ConfigOption(name = "Show Warning", desc = "Displays a warning mid-screen when the Enderman Slayer throws a Yang Glyph (beacon).") + @ConfigEditorBoolean + @FeatureToggle + public boolean showWarning = false; + + @Expose + @ConfigOption(name = "Show Line", desc = "Draw a line starting at your crosshair to the beacon.") + @ConfigEditorBoolean + @FeatureToggle + public boolean showLine = false; + + @Expose + @ConfigOption(name = "Line Color", desc = "Color of the line.") + @ConfigEditorColour + public String lineColor = "0:255:255:0:88"; + + @Expose + @ConfigOption(name = "Line Width", desc = "Width of the line.") + @ConfigEditorSlider(minStep = 1, minValue = 1, maxValue = 10) + public int lineWidth = 3; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/slayer/endermen/EndermanConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/endermen/EndermanConfig.java new file mode 100644 index 000000000..7b5ce353e --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/endermen/EndermanConfig.java @@ -0,0 +1,31 @@ +package at.hannibal2.skyhanni.config.features.slayer.endermen; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class EndermanConfig { + @Expose + @ConfigOption(name = "Yang Glyph (beacon)", desc = "") + @Accordion + public EndermanBeaconConfig beacon = new EndermanBeaconConfig(); + + @Expose + @ConfigOption(name = "Highlight Nukekubi Skulls", desc = "Highlights the Enderman Slayer Nukekubi Skulls (Eyes).") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightNukekebi = false; + + @Expose + @ConfigOption(name = "Phase Display", desc = "Show the current phase of the Enderman Slayer in damage indcator.") + @ConfigEditorBoolean + public boolean phaseDisplay = false; + + @Expose + @ConfigOption(name = "Hide Particles", desc = "Hide particles around Enderman Slayer bosses and Mini-Bosses.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideParticles = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/BloodIchorConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/BloodIchorConfig.java new file mode 100644 index 000000000..7daca5ea3 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/BloodIchorConfig.java @@ -0,0 +1,38 @@ +package at.hannibal2.skyhanni.config.features.slayer.vampire; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class BloodIchorConfig { + @Expose + @ConfigOption(name = "Highlight Blood Ichor", desc = "Highlight the Blood Ichor.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlight = false; + + @Expose + @ConfigOption(name = "Beacon Beam", desc = "Render a beacon beam where the Blood Ichor is.") + @ConfigEditorBoolean + @FeatureToggle + public boolean renderBeam = true; + + @Expose + @ConfigOption(name = "Color", desc = "Highlight color.") + @ConfigEditorColour + public String color = "0:199:100:0:88"; + + @Expose + @ConfigOption(name = "Show Lines", desc = "Draw lines that start from the head of the boss and end on the Blood Ichor.") + @ConfigEditorBoolean + @FeatureToggle + public boolean showLines = false; + + @Expose + @ConfigOption(name = "Lines Start Color", desc = "Starting color of the lines.") + @ConfigEditorColour + public String linesColor = "0:255:255:13:0"; + +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/CoopBossHighlightConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/CoopBossHighlightConfig.java new file mode 100644 index 000000000..5c91c41a9 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/CoopBossHighlightConfig.java @@ -0,0 +1,44 @@ +package at.hannibal2.skyhanni.config.features.slayer.vampire; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigEditorText; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class CoopBossHighlightConfig { + @Expose + @ConfigOption(name = "Highlight Co-op Boss", desc = "Highlight boss of your co-op member.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlight = true; + + @Expose + @ConfigOption(name = "Highlight Color", desc = "What color to highlight the boss in.") + @ConfigEditorColour + public String highlightColor = "0:249:0:255:88"; + + @Expose + @ConfigOption(name = "Co-op Members", desc = "Add your co-op member here.\n§eFormat: §7Name1,Name2,Name3") + @ConfigEditorText + public String coopMembers = ""; + + @Expose + @ConfigOption(name = "Steak Alert", desc = "Show a title when you can steak the boss.") + @ConfigEditorBoolean + @FeatureToggle + public boolean steakAlert = true; + + @Expose + @ConfigOption(name = "Twinclaws Title", desc = "Send a title when Twinclaws is about to happen.") + @ConfigEditorBoolean + @FeatureToggle + public boolean twinClawsTitle = true; + + @Expose + @ConfigOption(name = "Twinclaws Sound", desc = "Play a sound when Twinclaws is about to happen.") + @ConfigEditorBoolean + @FeatureToggle + public boolean twinClawsSound = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/KillerSpringConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/KillerSpringConfig.java new file mode 100644 index 000000000..1d38c7ce7 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/KillerSpringConfig.java @@ -0,0 +1,31 @@ +package at.hannibal2.skyhanni.config.features.slayer.vampire; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class KillerSpringConfig { + @Expose + @ConfigOption(name = "Highlight Killer Spring", desc = "Highlight the Killer Spring tower.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlight = false; + + @Expose + @ConfigOption(name = "Color", desc = "Highlight color.") + @ConfigEditorColour + public String color = "0:199:100:0:88"; + + @Expose + @ConfigOption(name = "Show Lines", desc = "Draw lines that start from the head of the boss and end on the Killer Spring tower.") + @ConfigEditorBoolean + @FeatureToggle + public boolean showLines = false; + + @Expose + @ConfigOption(name = "Lines Start Color", desc = "Starting color of the lines.") + @ConfigEditorColour + public String linesColor = "0:255:255:13:0"; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/OthersBossConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/OthersBossConfig.java new file mode 100644 index 000000000..6a89c9f77 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/OthersBossConfig.java @@ -0,0 +1,39 @@ +package at.hannibal2.skyhanni.config.features.slayer.vampire; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class OthersBossConfig { + + @Expose + @ConfigOption(name = "Highlight Others Boss", desc = "Highlight others players boss.\nYou need to hit them first.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlight = true; + + @Expose + @ConfigOption(name = "Highlight Color", desc = "What color to highlight the boss in.") + @ConfigEditorColour + public String highlightColor = "0:249:0:255:88"; + + @Expose + @ConfigOption(name = "Steak Alert", desc = "Show a title when you can steak the boss.") + @ConfigEditorBoolean + @FeatureToggle + public boolean steakAlert = true; + + @Expose + @ConfigOption(name = "Twinclaws Title", desc = "Send a title when Twinclaws is about to happen.") + @ConfigEditorBoolean + @FeatureToggle + public boolean twinClawsTitle = true; + + @Expose + @ConfigOption(name = "Twinclaws Sound", desc = "Play a sound when Twinclaws is about to happen.") + @ConfigEditorBoolean + @FeatureToggle + public boolean twinClawsSound = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/OwnBossConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/OwnBossConfig.java new file mode 100644 index 000000000..481576242 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/OwnBossConfig.java @@ -0,0 +1,39 @@ +package at.hannibal2.skyhanni.config.features.slayer.vampire; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class OwnBossConfig { + + @Expose + @ConfigOption(name = "Highlight Your Boss", desc = "Highlight your own Vampire Slayer boss.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlight = true; + + @Expose + @ConfigOption(name = "Highlight Color", desc = "What color to highlight the boss in.") + @ConfigEditorColour + public String highlightColor = "0:249:0:255:88"; + + @Expose + @ConfigOption(name = "Steak Alert", desc = "Show a title when you can steak your boss.") + @ConfigEditorBoolean + @FeatureToggle + public boolean steakAlert = true; + + @Expose + @ConfigOption(name = "Twinclaws Title", desc = "Send a title when Twinclaws is about to happen.\nWork on others highlighted people boss.") + @ConfigEditorBoolean + @FeatureToggle + public boolean twinClawsTitle = true; + + @Expose + @ConfigOption(name = "Twinclaws Sound", desc = "Play a sound when Twinclaws is about to happen.") + @ConfigEditorBoolean + @FeatureToggle + public boolean twinClawsSound = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/VampireConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/VampireConfig.java new file mode 100644 index 000000000..4a068878b --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/vampire/VampireConfig.java @@ -0,0 +1,80 @@ +package at.hannibal2.skyhanni.config.features.slayer.vampire; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class VampireConfig { + + @Expose + @ConfigOption(name = "Your Boss", desc = "") + @Accordion + public OwnBossConfig ownBoss = new OwnBossConfig(); + + @Expose + @ConfigOption(name = "Others Boss", desc = "") + @Accordion + public OthersBossConfig othersBoss = new OthersBossConfig(); + + @Expose + @ConfigOption(name = "Co-op Boss", desc = "") + @Accordion + public CoopBossHighlightConfig coopBoss = new CoopBossHighlightConfig(); + + @Expose + @ConfigOption(name = "Transparency", desc = "Choose the transparency of the color.") + @ConfigEditorSlider(minStep = 1, minValue = 1, maxValue = 250) + public int withAlpha = 80; + + @Expose + @ConfigOption(name = "See Through Blocks", desc = "Highlight even when behind others mobs/players.") + @ConfigEditorBoolean + public boolean seeThrough = false; + + @Expose + @ConfigOption(name = "Low Health", desc = "Change color when the boss is below 20% health.") + @ConfigEditorBoolean + @FeatureToggle + public boolean changeColorWhenCanSteak = true; + + @Expose + @ConfigOption(name = "Can use Steak Color", desc = "Color when the boss is below 20% health.") + @ConfigEditorColour + public String steakColor = "0:255:255:0:88"; + + @Expose + @ConfigOption(name = "Twinclaws", desc = "Delay the sound and title of Twinclaws alert for a given amount in milliseconds.") + @ConfigEditorSlider(minStep = 1, minValue = 0, maxValue = 1000) + public int twinclawsDelay = 0; + + @Expose + @ConfigOption(name = "Draw Line", desc = "Draw a line starting at your crosshair to the boss head.") + @ConfigEditorBoolean + @FeatureToggle + public boolean drawLine = false; + + @Expose + @ConfigOption(name = "Line Color", desc = "Color of the line.") + @ConfigEditorColour + public String lineColor = "0:255:255:0:88"; + + @Expose + @ConfigOption(name = "Line Width", desc = "Width of the line.") + @ConfigEditorSlider(minStep = 1, minValue = 1, maxValue = 10) + public int lineWidth = 1; + + + @Expose + @ConfigOption(name = "Blood Ichor", desc = "") + @Accordion + public BloodIchorConfig bloodIchor = new BloodIchorConfig(); + + @Expose + @ConfigOption(name = "Killer Spring", desc = "") + @Accordion + public KillerSpringConfig killerSpring = new KillerSpringConfig(); +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/cosmetics/ArrowTrail.kt b/src/main/java/at/hannibal2/skyhanni/features/cosmetics/ArrowTrail.kt index f7a28d78d..da18e8d28 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/cosmetics/ArrowTrail.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/cosmetics/ArrowTrail.kt @@ -21,7 +21,7 @@ import kotlin.time.toDuration class ArrowTrail { - private val config get() = SkyHanniMod.feature.misc.cosmeticConfig.arrowTrailConfig + private val config get() = SkyHanniMod.feature.misc.cosmetic.arrowTrail private data class Line(val start: LorenzVec, val end: LorenzVec, val deathTime: SimpleTimeMark) diff --git a/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt b/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt index 5dda13876..662ad68a0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.cosmetics import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent @@ -19,7 +20,7 @@ import kotlin.time.Duration.Companion.milliseconds import kotlin.time.Duration.Companion.seconds class CosmeticFollowingLine { - private val config get() = SkyHanniMod.feature.misc.cosmeticConfig.followingLineConfig + private val config get() = SkyHanniMod.feature.misc.cosmetic.followingLine private var locations = mapOf() private var latestLocations = mapOf() @@ -120,4 +121,11 @@ class CosmeticFollowingLine { } } } + + @SubscribeEvent + fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { + event.move(9, "misc.cosmeticConfig", "misc.cosmetic") + event.move(9, "misc.cosmeticConfig.followingLineConfig", "misc.cosmetic.followingLine") + event.move(9, "misc.cosmeticConfig.arrowTrailConfig", "misc.cosmetic.arrowTrail") + } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt index 99f5910ea..d516695a2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.garden.visitor import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.config.features.GardenConfig.VisitorConfig.VisitorBlockBehaviour +import at.hannibal2.skyhanni.config.features.garden.visitor.VisitorConfig.VisitorBlockBehaviour import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.PacketEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorTooltipParser.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorTooltipParser.kt index 5d6e7ee26..510e4f3b7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorTooltipParser.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorTooltipParser.kt @@ -1,13 +1,13 @@ package at.hannibal2.skyhanni.features.garden.visitor -import at.hannibal2.skyhanni.config.features.GardenConfig +import at.hannibal2.skyhanni.config.features.garden.GardenConfig import at.hannibal2.skyhanni.utils.ItemUtils class VisitorTooltipParser { class ParsedTooltip( - val itemsNeeded: MutableMap, - val rewards: MutableMap, - val config: GardenConfig, + val itemsNeeded: MutableMap, + val rewards: MutableMap, + val config: GardenConfig, ) enum class ParsingSection { @@ -39,4 +39,4 @@ class VisitorTooltipParser { return parsedData; } } -} \ No newline at end of file +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt index 4dfebc099..fe9d55176 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt @@ -69,11 +69,12 @@ class CurrentPetDisplay { if (!SkyHanniMod.feature.misc.pets.display) return val storage = ProfileStorageData.profileSpecific ?: return - SkyHanniMod.feature.misc.petDisplayPos.renderString(storage.currentPet, posLabel = "Current Pet") + SkyHanniMod.feature.misc.pets.displayPos.renderString(storage.currentPet, posLabel = "Current Pet") } @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { event.move(3, "misc.petDisplay", "misc.pets.display") + event.move(9, "misc.petDisplayPos", "misc.pets.displayPos") } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/RiftAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/RiftAPI.kt index 4fbbed3d3..507dc5953 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/RiftAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/RiftAPI.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.rift import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.config.features.RiftConfig +import at.hannibal2.skyhanni.config.features.rift.RiftConfig import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.LorenzUtils diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/RiftLarva.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/RiftLarva.kt deleted file mode 100644 index c68e6d2f5..000000000 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/RiftLarva.kt +++ /dev/null @@ -1,49 +0,0 @@ -package at.hannibal2.skyhanni.features.rift.area - -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.withAlpha -import at.hannibal2.skyhanni.features.rift.RiftAPI -import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper -import at.hannibal2.skyhanni.utils.EntityUtils.getEntities -import at.hannibal2.skyhanni.utils.EntityUtils.hasSkullTexture -import at.hannibal2.skyhanni.utils.InventoryUtils -import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName -import at.hannibal2.skyhanni.utils.LorenzUtils.toChromaColor -import net.minecraft.entity.item.EntityArmorStand -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent - -class RiftLarva { - private val config get() = RiftAPI.config.area.wyldWoodsConfig.larvas - private var hasHookInHand = false - val larvaSkullTexture = - "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTgzYjMwZTlkMTM1YjA1MTkwZWVhMmMzYWM2MWUyYWI1NWEyZDgxZTFhNThkYmIyNjk4M2ExNDA4MjY2NCJ9fX0=" - - @SubscribeEvent - fun onTick(event: LorenzTickEvent) { - if (!isEnabled()) return - - checkHand() - if (!hasHookInHand) return - - if (event.repeatSeconds(1)) { - findLarvas() - } - } - - private fun checkHand() { - hasHookInHand = InventoryUtils.getItemInHand()?.getInternalName()?.equals("LARVA_HOOK") ?: false - } - - private fun findLarvas() { - for (stand in getEntities()) { - if (stand.hasSkullTexture(larvaSkullTexture)) { - RenderLivingEntityHelper.setEntityColor( - stand, - config.highlightColor.toChromaColor().withAlpha(1) - ) { isEnabled() && hasHookInHand } - } - } - } - - fun isEnabled() = RiftAPI.inRift() && config.highlight -} diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt index ceb8b5931..9fad9e999 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.rift.area.colosseum import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.withAlpha @@ -15,7 +16,7 @@ import java.awt.Color class BlobbercystsHighlight { - private val config get() = SkyHanniMod.feature.rift.area.colosseumConfig + private val config get() = SkyHanniMod.feature.rift.area.colosseum private val entityList = mutableListOf() private val blobberName = "Blobbercyst " @@ -47,4 +48,9 @@ class BlobbercystsHighlight { } fun isEnabled() = RiftAPI.inRift() && config.highlightBlobbercysts && LorenzUtils.skyBlockArea == "Colosseum" -} \ No newline at end of file + + @SubscribeEvent + fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { + event.move(9, "rift.area.colosseumConfig", "rift.area.colosseum") + } +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt index fb37bfabe..5ef56976f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.features.rift.area.dreadfarm +import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.features.rift.RiftAPI @@ -14,7 +15,7 @@ import at.hannibal2.skyhanni.utils.TimeUtils import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class RiftAgaricusCap { - private val config get() = RiftAPI.config.area.dreadfarmConfig + private val config get() = RiftAPI.config.area.dreadfarm private var startTime = 0L private var location: LorenzVec? = null @@ -71,4 +72,9 @@ class RiftAgaricusCap { } fun isEnabled() = RiftAPI.inRift() && config.agaricusCap + + @SubscribeEvent + fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { + event.move(9, "rift.area.dreadfarmConfig", "rift.area.dreadfarm") + } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt index 0058971ef..b39c6d004 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt @@ -21,7 +21,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.awt.Color class RiftWiltedBerberisHelper { - private val config get() = RiftAPI.config.area.dreadfarmConfig.wiltedBerberis + private val config get() = RiftAPI.config.area.dreadfarm.wiltedBerberis private var isOnFarmland = false private var hasFarmingToolInHand = false private var list = listOf() diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt index f7f14a55d..6cf37e285 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt @@ -25,7 +25,7 @@ import kotlin.time.Duration.Companion.seconds class VoltHighlighter { - private val config get() = RiftAPI.config.area.dreadfarmConfig.voltCrux + private val config get() = RiftAPI.config.area.dreadfarm.voltCrux private val LIGHTNING_DISTANCE = 7F private val ARMOR_SLOT_HEAD = 3 @@ -116,4 +116,4 @@ class VoltHighlighter { val helmet = entity.getCurrentArmor(ARMOR_SLOT_HEAD) ?: return VoltState.NO_VOLT return getVoltState(helmet) } -} \ No newline at end of file +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt index 0b314d7e9..1257f8db4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.features.rift.area.livingcave +import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent @@ -22,7 +23,7 @@ import net.minecraft.util.EnumParticleTypes import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class LivingCaveDefenseBlocks { - private val config get() = RiftAPI.config.area.livingCaveConfig.defenseBlockConfig + private val config get() = RiftAPI.config.area.livingCave.defenseBlockConfig private var movingBlocks = mapOf() private var staticBlocks = emptyList() @@ -172,4 +173,9 @@ class LivingCaveDefenseBlocks { val color get() = config.color.get().toChromaColor() fun isEnabled() = RiftAPI.inRift() && config.enabled && RiftAPI.inLivingCave() + + @SubscribeEvent + fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { + event.move(9, "rift.area.livingCaveConfig", "rift.area.livingCave") + } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt index 73a007a4a..cabc094db 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt @@ -14,7 +14,7 @@ import at.hannibal2.skyhanni.utils.LorenzVec import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class LivingCaveLivingMetalHelper { - private val config get() = RiftAPI.config.area.livingCaveConfig.livingCaveLivingMetalConfig + private val config get() = RiftAPI.config.area.livingCave.livingCaveLivingMetalConfig private var lastClicked: LorenzVec? = null private var pair: Pair? = null private var startTime = 0L diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingMetalSuitProgress.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingMetalSuitProgress.kt index 025803ce1..1deb2b64c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingMetalSuitProgress.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingMetalSuitProgress.kt @@ -14,7 +14,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class LivingMetalSuitProgress { - private val config get() = RiftAPI.config.area.livingCaveConfig.livingMetalSuitProgress + private val config get() = RiftAPI.config.area.livingCave.livingMetalSuitProgress private var display = emptyList>() private var progressMap = mapOf() @@ -92,4 +92,4 @@ class LivingMetalSuitProgress { } fun isEnabled() = RiftAPI.inRift() && config.enabled -} \ No newline at end of file +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt index ec503bcfd..524e1b354 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.features.rift.area.mirrorverse +import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.CheckRenderEntityEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzTickEvent @@ -25,7 +26,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object DanceRoomHelper { private var display = emptyList() - private val config get() = RiftAPI.config.area.mirrorVerseConfig.danceRoomHelper + private val config get() = RiftAPI.config.area.mirrorverse.danceRoomHelper private var index = 0 private var found = false private val danceRoom = AxisAlignedBB(-260.0, 32.0, -110.0, -267.0, 40.0, -102.0) @@ -179,4 +180,9 @@ object DanceRoomHelper { } fun isEnabled() = RiftAPI.inRift() && config.enabled + + @SubscribeEvent + fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { + event.move(9, "rift.area.mirrorVerseConfig", "rift.area.mirrorverse") + } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftLavaMazeParkour.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftLavaMazeParkour.kt index 12bebc3ee..efaf77163 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftLavaMazeParkour.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftLavaMazeParkour.kt @@ -13,7 +13,7 @@ import at.hannibal2.skyhanni.utils.jsonobjects.ParkourJson import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class RiftLavaMazeParkour { - private val config get() = RiftAPI.config.area.mirrorVerseConfig.lavaMazeConfig + private val config get() = RiftAPI.config.area.mirrorverse.lavaMazeConfig private var parkourHelper: ParkourHelper? = null @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftUpsideDownParkour.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftUpsideDownParkour.kt index 136c956cf..18a09709d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftUpsideDownParkour.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftUpsideDownParkour.kt @@ -13,7 +13,7 @@ import at.hannibal2.skyhanni.utils.jsonobjects.ParkourJson import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class RiftUpsideDownParkour { - private val config get() = RiftAPI.config.area.mirrorVerseConfig.upsideDownParkour + private val config get() = RiftAPI.config.area.mirrorverse.upsideDownParkour private var parkourHelper: ParkourHelper? = null @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/TubulatorParkour.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/TubulatorParkour.kt index fcd880b3d..567f2bf2e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/TubulatorParkour.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/TubulatorParkour.kt @@ -14,7 +14,7 @@ import net.minecraft.util.AxisAlignedBB import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class TubulatorParkour { - private val config get() = RiftAPI.config.area.mirrorVerseConfig.tubulatorConfig + private val config get() = RiftAPI.config.area.mirrorverse.tubulatorConfig private var parkourHelper: ParkourHelper? = null private val puzzleRoom = AxisAlignedBB(-298.0, 0.0, -112.0, -309.0, 63.0, -101.0) diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt index f6a4a607b..5a79d7c7d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.features.rift.area.stillgorechateau +import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent @@ -23,7 +24,7 @@ import net.minecraft.entity.item.EntityArmorStand import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class RiftBloodEffigies { - private val config get() = RiftAPI.config.area.stillgoreChateauConfig.bloodEffigies + private val config get() = RiftAPI.config.area.stillgoreChateau.bloodEffigies private var locations: List = emptyList() private var effigiesTimes = mapOf( 0 to -1L, @@ -142,4 +143,9 @@ class RiftBloodEffigies { } fun isEnabled() = RiftAPI.inRift() && RiftAPI.inStillgoreChateau() && config.enabled + + @SubscribeEvent + fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { + event.move(9, "rift.area.stillgoreChateauConfig", "rift.area.stillgoreChateau") + } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/KloonHacking.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/KloonHacking.kt index aa598c10b..57eb0ead2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/KloonHacking.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/KloonHacking.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.features.rift.area.westvillage +import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent @@ -23,7 +24,7 @@ import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class KloonHacking { - private val config get() = RiftAPI.config.area.westVillageConfig.hacking + private val config get() = RiftAPI.config.area.westVillage.hacking // TODO USE SH-REPO val pattern = "You've set the color of this terminal to (?.*)!".toPattern() @@ -162,4 +163,9 @@ class KloonHacking { nearestTerminal = closestTerminal return closestTerminal } + + @SubscribeEvent + fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { + event.move(9, "rift.area.westVillageConfig", "rift.area.westVillage") + } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftLarva.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftLarva.kt new file mode 100644 index 000000000..7c994ea1b --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftLarva.kt @@ -0,0 +1,49 @@ +package at.hannibal2.skyhanni.features.rift.area.wyldwoods + +import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.withAlpha +import at.hannibal2.skyhanni.features.rift.RiftAPI +import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper +import at.hannibal2.skyhanni.utils.EntityUtils.getEntities +import at.hannibal2.skyhanni.utils.EntityUtils.hasSkullTexture +import at.hannibal2.skyhanni.utils.InventoryUtils +import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName +import at.hannibal2.skyhanni.utils.LorenzUtils.toChromaColor +import net.minecraft.entity.item.EntityArmorStand +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +class RiftLarva { + private val config get() = RiftAPI.config.area.wyldWoods.larvas + private var hasHookInHand = false + val larvaSkullTexture = + "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTgzYjMwZTlkMTM1YjA1MTkwZWVhMmMzYWM2MWUyYWI1NWEyZDgxZTFhNThkYmIyNjk4M2ExNDA4MjY2NCJ9fX0=" + + @SubscribeEvent + fun onTick(event: LorenzTickEvent) { + if (!isEnabled()) return + + checkHand() + if (!hasHookInHand) return + + if (event.repeatSeconds(1)) { + findLarvas() + } + } + + private fun checkHand() { + hasHookInHand = InventoryUtils.getItemInHand()?.getInternalName()?.equals("LARVA_HOOK") ?: false + } + + private fun findLarvas() { + for (stand in getEntities()) { + if (stand.hasSkullTexture(larvaSkullTexture)) { + RenderLivingEntityHelper.setEntityColor( + stand, + config.highlightColor.toChromaColor().withAlpha(1) + ) { isEnabled() && hasHookInHand } + } + } + } + + fun isEnabled() = RiftAPI.inRift() && config.highlight +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt index ded7de44c..1093a8a69 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt @@ -14,7 +14,7 @@ import net.minecraft.entity.item.EntityArmorStand import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class RiftOdonata { - private val config get() = RiftAPI.config.area.wyldWoodsConfig.odonata + private val config get() = RiftAPI.config.area.wyldWoods.odonata private var hasBottleInHand = false val odonataSkullTexture = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOWZkODA2ZGVmZGZkZjU5YjFmMjYwOWM4ZWUzNjQ2NjZkZTY2MTI3YTYyMzQxNWI1NDMwYzkzNThjNjAxZWY3YyJ9fX0=" diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt index 7ac4d1ed6..2b21d9dad 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.features.rift.area.wyldwoods +import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.utils.EntityUtils @@ -9,7 +10,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.milliseconds class ShyCruxWarnings { - private val config get() = RiftAPI.config.area.wyldWoodsConfig + private val config get() = RiftAPI.config.area.wyldWoods private val shyNames = arrayOf("I'm ugly! :(", "Eek!", "Don't look at me!", "Look away!") @SubscribeEvent @@ -25,4 +26,9 @@ class ShyCruxWarnings { LorenzUtils.sendTitle("§eLook away!", 150.milliseconds) } } -} \ No newline at end of file + + @SubscribeEvent + fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { + event.move(9, "rift.area.wyldWoodsConfig", "rift.area.wyldWoods") + } +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/RiftMotesOrb.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/RiftMotesOrb.kt index aca97f9e0..f62ad2c7a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/RiftMotesOrb.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/RiftMotesOrb.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.features.rift.everywhere.motes +import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent @@ -16,7 +17,7 @@ import net.minecraft.util.EnumParticleTypes import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class RiftMotesOrb { - private val config get() = RiftAPI.config.motesOrbsConfig + private val config get() = RiftAPI.config.motesOrbs // TODO USE SH-REPO private val pattern = "§5§lORB! §r§dPicked up §r§5+.* Motes§r§d.*".toPattern() @@ -90,4 +91,9 @@ class RiftMotesOrb { } fun isEnabled() = RiftAPI.inRift() && config.enabled + + @SubscribeEvent + fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { + event.move(9, "rift.area.motesOrbsConfig", "rift.area.motesOrbs") + } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt index a60d1e51a..59ca5b075 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.slayer import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.events.EntityClickEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent @@ -49,7 +50,7 @@ import kotlin.time.Duration.Companion.milliseconds object VampireSlayerFeatures { - private val config get() = SkyHanniMod.feature.slayer.vampireSlayerConfig + private val config get() = SkyHanniMod.feature.slayer.vampire private val configOwnBoss get() = config.ownBoss private val configOtherBoss get() = config.othersBoss private val configCoopBoss get() = config.coopBoss @@ -378,5 +379,10 @@ object VampireSlayerFeatures { } } + @SubscribeEvent + fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { + event.move(9, "slayer.vampireSlayerConfig", "slayer.vampire") + } + fun isEnabled() = RiftAPI.inRift() && RiftAPI.inStillgoreChateau() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt index ae76d4c9b..42c50f00a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt @@ -40,7 +40,7 @@ import kotlin.time.Duration.Companion.seconds class EndermanSlayerFeatures { private val config get() = SkyHanniMod.feature.slayer.endermen - private val beaconConfig get() = config.endermanBeaconConfig + private val beaconConfig get() = config.beacon private val endermenWithBeacons = mutableListOf() private var flyingBeacons = listOf() private val nukekubiSkulls = mutableListOf() @@ -227,5 +227,6 @@ class EndermanSlayerFeatures { event.move(3, "slayer.endermanBeaconConfig.lneColor", "slayer.endermen.endermanBeaconConfig.lineColor") event.move(3, "slayer.endermanBeaconConfig.lineWidth", "slayer.endermen.endermanBeaconConfig.lineWidth") event.move(3, "slayer.endermanHighlightNukekebi", "slayer.endermen.highlightNukekebi") + event.move(9, "slayer.enderman.endermanBeaconConfig", "slayer.endermen.beacon") } } diff --git a/src/test/java/at/hannibal2/skyhanni/test/garden/VisitorToolTipParserTest.kt b/src/test/java/at/hannibal2/skyhanni/test/garden/VisitorToolTipParserTest.kt index 0f2ad1fee..11b404e4c 100644 --- a/src/test/java/at/hannibal2/skyhanni/test/garden/VisitorToolTipParserTest.kt +++ b/src/test/java/at/hannibal2/skyhanni/test/garden/VisitorToolTipParserTest.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.test.garden -import at.hannibal2.skyhanni.config.features.GardenConfig +import at.hannibal2.skyhanni.config.features.garden.GardenConfig import at.hannibal2.skyhanni.features.garden.visitor.VisitorTooltipParser import org.junit.jupiter.api.Test @@ -22,7 +22,9 @@ class VisitorToolTipParserTest { @Test fun testParseItemsNeeded() { - val parsedData = VisitorTooltipParser.parse(lore, GardenConfig()) + val parsedData = VisitorTooltipParser.parse(lore, + GardenConfig() + ) assert(parsedData.itemsNeeded.isNotEmpty()) { "Visitor items needed is ${parsedData.itemsNeeded.count()} instead of 1" } @@ -33,7 +35,9 @@ class VisitorToolTipParserTest { @Test fun testParseRewards() { - val parsedData = VisitorTooltipParser.parse(lore, GardenConfig()) + val parsedData = VisitorTooltipParser.parse(lore, + GardenConfig() + ) assert(parsedData.rewards.isNotEmpty()) { "Visitor rewards is ${parsedData.rewards.count()} instead of 6" } @@ -56,10 +60,12 @@ class VisitorToolTipParserTest { @Test fun testParseCopper() { - val parsedData = VisitorTooltipParser.parse(lore, GardenConfig()) + val parsedData = VisitorTooltipParser.parse(lore, + GardenConfig() + ) val copper = parsedData.rewards.get("Copper") assert(copper == 23) { "Visitor rewards does not contain 'Copper' with amount '23'" } } -} \ No newline at end of file +} -- cgit From 65a2c5625f5f07e7c7e354e4a1397282032c9ae0 Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Sat, 18 Nov 2023 09:44:42 +1100 Subject: Split storage into more files plus code cleanup (#695) Extracted sacks, friends, known features and jacob contests in to their separate files. #695 --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 12 +- .../at/hannibal2/skyhanni/config/ConfigManager.kt | 163 +++++++++++---------- .../at/hannibal2/skyhanni/config/Features.java | 2 +- .../java/at/hannibal2/skyhanni/config/Storage.java | 3 - .../hannibal2/skyhanni/config/commands/Commands.kt | 3 +- .../java/at/hannibal2/skyhanni/data/FriendAPI.kt | 50 +++---- .../java/at/hannibal2/skyhanni/data/SackAPI.kt | 3 +- .../features/garden/GardenNextJacobContest.kt | 6 +- .../massconfiguration/DefaultConfigFeatures.kt | 15 +- .../skyhanni/test/SkyHanniDebugsAndTests.kt | 5 +- .../utils/jsonobjects/JacobContestsJson.java | 13 ++ .../utils/jsonobjects/KnownFeaturesJson.java | 12 ++ 12 files changed, 163 insertions(+), 124 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/JacobContestsJson.java create mode 100644 src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/KnownFeaturesJson.java (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 5309a4e2e..8fc4f42e1 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni import at.hannibal2.skyhanni.api.CollectionAPI +import at.hannibal2.skyhanni.config.ConfigFileType import at.hannibal2.skyhanni.config.ConfigManager import at.hannibal2.skyhanni.config.Features import at.hannibal2.skyhanni.config.SackData @@ -306,6 +307,9 @@ import at.hannibal2.skyhanni.utils.KeyboardManager import at.hannibal2.skyhanni.utils.MinecraftConsoleFilter.Companion.initLogging import at.hannibal2.skyhanni.utils.NEUVersionCheck.checkIfNeuIsLoaded import at.hannibal2.skyhanni.utils.TabListData +import at.hannibal2.skyhanni.utils.jsonobjects.FriendsJson +import at.hannibal2.skyhanni.utils.jsonobjects.JacobContestsJson +import at.hannibal2.skyhanni.utils.jsonobjects.KnownFeaturesJson import kotlinx.coroutines.CoroutineName import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Job @@ -384,7 +388,7 @@ class SkyHanniMod { loadModule(GardenAPI) loadModule(CollectionAPI()) loadModule(FarmingContestAPI) - loadModule(FriendAPI()) + loadModule(FriendAPI) loadModule(PartyAPI) loadModule(GuildAPI) loadModule(SlayerAPI) @@ -652,7 +656,7 @@ class SkyHanniMod { configManager.firstLoad() initLogging() Runtime.getRuntime().addShutdownHook(Thread { - configManager.saveConfig("shutdown-hook") + configManager.saveConfig(ConfigFileType.FEATURES, "shutdown-hook") }) repo = RepoManager(configManager.configDirectory) try { @@ -689,6 +693,10 @@ class SkyHanniMod { @JvmStatic val feature: Features get() = configManager.features val sackData: SackData get() = configManager.sackData + val friendsData: FriendsJson get() = configManager.friendsData + val knownFeaturesData: KnownFeaturesJson get() = configManager.knownFeaturesData + val jacobContestsData: JacobContestsJson get() = configManager.jacobContestData + lateinit var repo: RepoManager lateinit var configManager: ConfigManager val logger: Logger = LogManager.getLogger("SkyHanni") diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt index 508f18dea..80db032e9 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt @@ -10,6 +10,9 @@ import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.NEUInternalName import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName import at.hannibal2.skyhanni.utils.NEUItems +import at.hannibal2.skyhanni.utils.jsonobjects.FriendsJson +import at.hannibal2.skyhanni.utils.jsonobjects.JacobContestsJson +import at.hannibal2.skyhanni.utils.jsonobjects.KnownFeaturesJson import com.google.gson.GsonBuilder import com.google.gson.JsonObject import com.google.gson.TypeAdapter @@ -110,13 +113,26 @@ class ConfigManager { } lateinit var features: Features + private set lateinit var sackData: SackData private set + lateinit var friendsData: FriendsJson + private set + lateinit var knownFeaturesData: KnownFeaturesJson + private set + lateinit var jacobContestData: JacobContestsJson + private set + private val logger = LorenzLogger("config_manager") var configDirectory = File("config/skyhanni") + private var configFile: File? = null private var sackFile: File? = null + private var friendsFile: File? = null + private var knowFeaturesFile: File? = null + private var jacobContestsFile: File? = null + lateinit var processor: MoulConfigProcessor private var disableSaving = false @@ -128,91 +144,94 @@ class ConfigManager { configFile = File(configDirectory, "config.json") sackFile = File(configDirectory, "sacks.json") + friendsFile = File(configDirectory, "friends.json") + knowFeaturesFile = File(configDirectory, "known_features.json") + jacobContestsFile = File(configDirectory, "jacob_contests.json") - logger.log("Trying to load config from $configFile") + features = firstLoadFile(configFile, ConfigFileType.FEATURES, Features(), true) + sackData = firstLoadFile(sackFile, ConfigFileType.SACKS, SackData(), false) + friendsData = firstLoadFile(friendsFile, ConfigFileType.FRIENDS, FriendsJson(), false) + knownFeaturesData = firstLoadFile(knowFeaturesFile, ConfigFileType.KNOWN_FEATURES, KnownFeaturesJson(), false) + jacobContestData = firstLoadFile(jacobContestsFile, ConfigFileType.JACOB_CONTESTS, JacobContestsJson(), false) - if (configFile!!.exists()) { + fixedRateTimer(name = "skyhanni-config-auto-save", period = 60_000L, initialDelay = 60_000L) { + saveConfig(ConfigFileType.FEATURES, "auto-save-60s") + } + + val features = SkyHanniMod.feature + processor = MoulConfigProcessor(SkyHanniMod.feature) + BuiltinMoulConfigGuis.addProcessors(processor) + UpdateManager.injectConfigProcessor(processor) + ConfigProcessorDriver.processConfig( + features.javaClass, + features, + processor + ) + } + + private inline fun firstLoadFile(file: File?, fileType: ConfigFileType, defaultValue: T, isConfig: Boolean): T { + val fileName = fileType.fileName + logger.log("Trying to load $fileName from $file") + var output: T = defaultValue + + if (file!!.exists()) { try { - val inputStreamReader = InputStreamReader(FileInputStream(configFile!!), StandardCharsets.UTF_8) + val inputStreamReader = InputStreamReader(FileInputStream(file), StandardCharsets.UTF_8) val bufferedReader = BufferedReader(inputStreamReader) - logger.log("load-config-now") - val jsonObject = gson.fromJson(bufferedReader.readText(), JsonObject::class.java) - val newJsonObject = ConfigUpdaterMigrator.fixConfig(jsonObject) - features = gson.fromJson( - newJsonObject, - Features::class.java - ) - logger.log("Loaded config from file") + logger.log("load-$fileName-now") + + output = if (isConfig) { + val jsonObject = gson.fromJson(bufferedReader.readText(), JsonObject::class.java) + val newJsonObject = ConfigUpdaterMigrator.fixConfig(jsonObject) + gson.fromJson(newJsonObject, T::class.java) + } else { + gson.fromJson(bufferedReader.readText(), T::class.java) + } + + logger.log("Loaded $fileName from file") } catch (error: Exception) { error.printStackTrace() - val backupFile = configFile!!.resolveSibling("config-${System.currentTimeMillis()}-backup.json") - logger.log("Exception while reading $configFile. Will load blank config and save backup to $backupFile") + val backupFile = file.resolveSibling("$fileName-${System.currentTimeMillis()}-backup.json") + logger.log("Exception while reading $file. Will load blank $fileName and save backup to $backupFile") logger.log("Exception was $error") try { - configFile!!.copyTo(backupFile) + file.copyTo(backupFile) } catch (e: Exception) { - logger.log("Could not create backup for config file") + logger.log("Could not create backup for $fileName file") e.printStackTrace() } } } - if (sackFile!!.exists()) { - try { - val inputStreamReader = InputStreamReader(FileInputStream(sackFile!!), StandardCharsets.UTF_8) - val bufferedReader = BufferedReader(inputStreamReader) - - logger.log("load-sacks-now") - sackData = gson.fromJson( - bufferedReader.readText(), - SackData::class.java - ) - logger.log("Loaded sacks from file") - } catch (error: Exception) { - error.printStackTrace() - } - } - - if (!::features.isInitialized) { - logger.log("Creating blank config and saving to file") - features = Features() - saveConfig("blank config") + if (output == defaultValue) { + logger.log("Setting $fileName to be blank as it did not exist. It will be saved once something is written to it") } - fixedRateTimer(name = "skyhanni-config-auto-save", period = 60_000L, initialDelay = 60_000L) { - saveConfig("auto-save-60s") - } + return output + } - if (!::sackData.isInitialized) { - logger.log("Creating blank sack data and saving") - sackData = SackData() - saveSackData("blank config") + fun saveConfig(fileType: ConfigFileType, reason: String) { + when (fileType) { + ConfigFileType.FEATURES -> saveFile(configFile, fileType.fileName, SkyHanniMod.feature, reason) + ConfigFileType.SACKS -> saveFile(sackFile, fileType.fileName, SkyHanniMod.sackData, reason) + ConfigFileType.FRIENDS -> saveFile(friendsFile, fileType.fileName, SkyHanniMod.friendsData, reason) + ConfigFileType.KNOWN_FEATURES -> saveFile(knowFeaturesFile, fileType.fileName, SkyHanniMod.knownFeaturesData, reason) + ConfigFileType.JACOB_CONTESTS -> saveFile(jacobContestsFile, fileType.fileName, SkyHanniMod.jacobContestsData, reason) } - - val features = SkyHanniMod.feature - processor = MoulConfigProcessor(SkyHanniMod.feature) - BuiltinMoulConfigGuis.addProcessors(processor) - UpdateManager.injectConfigProcessor(processor) - ConfigProcessorDriver.processConfig( - features.javaClass, - features, - processor - ) } - fun saveConfig(reason: String) { + private fun saveFile(file: File?, fileName: String, data: Any, reason: String) { if (disableSaving) return logger.log("saveConfig: $reason") - val file = configFile ?: throw Error("Can not save config, configFile is null!") + if (file == null) throw Error("Can not save $fileName, ${fileName}File is null!") try { - logger.log("Saving config file") + logger.log("Saving $fileName file") file.parentFile.mkdirs() - val unit = file.parentFile.resolve("config.json.write") + val unit = file.parentFile.resolve("$fileName.json.write") unit.createNewFile() BufferedWriter(OutputStreamWriter(FileOutputStream(unit), StandardCharsets.UTF_8)).use { writer -> - // TODO remove old "hidden" area - writer.write(gson.toJson(SkyHanniMod.feature)) + writer.write(gson.toJson(data)) } // Perform move — which is atomic, unlike writing — after writing is done. Files.move( @@ -222,24 +241,7 @@ class ConfigManager { StandardCopyOption.ATOMIC_MOVE ) } catch (e: IOException) { - logger.log("Could not save config file to $file") - e.printStackTrace() - } - } - - fun saveSackData(reason: String) { - if (disableSaving) return - logger.log("saveSackData: $reason") - val file = sackFile ?: throw Error("Can not save sacks, sackFile is null!") - try { - logger.log("Saving sack file") - file.parentFile.mkdirs() - file.createNewFile() - BufferedWriter(OutputStreamWriter(FileOutputStream(file), StandardCharsets.UTF_8)).use { writer -> - writer.write(gson.toJson(SkyHanniMod.sackData)) - } - } catch (e: IOException) { - logger.log("Could not save sacks file to $file") + logger.log("Could not save $fileName file to $file") e.printStackTrace() } } @@ -248,3 +250,12 @@ class ConfigManager { disableSaving = true } } + +enum class ConfigFileType(val fileName: String) { + FEATURES("config"), + SACKS("sacks"), + FRIENDS("friends"), + KNOWN_FEATURES("known_features"), + JACOB_CONTESTS("jacob_contests"), + ; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/Features.java b/src/main/java/at/hannibal2/skyhanni/config/Features.java index 4085eb069..bb0861e83 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Features.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Features.java @@ -51,7 +51,7 @@ public class Features extends Config { @Override public void saveNow() { - SkyHanniMod.configManager.saveConfig("close-gui"); + SkyHanniMod.configManager.saveConfig(ConfigFileType.FEATURES, "close-gui"); } @Override diff --git a/src/main/java/at/hannibal2/skyhanni/config/Storage.java b/src/main/java/at/hannibal2/skyhanni/config/Storage.java index 21a54735e..7170dde20 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Storage.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Storage.java @@ -39,9 +39,6 @@ public class Storage { @Expose public Map> knownFeatureToggles = new HashMap<>(); - @Expose - public Map> gardenJacobFarmingContestTimes = new HashMap<>(); - @Expose public List modifiedWords = new ArrayList<>(); diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index dfc76a70a..f59830810 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.config.commands import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigFileType import at.hannibal2.skyhanni.config.ConfigGuiManager import at.hannibal2.skyhanni.data.ChatManager import at.hannibal2.skyhanni.data.GuiEditManager @@ -254,7 +255,7 @@ object Commands { registerCommand( "shconfigsave", "Manually saving the config" - ) { SkyHanniMod.configManager.saveConfig("manual-command") } + ) { SkyHanniMod.configManager.saveConfig(ConfigFileType.FEATURES, "manual-command") } } private fun developersCodingHelp() { diff --git a/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt index bca06d18c..224522c06 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.data -import at.hannibal2.skyhanni.config.ConfigManager +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigFileType import at.hannibal2.skyhanni.events.HypixelJoinEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.test.command.ErrorManager @@ -11,13 +12,9 @@ import at.hannibal2.skyhanni.utils.jsonobjects.FriendsJson import at.hannibal2.skyhanni.utils.jsonobjects.FriendsJson.PlayerFriends.Friend import net.minecraft.util.ChatStyle import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -import java.io.File -import java.io.FileReader import java.util.UUID -class FriendAPI { - private val file = File("config/skyhanni/friends.json") - +object FriendAPI { // TODO USE SH-REPO private val removedFriendPattern = ".*\n§r§eYou removed §r(?.*)§e from your friends list!§r§9§m\n.*".toPattern() @@ -25,42 +22,31 @@ class FriendAPI { private val noBestFriendPattern = ".*\n§r(?.*)§e is no longer a best friend!§r§9§m\n.*".toPattern() private val bestFriendPattern = ".*\n(?.*)§a is now a best friend!§r§9§m\n.*".toPattern() - companion object { - - private var friendsJson: FriendsJson? = null - - private fun getFriends(): MutableMap { - val friendsJson = friendsJson ?: error("savedFriends not loaded yet!") - return friendsJson.players.getOrPut(LorenzUtils.getRawPlayerUuid()) { - FriendsJson.PlayerFriends().also { it.friends = mutableMapOf() } - }.friends - } - - private val tempFriends = mutableListOf() + private val tempFriends = mutableListOf() - fun getAllFriends(): List { - val list = mutableListOf() - list.addAll(getFriends().values) - list.addAll(tempFriends) - return list - } + private fun getFriends(): MutableMap { + return SkyHanniMod.friendsData.players.getOrPut(LorenzUtils.getRawPlayerUuid()) { + FriendsJson.PlayerFriends().also { it.friends = mutableMapOf() } + }.friends } @SubscribeEvent fun onHypixelJoin(event: HypixelJoinEvent) { - if (file.isFile) { - friendsJson = ConfigManager.gson.fromJson(FileReader(file), FriendsJson::class.java) - } - if (friendsJson == null) { - file.parentFile.mkdirs() - file.createNewFile() - friendsJson = FriendsJson().also { it.players = mutableMapOf() } + if (SkyHanniMod.friendsData.players == null) { + SkyHanniMod.friendsData.players = mutableMapOf() saveConfig() } } + fun getAllFriends(): List { + val list = mutableListOf() + list.addAll(getFriends().values) + list.addAll(tempFriends) + return list + } + fun saveConfig() { - file.writeText(ConfigManager.gson.toJson(friendsJson)) + SkyHanniMod.configManager.saveConfig(ConfigFileType.FRIENDS, "Save file") } @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt index 8417bc786..7079ae6fd 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigFileType import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.LorenzChatEvent @@ -303,7 +304,7 @@ object SackAPI { private fun saveSackData() { ProfileStorageData.sackProfiles?.sackContents = sackData - SkyHanniMod.configManager.saveSackData("saving-data") + SkyHanniMod.configManager.saveConfig(ConfigFileType.SACKS, "saving-data") } data class SackGemstone( diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt index 9a9e9c1d3..af535615a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.garden import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigFileType import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent @@ -178,7 +179,7 @@ object GardenNextJacobContest { } private fun saveConfig() { - val map = SkyHanniMod.feature.storage.gardenJacobFarmingContestTimes + val map = SkyHanniMod.jacobContestsData.contestTimes map.clear() val currentYear = SkyBlockTime.now().year @@ -189,11 +190,12 @@ object GardenNextJacobContest { map[contest.endTime] = contest.crops } + SkyHanniMod.configManager.saveConfig(ConfigFileType.JACOB_CONTESTS, "Save contests") } @SubscribeEvent fun onConfigLoad(event: ConfigLoadEvent) { - val savedContests = SkyHanniMod.feature.storage.gardenJacobFarmingContestTimes + val savedContests = SkyHanniMod.jacobContestsData.contestTimes val year = savedContests.firstNotNullOfOrNull { val endTime = it.key diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt index 930c67358..067a3a8bf 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.misc.massconfiguration import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigFileType import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.utils.LorenzUtils import io.github.moulberry.moulconfig.processor.ConfigProcessorDriver @@ -17,12 +18,18 @@ object DefaultConfigFeatures { Minecraft.getMinecraft().thePlayer ?: return didNotifyOnce = true - val knownToggles = SkyHanniMod.feature.storage.knownFeatureToggles + val oldToggles = SkyHanniMod.feature.storage.knownFeatureToggles + if (oldToggles.isNotEmpty()) { + SkyHanniMod.knownFeaturesData.knownFeatures = oldToggles + SkyHanniMod.feature.storage.knownFeatureToggles = emptyMap() + } + + val knownToggles = SkyHanniMod.knownFeaturesData.knownFeatures val updated = SkyHanniMod.version !in knownToggles val processor = FeatureToggleProcessor() ConfigProcessorDriver.processConfig(SkyHanniMod.feature.javaClass, SkyHanniMod.feature, processor) knownToggles[SkyHanniMod.version] = processor.allOptions.map { it.path } - SkyHanniMod.configManager.saveConfig("Updated known feature flags") + SkyHanniMod.configManager.saveConfig(ConfigFileType.KNOWN_FEATURES, "Updated known feature flags") if (!SkyHanniMod.feature.storage.hasPlayedBefore) { SkyHanniMod.feature.storage.hasPlayedBefore = true LorenzUtils.clickableChat( @@ -46,7 +53,7 @@ object DefaultConfigFeatures { val processor = FeatureToggleProcessor() ConfigProcessorDriver.processConfig(SkyHanniMod.feature.javaClass, SkyHanniMod.feature, processor) var optionList = processor.orderedOptions - val knownToggles = SkyHanniMod.feature.storage.knownFeatureToggles + val knownToggles = SkyHanniMod.knownFeaturesData.knownFeatures val togglesInNewVersion = knownToggles[new] if (new != "null" && togglesInNewVersion == null) { LorenzUtils.chat("§e[SkyHanni] Unknown version $new") @@ -95,7 +102,7 @@ object DefaultConfigFeatures { if (strings.size <= 2) return CommandBase.getListOfStringsMatchingLastWord( strings, - SkyHanniMod.feature.storage.knownFeatureToggles.keys + listOf("null") + SkyHanniMod.knownFeaturesData.knownFeatures.keys + listOf("null") ) return listOf() } diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt index 763b4602e..d88f9b67a 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.test import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigFileType import at.hannibal2.skyhanni.config.ConfigGuiManager import at.hannibal2.skyhanni.config.ConfigManager import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator @@ -147,8 +148,8 @@ class SkyHanniDebugsAndTests { // TODO make it so that it does not reset the config // saving old config state - SkyHanniMod.configManager.saveConfig("reload config manager") - SkyHanniMod.configManager.saveSackData("reload config manager") + SkyHanniMod.configManager.saveConfig(ConfigFileType.FEATURES, "reload config manager") + SkyHanniMod.configManager.saveConfig(ConfigFileType.SACKS,"reload config manager") Thread { Thread.sleep(500) SkyHanniMod.configManager.disableSaving() diff --git a/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/JacobContestsJson.java b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/JacobContestsJson.java new file mode 100644 index 000000000..87d1e9a22 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/JacobContestsJson.java @@ -0,0 +1,13 @@ +package at.hannibal2.skyhanni.utils.jsonobjects; + +import at.hannibal2.skyhanni.features.garden.CropType; +import com.google.gson.annotations.Expose; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class JacobContestsJson { + @Expose + public Map> contestTimes = new HashMap<>(); +} diff --git a/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/KnownFeaturesJson.java b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/KnownFeaturesJson.java new file mode 100644 index 000000000..bd5048cfb --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/KnownFeaturesJson.java @@ -0,0 +1,12 @@ +package at.hannibal2.skyhanni.utils.jsonobjects; + +import com.google.gson.annotations.Expose; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class KnownFeaturesJson { + @Expose + public Map> knownFeatures = new HashMap<>(); +} -- cgit From c8afe088287457117db6d845c91353873ab755c2 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 17 Nov 2023 23:47:58 +0100 Subject: removed duplicate code --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- src/main/java/at/hannibal2/skyhanni/config/Storage.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 8fc4f42e1..c6cc6ef71 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -658,7 +658,7 @@ class SkyHanniMod { Runtime.getRuntime().addShutdownHook(Thread { configManager.saveConfig(ConfigFileType.FEATURES, "shutdown-hook") }) - repo = RepoManager(configManager.configDirectory) + repo = RepoManager(ConfigManager.configDirectory) try { repo.loadRepoInformation() } catch (e: Exception) { diff --git a/src/main/java/at/hannibal2/skyhanni/config/Storage.java b/src/main/java/at/hannibal2/skyhanni/config/Storage.java index 7170dde20..b21361b6f 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Storage.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Storage.java @@ -36,6 +36,7 @@ public class Storage { @Expose public Float savedMouseSensitivity = .5f; + @Deprecated @Expose public Map> knownFeatureToggles = new HashMap<>(); -- cgit From 4f116e2c8b5e5f28054a73e2e89dbb6746f4f597 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 17 Nov 2023 23:48:45 +0100 Subject: code cleanup --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 4 ++-- src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt | 11 +++++------ .../java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index c6cc6ef71..bb9855949 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -250,7 +250,6 @@ import at.hannibal2.skyhanni.features.nether.ashfang.AshfangHideParticles import at.hannibal2.skyhanni.features.nether.ashfang.AshfangNextResetCooldown import at.hannibal2.skyhanni.features.nether.reputationhelper.CrimsonIsleReputationHelper import at.hannibal2.skyhanni.features.rift.RiftAPI -import at.hannibal2.skyhanni.features.rift.area.wyldwoods.RiftLarva import at.hannibal2.skyhanni.features.rift.area.colosseum.BlobbercystsHighlight import at.hannibal2.skyhanni.features.rift.area.dreadfarm.RiftAgaricusCap import at.hannibal2.skyhanni.features.rift.area.dreadfarm.RiftWiltedBerberisHelper @@ -264,6 +263,7 @@ import at.hannibal2.skyhanni.features.rift.area.mirrorverse.RiftUpsideDownParkou import at.hannibal2.skyhanni.features.rift.area.mirrorverse.TubulatorParkour import at.hannibal2.skyhanni.features.rift.area.stillgorechateau.RiftBloodEffigies import at.hannibal2.skyhanni.features.rift.area.westvillage.KloonHacking +import at.hannibal2.skyhanni.features.rift.area.wyldwoods.RiftLarva import at.hannibal2.skyhanni.features.rift.area.wyldwoods.RiftOdonata import at.hannibal2.skyhanni.features.rift.area.wyldwoods.ShyCruxWarnings import at.hannibal2.skyhanni.features.rift.everywhere.CruxTalismanDisplay @@ -705,7 +705,7 @@ class SkyHanniMod { } val modules: MutableList = ArrayList() - val globalJob: Job = Job(null) + private val globalJob: Job = Job(null) val coroutineScope = CoroutineScope( CoroutineName("SkyHanni") + SupervisorJob(globalJob) ) diff --git a/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt index 224522c06..0f44a9107 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt @@ -21,14 +21,13 @@ object FriendAPI { private val addedFriendPattern = "§aYou are now friends with (?.*)".toPattern() private val noBestFriendPattern = ".*\n§r(?.*)§e is no longer a best friend!§r§9§m\n.*".toPattern() private val bestFriendPattern = ".*\n(?.*)§a is now a best friend!§r§9§m\n.*".toPattern() + private val readFriendListPattern = "/viewprofile (?.*)".toPattern() private val tempFriends = mutableListOf() - private fun getFriends(): MutableMap { - return SkyHanniMod.friendsData.players.getOrPut(LorenzUtils.getRawPlayerUuid()) { - FriendsJson.PlayerFriends().also { it.friends = mutableMapOf() } - }.friends - } + private fun getFriends() = SkyHanniMod.friendsData.players.getOrPut(LorenzUtils.getRawPlayerUuid()) { + FriendsJson.PlayerFriends().also { it.friends = mutableMapOf() } + }.friends @SubscribeEvent fun onHypixelJoin(event: HypixelJoinEvent) { @@ -97,7 +96,7 @@ object FriendAPI { val value = chatStyle.chatClickEvent?.value ?: continue if (!value.startsWith("/viewprofile")) continue - val uuid = "/viewprofile (?.*)".toPattern().matchMatcher(value) { + val uuid = readFriendListPattern.matchMatcher(value) { group("uuid")?.let { try { UUID.fromString(it) diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt index d88f9b67a..c7461dc24 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt @@ -149,7 +149,7 @@ class SkyHanniDebugsAndTests { // saving old config state SkyHanniMod.configManager.saveConfig(ConfigFileType.FEATURES, "reload config manager") - SkyHanniMod.configManager.saveConfig(ConfigFileType.SACKS,"reload config manager") + SkyHanniMod.configManager.saveConfig(ConfigFileType.SACKS, "reload config manager") Thread { Thread.sleep(500) SkyHanniMod.configManager.disableSaving() -- cgit From 9f7f3f1aec696e54313bdab090ce77a4d4733d00 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 18 Nov 2023 01:28:07 +0100 Subject: 0.21.1 Beta 2 --- CHANGELOG.md | 27 +++++++++++++++++++--- build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 3 files changed, 26 insertions(+), 5 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/CHANGELOG.md b/CHANGELOG.md index 5da370f96..05bc74465 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,20 @@ # SkyHanni - Change Log -## Version 0.21.11 (unreleased) +## Version 0.21.1 (unreleased) +### New Features + ++ Organised the config into sub categories. - nea & walker + +### Changes + ++ Added guess seconds to the Visitor Timer when the tab list doesn't show seconds. - hannibal2 ++ Add option to hide the chat message when toggling /shmouselock. - hannibal2 + ### Changes -+ Added mythic/Maeve visitor support. - walker + hannibal2 ++ Added mythic/Maeve visitor support. - walker & hannibal2 + Added option to use custom Blocks per Second value in some Garden GUIs instead of the real one. - hannibal2 ### Fixes @@ -13,19 +22,31 @@ #### Garden Fixes + Fixed new visitor alerts triggering wrongly and constantly. - Cad -+ Fixed visitor timer. - hannibal2**** ++ Fixed visitor timer. - hannibal2 + Fixed wrong Fungi Cutter mode warning not working. - walker + Fixed Maximum FF Needed display not showing in Jacob NPC menu. - hannibal2 + Fixed calendar contest detection failing. - hannibal2 + Fixed plot borders flickering and consistency errors when pressing the keybind - hannibal2 + Fixed wrong ff needed values in Time Needed for Gold Medal GUI. - hannibal2 + Fixed Farming Contest Medal Icons in Inventory not showing. - hannibal2 ++ Fixed /ff not detecting collection analyst fortune. - hannibal2 ++ Fixed Mushroom Cow Perk display not working. - hannibal2 #### Other Fixes + Fixed showing "slayer boss spawn soon" message outside the correct slayer area. - hannibal2 + Fixed blocking clicks on bazaar with player name "wiki". - hannibal2 + Fixed highlighting some mobs in the dungeon wrongly as area mini bosses. - hannibal2 ++ Fixed opening the Pet menu no longer updating the current pet display. - hannibal2 + +### Technical Details + ++ Updated to a newer version of MoulConfig. - nea & walker + + This includes support for the new sub category part in the config. ++ Added TimeUtils.getDuration and deprecated TimeUtils.getMillis. - hannibal2 ++ Created PetAPI and deprecated String.matchRegex(). - hannibal2 ++ Extracted sacks, friends, known features and Jacob contests in to their separate files. - CalMWolfs ++ Add log clearing. - CalMWolfs ## Version 0.21 diff --git a/build.gradle.kts b/build.gradle.kts index 0402b998a..6df3bad10 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.21.1.Beta.1" +version = "0.21.1.Beta.2" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index bb9855949..0facb0f65 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -331,7 +331,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.21.1.Beta.1", + version = "0.21.1.Beta.2", ) class SkyHanniMod { @Mod.EventHandler -- cgit From 72c3403788a2a046d6147ae07578d9c12ab696e2 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 18 Nov 2023 01:44:48 +0100 Subject: 0.21.1 Beta 2.1 --- build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- .../skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/build.gradle.kts b/build.gradle.kts index 6df3bad10..3ebdcb8f8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.21.1.Beta.2" +version = "0.21.1.Beta.2.1" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 0facb0f65..6abecaddc 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -331,7 +331,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.21.1.Beta.2", + version = "0.21.1.Beta.2.1", ) class SkyHanniMod { @Mod.EventHandler diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt index 66f20f103..6c5be7ec9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt @@ -38,7 +38,7 @@ object DefaultConfigFeatures { "shdefaultoptions" ) } else if (updated) { - val lastVersion = knownToggles.keys.last() + val lastVersion = knownToggles.keys.last { it != SkyHanniMod.version } val command = "/shdefaultoptions $lastVersion ${SkyHanniMod.version}" LorenzUtils.clickableChat( "§e[SkyHanni] Looks like you updated SkyHanni. " + -- cgit From 68407ad32f772406b7cd9ccad64d9cd6b42bfae4 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 18 Nov 2023 15:02:46 +0100 Subject: 0.21.1 Beta 3 --- CHANGELOG.md | 7 ++++++- build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/CHANGELOG.md b/CHANGELOG.md index 05bc74465..922734fb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,13 +9,16 @@ ### Changes +#### Other Changes + + Added guess seconds to the Visitor Timer when the tab list doesn't show seconds. - hannibal2 + Add option to hide the chat message when toggling /shmouselock. - hannibal2 -### Changes +#### Garden Changes + Added mythic/Maeve visitor support. - walker & hannibal2 + Added option to use custom Blocks per Second value in some Garden GUIs instead of the real one. - hannibal2 ++ Added option to change the item scale of SkyMart Coins per Copper list. - hannibal2 ### Fixes @@ -38,6 +41,8 @@ + Fixed blocking clicks on bazaar with player name "wiki". - hannibal2 + Fixed highlighting some mobs in the dungeon wrongly as area mini bosses. - hannibal2 + Fixed opening the Pet menu no longer updating the current pet display. - hannibal2 ++ Fixed Archfiend Dice and High Class Archfiend Dice counting as slayer drops when rolled. - hannibal2 ++ Fixed dice roll profit counting as Mob Kill Coins in Slayer Tracker. - hannibal2 ### Technical Details diff --git a/build.gradle.kts b/build.gradle.kts index 3ebdcb8f8..116cd41a1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.21.1.Beta.2.1" +version = "0.21.1.Beta.3" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 6abecaddc..9fd4d38c7 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -331,7 +331,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.21.1.Beta.2.1", + version = "0.21.1.Beta.3", ) class SkyHanniMod { @Mod.EventHandler -- cgit From 4a40d28e06975dc258ce14078e98800ea140cd97 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 19 Nov 2023 02:44:13 +0100 Subject: 0.21.1 Beta 4 --- CHANGELOG.md | 16 ++++++++++------ build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/CHANGELOG.md b/CHANGELOG.md index 922734fb6..799e15740 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,16 +9,18 @@ ### Changes -#### Other Changes - -+ Added guess seconds to the Visitor Timer when the tab list doesn't show seconds. - hannibal2 -+ Add option to hide the chat message when toggling /shmouselock. - hannibal2 - #### Garden Changes + Added mythic/Maeve visitor support. - walker & hannibal2 + Added option to use custom Blocks per Second value in some Garden GUIs instead of the real one. - hannibal2 + Added option to change the item scale of SkyMart Coins per Copper list. - hannibal2 ++ Added support for Sunder 6 in /ff upgrades. - hannibal2 ++ Added support for mythic in Visitor Drop Statistics. - hannibal2 + +#### Other Changes + ++ Added guess seconds to the Visitor Timer when the tab list doesn't show seconds. - hannibal2 ++ Add option to hide the chat message when toggling /shmouselock. - hannibal2 ### Fixes @@ -42,7 +44,8 @@ + Fixed highlighting some mobs in the dungeon wrongly as area mini bosses. - hannibal2 + Fixed opening the Pet menu no longer updating the current pet display. - hannibal2 + Fixed Archfiend Dice and High Class Archfiend Dice counting as slayer drops when rolled. - hannibal2 -+ Fixed dice roll profit counting as Mob Kill Coins in Slayer Tracker. - hannibal2 ++ Fixed dice roll profit counting as Mob Kill Coins in Slayer Tracker. - hannibal2 ++ Fixed Sack Display sometimes not formatting a million correctly. - Hize ### Technical Details @@ -52,6 +55,7 @@ + Created PetAPI and deprecated String.matchRegex(). - hannibal2 + Extracted sacks, friends, known features and Jacob contests in to their separate files. - CalMWolfs + Add log clearing. - CalMWolfs ++ Add auto-prefix to chat message methods. - walker ## Version 0.21 diff --git a/build.gradle.kts b/build.gradle.kts index 116cd41a1..e763b7f41 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.21.1.Beta.3" +version = "0.21.1.Beta.4" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 9fd4d38c7..4a84c8823 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -331,7 +331,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.21.1.Beta.3", + version = "0.21.1.Beta.4", ) class SkyHanniMod { @Mod.EventHandler -- cgit From b8fd0617f3debc9445693bad3289c102e880879c Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 19 Nov 2023 18:32:32 +0100 Subject: 0.21.1 Beta 5 --- CHANGELOG.md | 14 +++++++++++++- FEATURES.md | 7 +++++++ build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- .../features/garden/farming/GardenCropMilestoneDisplay.kt | 2 ++ 5 files changed, 24 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/CHANGELOG.md b/CHANGELOG.md index 799e15740..1bb14e0bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,15 @@ ## Version 0.21.1 (unreleased) - ### New Features + Organised the config into sub categories. - nea & walker ++ Wrong crop milestone step detection. - hannibal2 + + When opening the crop milestone menu, a chat message is sent if Hypixel's crops per milestone level data is + different from SkyHanni's. + + You can use this to share your hypixel data with SkyHanni via the discord. + + This will allow us to fix the crop milestone features quicker, as we currently do not have accurate data for this. + + If you don't want to share anything, you can disable the chat message in the config with /sh copy milestone data. ### Changes @@ -36,6 +41,7 @@ + Fixed Farming Contest Medal Icons in Inventory not showing. - hannibal2 + Fixed /ff not detecting collection analyst fortune. - hannibal2 + Fixed Mushroom Cow Perk display not working. - hannibal2 ++ Fixed visitor timer error if the visitors aren't unlocked yet. - hannibal2 #### Other Fixes @@ -46,6 +52,7 @@ + Fixed Archfiend Dice and High Class Archfiend Dice counting as slayer drops when rolled. - hannibal2 + Fixed dice roll profit counting as Mob Kill Coins in Slayer Tracker. - hannibal2 + Fixed Sack Display sometimes not formatting a million correctly. - Hize ++ Fixed Estimated Item Value getting shown in stats breakdown menu. - hannibal2 ### Technical Details @@ -56,6 +63,11 @@ + Extracted sacks, friends, known features and Jacob contests in to their separate files. - CalMWolfs + Add log clearing. - CalMWolfs + Add auto-prefix to chat message methods. - walker ++ Added support for extra data in error manager. - hannibal2 ++ Added /readcropmilestonefromclipboard. - hannibal2 + + This command reads the clipboard content, in the format of users sending crop milestone step data. + + The new data gets compared to the currently saved data, differences are getting replaced and the result gets put + into the clipboard. The clipboard context can be used to update the repo content. ## Version 0.21 diff --git a/FEATURES.md b/FEATURES.md index 2d2c53201..b354e160d 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -488,6 +488,13 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Highlights Visitors outside the Garden. + Block Interacting with Visitors. - nea + Blocks you from interacting with / unlocking Visitors to allow for Dedication Cycling. ++ Wrong crop milestone step detection. - hannibal2 + + When opening the crop milestone menu, a chat message is sent if Hypixel's crops per milestone level data is + different from SkyHanni's. + + You can use this to share your hypixel data with SkyHanni via the discord. + + This will allow us to fix the crop milestone features quicker, as we currently do not have accurate data for this. + + If you don't want to share anything, you can disable the chat message in the config with /sh copy milestone data. +
diff --git a/build.gradle.kts b/build.gradle.kts index e763b7f41..febac4b97 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.21.1.Beta.4" +version = "0.21.1.Beta.5" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 4a84c8823..085b6fcd8 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -331,7 +331,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.21.1.Beta.4", + version = "0.21.1.Beta.5", ) class SkyHanniMod { @Mod.EventHandler diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt index 0ae9115eb..dae3e129f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt @@ -101,6 +101,8 @@ object GardenCropMilestoneDisplay { val addedCounter = (counter - old).toInt() FarmingWeightDisplay.addCrop(crop, addedCounter) update() + // Farming Simulator: There is a 25% chance for Mathematical Hoes and the Cultivating Enchantment to count twice. + // 0.8 = 1 / 1.25 crop.setCounter( crop.getCounter() + if (GardenCropSpeed.finneganPerkActive()) { (addedCounter.toDouble() * 0.8).toInt() -- cgit From 5121bb988d881eba2ef145fd19c4fbc4a39d07b3 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 20 Nov 2023 19:50:31 +0100 Subject: better screen close logic --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 1 + src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 085b6fcd8..2d0b2e24a 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -676,6 +676,7 @@ class SkyHanniMod { if (screenToOpen != null) { screenTicks++ if (screenTicks == 5) { + Minecraft.getMinecraft().thePlayer.closeScreen() Minecraft.getMinecraft().displayGuiScreen(screenToOpen) screenTicks = 0 screenToOpen = null diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt index 7477d74bb..3af97e0f9 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt @@ -41,7 +41,6 @@ class GuiEditManager { if (NEUItems.neuHasFocus()) return lastHotkeyPressed = SimpleTimeMark.now() - Minecraft.getMinecraft().thePlayer.closeScreen() openGuiPositionEditor(hotkeyReminder = false) } -- cgit From 94ab85f38a90e1cff5eb8b0e1b986d8c748cb5b3 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 20 Nov 2023 20:02:34 +0100 Subject: 0.21.1 Beta 6 --- CHANGELOG.md | 11 +++++++++++ build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bb14e0bb..55ce3f340 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ ### Changes + #### Garden Changes + Added mythic/Maeve visitor support. - walker & hannibal2 @@ -21,11 +22,16 @@ + Added option to change the item scale of SkyMart Coins per Copper list. - hannibal2 + Added support for Sunder 6 in /ff upgrades. - hannibal2 + Added support for mythic in Visitor Drop Statistics. - hannibal2 ++ Use the crop fortune from tab in Farming Fortune HUD. - alexia ++ Shows the last saved ff value in gray while switching tools instead of the question mark. - hannibal2 ++ Removed chat message that your crop milestone data is correct. - hannibal2 #### Other Changes + Added guess seconds to the Visitor Timer when the tab list doesn't show seconds. - hannibal2 + Add option to hide the chat message when toggling /shmouselock. - hannibal2 ++ Reminds to use the GUI Position Editor hotkey. - hannibal2 + + Reminds every 30 minutes after using /sh gui or clicking the GUI edit button. ### Fixes @@ -42,6 +48,10 @@ + Fixed /ff not detecting collection analyst fortune. - hannibal2 + Fixed Mushroom Cow Perk display not working. - hannibal2 + Fixed visitor timer error if the visitors aren't unlocked yet. - hannibal2 ++ Fixed farming weight no longer updating on block breaking. - hannibal2 ++ Added cooldown to prevent spam clicking on farming weight buttons to open many web pages. - hannibal2 ++ Fixed clickable farming weight GUI no longer opens #1000 in lb website. - hannibal2 ++ Fixed /ff upgrade suggests updating bustling reforge even when no farming armor is found. - hannibal2 #### Other Fixes @@ -53,6 +63,7 @@ + Fixed dice roll profit counting as Mob Kill Coins in Slayer Tracker. - hannibal2 + Fixed Sack Display sometimes not formatting a million correctly. - Hize + Fixed Estimated Item Value getting shown in stats breakdown menu. - hannibal2 ++ Fixed a bug with the ender chest and SkyHanni GUI editor. - hannibal2 ### Technical Details diff --git a/build.gradle.kts b/build.gradle.kts index febac4b97..b79a287b1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.21.1.Beta.5" +version = "0.21.1.Beta.6" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 2d0b2e24a..f2d250226 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -331,7 +331,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.21.1.Beta.5", + version = "0.21.1.Beta.6", ) class SkyHanniMod { @Mod.EventHandler -- cgit From 46399eb4ef9212935853bdd1c0af191cb6b76503 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 21 Nov 2023 18:48:55 +0100 Subject: Removed message when crop milestones look different in the menu than stored SkyHanni data. --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 + .../hannibal2/skyhanni/config/commands/Commands.kt | 4 +- .../skyhanni/data/GardenCropMilestones.kt | 2 +- .../data/GardenCropMilestonesCommunityFix.kt | 179 +++++++++++++++++++++ .../skyhanni/data/GardenCropMilestonesFix.kt | 159 ------------------ .../skyhanni/utils/jsonobjects/GardenJson.java | 3 + 6 files changed, 187 insertions(+), 162 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestonesCommunityFix.kt delete mode 100644 src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestonesFix.kt (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index f2d250226..a7c3584b6 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -16,6 +16,7 @@ import at.hannibal2.skyhanni.data.EntityMovementData import at.hannibal2.skyhanni.data.FriendAPI import at.hannibal2.skyhanni.data.GardenComposterUpgradesData import at.hannibal2.skyhanni.data.GardenCropMilestones +import at.hannibal2.skyhanni.data.GardenCropMilestonesCommunityFix import at.hannibal2.skyhanni.data.GardenCropUpgrades import at.hannibal2.skyhanni.data.GuiEditManager import at.hannibal2.skyhanni.data.GuildAPI @@ -362,6 +363,7 @@ class SkyHanniMod { loadModule(TabListData()) loadModule(RenderData()) loadModule(GardenCropMilestones) + loadModule(GardenCropMilestonesCommunityFix) loadModule(GardenCropUpgrades()) loadModule(VisitorListener()) loadModule(OwnInventoryData()) diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index 641dc912d..8e4791901 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigFileType import at.hannibal2.skyhanni.config.ConfigGuiManager import at.hannibal2.skyhanni.data.ChatManager -import at.hannibal2.skyhanni.data.GardenCropMilestonesFix +import at.hannibal2.skyhanni.data.GardenCropMilestonesCommunityFix import at.hannibal2.skyhanni.data.GuiEditManager import at.hannibal2.skyhanni.data.PartyAPI import at.hannibal2.skyhanni.features.bingo.BingoCardDisplay @@ -318,7 +318,7 @@ object Commands { registerCommand( "readcropmilestonefromclipboard", "Read crop milestone from clipboard. This helps fixing wrong crop milestone data" - ) { GardenCropMilestonesFix.readDataFromClipboard() } + ) { GardenCropMilestonesCommunityFix.readDataFromClipboard() } } private fun internalCommands() { diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt index d810121ed..610393906 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt @@ -41,7 +41,7 @@ object GardenCropMilestones { } } CropMilestoneUpdateEvent().postAndCatch() - GardenCropMilestonesFix.openInventory(event.inventoryItems) + GardenCropMilestonesCommunityFix.openInventory(event.inventoryItems) } var cropMilestoneData: Map> = emptyMap() diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestonesCommunityFix.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestonesCommunityFix.kt new file mode 100644 index 000000000..c97997262 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestonesCommunityFix.kt @@ -0,0 +1,179 @@ +package at.hannibal2.skyhanni.data + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigManager +import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.features.garden.CropType +import at.hannibal2.skyhanni.utils.ItemUtils.getLore +import at.hannibal2.skyhanni.utils.ItemUtils.name +import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy +import at.hannibal2.skyhanni.utils.LorenzUtils.nextAfter +import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators +import at.hannibal2.skyhanni.utils.NumberUtil.formatNumber +import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNeeded +import at.hannibal2.skyhanni.utils.OSUtils +import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher +import at.hannibal2.skyhanni.utils.StringUtils.matches +import at.hannibal2.skyhanni.utils.StringUtils.removeColor +import at.hannibal2.skyhanni.utils.jsonobjects.GardenJson +import kotlinx.coroutines.launch +import net.minecraft.item.ItemStack +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +object GardenCropMilestonesCommunityFix { + private val pattern = ".*§e(?.*)§6/§e(?.*)".toPattern() + private var showWrongData = false + private var showWhenAllCorrect = false + + @SubscribeEvent + fun onRepoReload(event: RepositoryReloadEvent) { + val data = event.getConstant("Garden") + val map = data.crop_milestone_community_help ?: return + for ((key, value) in map) { + if (key == "show_wrong_data") { + showWrongData = value + } + if (key == "show_when_all_correct") { + showWhenAllCorrect = value + } + } + } + + fun openInventory(inventoryItems: Map) { + if (!showWrongData) return + if (!SkyHanniMod.feature.garden.copyMilestoneData) return + fixForWrongData(inventoryItems) + } + + private fun fixForWrongData(inventoryItems: Map) { + val data = mutableListOf() + for ((_, stack) in inventoryItems) { + val crop = GardenCropMilestones.getCropTypeByLore(stack) ?: continue + checkForWrongData(stack, crop, data) + + CropMilestoneUpdateEvent().postAndCatch() + } + + if (data.isNotEmpty()) { + LorenzUtils.chat( + "Found §c${data.size} §ewrong crop milestone steps in the menu! " + + "Correct data got put into clipboard. " + + "Please share it on the §bSkyHanni Discord §ein the channel §b#share-data§e." + ) + OSUtils.copyToClipboard("```${data.joinToString("\n")}```") + } else { + if (showWhenAllCorrect) { + LorenzUtils.chat("No wrong crop milestone steps found!") + } + } + } + + private fun checkForWrongData( + stack: ItemStack, + crop: CropType, + wrongData: MutableList + ) { + val name = stack.name ?: return + val rawNumber = name.removeColor().replace(crop.cropName, "").trim() + val realTier = if (rawNumber == "") 0 else rawNumber.romanToDecimalIfNeeded() + + val lore = stack.getLore() + val next = lore.nextAfter({ GardenCropMilestones.totalPattern.matches(it) }, 3) ?: return + val total = lore.nextAfter({ GardenCropMilestones.totalPattern.matches(it) }, 6) ?: return + +// debug(" ") +// debug("crop: $crop") +// debug("realTier: $realTier") + + val guessNextMax = GardenCropMilestones.getCropsForTier( + realTier + 1, + crop + ) - GardenCropMilestones.getCropsForTier(realTier, crop) +// debug("guessNextMax: ${guessNextMax.addSeparators()}") + val nextMax = pattern.matchMatcher(next) { + group("max").formatNumber() + } ?: return +// debug("nextMax real: ${nextMax.addSeparators()}") + if (nextMax != guessNextMax) { +// debug("wrong, add to list") + wrongData.add("$crop:$realTier:${nextMax.addSeparators()}") + } + + val guessTotalMax = GardenCropMilestones.getCropsForTier(46, crop) +// println("guessTotalMax: ${guessTotalMax.addSeparators()}") + val totalMax = pattern.matchMatcher(total) { + group("max").formatNumber() + } ?: return +// println("totalMax real: ${totalMax.addSeparators()}") + val totalOffBy = guessTotalMax - totalMax +// debug("$crop total offf by: ${totalOffBy.addSeparators()}") + } + +// fun debug(message: String) { +// if (SkyHanniMod.feature.dev.debug.enabled) { +// println(message) +// } +// } + + /** + * This helps to fix wrong crop milestone data + * This command reads the clipboard content, + * in the format of users sending crop milestone step data. + * + * The new data will be compared to the currently saved data, + * differences are getting replaced, and the result gets put into the clipboard. + * The clipboard context can be used to update the repo content. + */ + fun readDataFromClipboard() { + SkyHanniMod.coroutineScope.launch { + OSUtils.readFromClipboard()?.let { + handleInput(it) + } + } + } + + private var totalFixedValues = 0 + + private fun handleInput(input: String) { + println(" ") + var fixed = 0 + var alreadyCorrect = 0 + for (line in input.lines()) { + val split = line.replace("```", "").replace(".", ",").split(":") + if (split.size != 3) continue + val (rawCrop, tier, amount) = split + val crop = LorenzUtils.enumValueOf(rawCrop) + + if (tryFix(crop, tier.toInt(), amount.formatNumber().toInt())) { + fixed++ + } else { + alreadyCorrect++ + } + } + totalFixedValues += fixed + LorenzUtils.chat("Fixed: $fixed/$alreadyCorrect, total fixes: $totalFixedValues") + val s = ConfigManager.gson.toJsonTree(GardenCropMilestones.cropMilestoneData).toString() + OSUtils.copyToClipboard("\"crop_milestones\":$s,") + } + + private fun tryFix(crop: CropType, tier: Int, amount: Int): Boolean { + val guessNextMax = GardenCropMilestones.getCropsForTier(tier + 1, crop) - GardenCropMilestones.getCropsForTier( + tier, + crop + ) + if (guessNextMax.toInt() == amount) { + return false + } + GardenCropMilestones.cropMilestoneData = GardenCropMilestones.cropMilestoneData.editCopy { + fix(crop, this, tier, amount) + } + return true + } + + private fun fix(crop: CropType, map: MutableMap>, tier: Int, amount: Int) { + map[crop] = map[crop]!!.editCopy { + this[tier] = amount + } + } +} diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestonesFix.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestonesFix.kt deleted file mode 100644 index cad8fdddf..000000000 --- a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestonesFix.kt +++ /dev/null @@ -1,159 +0,0 @@ -package at.hannibal2.skyhanni.data - -import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.config.ConfigManager -import at.hannibal2.skyhanni.events.CropMilestoneUpdateEvent -import at.hannibal2.skyhanni.features.garden.CropType -import at.hannibal2.skyhanni.utils.ItemUtils.getLore -import at.hannibal2.skyhanni.utils.ItemUtils.name -import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy -import at.hannibal2.skyhanni.utils.LorenzUtils.nextAfter -import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators -import at.hannibal2.skyhanni.utils.NumberUtil.formatNumber -import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNeeded -import at.hannibal2.skyhanni.utils.OSUtils -import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher -import at.hannibal2.skyhanni.utils.StringUtils.matches -import at.hannibal2.skyhanni.utils.StringUtils.removeColor -import kotlinx.coroutines.launch -import net.minecraft.item.ItemStack - -object GardenCropMilestonesFix { - private val pattern = ".*§e(?.*)§6/§e(?.*)".toPattern() - - fun openInventory(inventoryItems: Map) { - if (SkyHanniMod.feature.garden.copyMilestoneData) { - fixForWrongData(inventoryItems) - } - } - - private fun fixForWrongData(inventoryItems: Map) { - val data = mutableListOf() - for ((_, stack) in inventoryItems) { - val crop = GardenCropMilestones.getCropTypeByLore(stack) ?: continue - checkForWrongData(stack, crop, data) - - CropMilestoneUpdateEvent().postAndCatch() - } - - if (data.isNotEmpty()) { - LorenzUtils.chat( - "Found §c${data.size} §ewrong crop milestone steps in the menu! " + - "Correct data got put into clipboard. " + - "Please share it on the §bSkyHanni Discord §ein the channel §b#share-data§e." - ) - OSUtils.copyToClipboard("```${data.joinToString("\n")}```") -// } else { -// LorenzUtils.chat("No wrong crop milestone steps found!") - } - } - - private fun checkForWrongData( - stack: ItemStack, - crop: CropType, - wrongData: MutableList - ) { - val name = stack.name ?: return - val rawNumber = name.removeColor().replace(crop.cropName, "").trim() - val realTier = if (rawNumber == "") 0 else rawNumber.romanToDecimalIfNeeded() - - val lore = stack.getLore() - val next = lore.nextAfter({ GardenCropMilestones.totalPattern.matches(it) }, 3) ?: return - val total = lore.nextAfter({ GardenCropMilestones.totalPattern.matches(it) }, 6) ?: return - -// debug(" ") -// debug("crop: $crop") -// debug("realTier: $realTier") - - val guessNextMax = GardenCropMilestones.getCropsForTier( - realTier + 1, - crop - ) - GardenCropMilestones.getCropsForTier(realTier, crop) -// debug("guessNextMax: ${guessNextMax.addSeparators()}") - val nextMax = pattern.matchMatcher(next) { - group("max").formatNumber() - } ?: return -// debug("nextMax real: ${nextMax.addSeparators()}") - if (nextMax != guessNextMax) { -// debug("wrong, add to list") - wrongData.add("$crop:$realTier:${nextMax.addSeparators()}") - } - - val guessTotalMax = GardenCropMilestones.getCropsForTier(46, crop) -// println("guessTotalMax: ${guessTotalMax.addSeparators()}") - val totalMax = pattern.matchMatcher(total) { - group("max").formatNumber() - } ?: return -// println("totalMax real: ${totalMax.addSeparators()}") - val totalOffBy = guessTotalMax - totalMax -// debug("$crop total offf by: ${totalOffBy.addSeparators()}") - } - -// fun debug(message: String) { -// if (SkyHanniMod.feature.dev.debug.enabled) { -// println(message) -// } -// } - - /** - * This helps to fix wrong crop milestone data - * This command reads the clipboard content, - * in the format of users sending crop milestone step data. - * - * The new data will be compared to the currently saved data, - * differences are getting replaced, and the result gets put into the clipboard. - * The clipboard context can be used to update the repo content. - */ - fun readDataFromClipboard() { - SkyHanniMod.coroutineScope.launch { - OSUtils.readFromClipboard()?.let { - handleInput(it) - } - } - } - - private var totalFixedValues = 0 - - private fun handleInput(input: String) { - println(" ") - var fixed = 0 - var alreadyCorrect = 0 - for (line in input.lines()) { - val split = line.replace("```", "").replace(".", ",").split(":") - if (split.size != 3) continue - val (rawCrop, tier, amount) = split - val crop = LorenzUtils.enumValueOf(rawCrop) - - if (tryFix(crop, tier.toInt(), amount.formatNumber().toInt())) { - fixed++ - } else { - alreadyCorrect++ - } - } - totalFixedValues += fixed - LorenzUtils.chat("Fixed: $fixed/$alreadyCorrect, total fixes: $totalFixedValues") - val s = ConfigManager.gson.toJsonTree(GardenCropMilestones.cropMilestoneData).toString() - OSUtils.copyToClipboard("\"crop_milestones\":$s,") - } - - private fun tryFix(crop: CropType, tier: Int, amount: Int): Boolean { - val guessNextMax = GardenCropMilestones.getCropsForTier(tier + 1, crop) - GardenCropMilestones.getCropsForTier( - tier, - crop - ) - if (guessNextMax.toInt() == amount) { - return false - } - GardenCropMilestones.cropMilestoneData = GardenCropMilestones.cropMilestoneData.editCopy { - fix(crop, this, tier, amount) - } - return true - } - - private fun fix(crop: CropType, map: MutableMap>, tier: Int, amount: Int) { - map[crop] = map[crop]!!.editCopy { - this[tier] = amount - } - } -} diff --git a/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/GardenJson.java b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/GardenJson.java index cc8bcd51d..7bc9cf7fa 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/GardenJson.java +++ b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/GardenJson.java @@ -16,6 +16,9 @@ public class GardenJson { @Expose public Map> crop_milestones; + @Expose + public Map crop_milestone_community_help; + @Expose public Map visitors; -- cgit From ac60b52cbd9c30efe50a7d0421ccee082119fc8b Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 21 Nov 2023 22:31:07 +0100 Subject: 0.21.1 Beta 7 --- CHANGELOG.md | 17 ++++++++++++++++- build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/CHANGELOG.md b/CHANGELOG.md index 55ce3f340..17e028cb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,6 @@ ### Changes - #### Garden Changes + Added mythic/Maeve visitor support. - walker & hannibal2 @@ -25,6 +24,11 @@ + Use the crop fortune from tab in Farming Fortune HUD. - alexia + Shows the last saved ff value in gray while switching tools instead of the question mark. - hannibal2 + Removed chat message that your crop milestone data is correct. - hannibal2 ++ Removed the message when crop milestones look different in the menu than stored SkyHanni data. - hannibal2 + + We already have the correct data now, and Hypixel rounds the numbers in the menu poorly. + + Only show the Total Crop Milestone info in crop milestone inventory when below tier 20. - hannibal2 + + Hypixel now has their own line for the same information for tier 20+ ++ Make the FF Display only visible while holding a farming tool in hand. - hannibal2 #### Other Changes @@ -32,6 +36,7 @@ + Add option to hide the chat message when toggling /shmouselock. - hannibal2 + Reminds to use the GUI Position Editor hotkey. - hannibal2 + Reminds every 30 minutes after using /sh gui or clicking the GUI edit button. ++ Added Bookworm Book to the Estimated Item Value feature. - jani ### Fixes @@ -52,6 +57,8 @@ + Added cooldown to prevent spam clicking on farming weight buttons to open many web pages. - hannibal2 + Fixed clickable farming weight GUI no longer opens #1000 in lb website. - hannibal2 + Fixed /ff upgrade suggests updating bustling reforge even when no farming armor is found. - hannibal2 ++ Fixed maxed sunder fortune in the /ff stats breakdown. - alexia ++ Fixed the farming contest summary not showing when the crop is buffed by Anita Talisman/Ring/Artifact. - hannibal2 #### Other Fixes @@ -80,6 +87,14 @@ + The new data gets compared to the currently saved data, differences are getting replaced and the result gets put into the clipboard. The clipboard context can be used to update the repo content. +### Removed Features + ++ Removed 100 Farming Fortune from "Show As Drop Multiplier" from all displays (also known as "base ff"). - hannibal2 + + This can cause some numbers to show 100 FF too much. Simply update the values to fix it. + + Those "base FF" values were never really part of your farming fortune stats. They are just a result of looking at + the crop drop formula. SkyHanni used those values to be more comparable with other Discord Bots and spreadsheets. + This also caused confusion, so we have removed it entirely now. + ## Version 0.21 ### New Features diff --git a/build.gradle.kts b/build.gradle.kts index b79a287b1..8f7171956 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.21.1.Beta.6" +version = "0.21.1.Beta.7" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index a7c3584b6..8cf9cab27 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -332,7 +332,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.21.1.Beta.6", + version = "0.21.1.Beta.7", ) class SkyHanniMod { @Mod.EventHandler -- cgit From 5d1e9a07eabe3872c714b17b64b7a6e0a0073d73 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 22 Nov 2023 12:08:35 +0100 Subject: 0.21.1 --- CHANGELOG.md | 8 +++++++- build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/CHANGELOG.md b/CHANGELOG.md index 17e028cb7..884017ef6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # SkyHanni - Change Log -## Version 0.21.1 (unreleased) +## Version 0.21.1 ### New Features @@ -29,6 +29,7 @@ + Only show the Total Crop Milestone info in crop milestone inventory when below tier 20. - hannibal2 + Hypixel now has their own line for the same information for tier 20+ + Make the FF Display only visible while holding a farming tool in hand. - hannibal2 ++ Hide in crop milestone display the line with time remaining entirely when the milestone is maxed. - hannibal2 #### Other Changes @@ -59,6 +60,9 @@ + Fixed /ff upgrade suggests updating bustling reforge even when no farming armor is found. - hannibal2 + Fixed maxed sunder fortune in the /ff stats breakdown. - alexia + Fixed the farming contest summary not showing when the crop is buffed by Anita Talisman/Ring/Artifact. - hannibal2 ++ Fixed Farming Fortune Display not showing for non crop-specific tools. - hannibal2 ++ Fixed green thumb fortune in /ff to include Maeve. - hannibal2 ++ Fixed crops per second and time remaining not using the 100 base ff in their formula. - alexia #### Other Fixes @@ -71,6 +75,8 @@ + Fixed Sack Display sometimes not formatting a million correctly. - Hize + Fixed Estimated Item Value getting shown in stats breakdown menu. - hannibal2 + Fixed a bug with the ender chest and SkyHanni GUI editor. - hannibal2 ++ Fixed crimson isle faction icon in tab list showing twice and not going away fully when enabling the "hide faction" + option of advanced player list. - hannibal2 ### Technical Details diff --git a/build.gradle.kts b/build.gradle.kts index 8f7171956..5abe8290f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.21.1.Beta.7" +version = "0.21.1" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 8cf9cab27..f974d3d1d 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -332,7 +332,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.21.1.Beta.7", + version = "0.21.1", ) class SkyHanniMod { @Mod.EventHandler -- cgit