diff options
32 files changed, 777 insertions, 141 deletions
diff --git a/MRREADME.md b/MRREADME.md new file mode 100644 index 00000000..7e1e68ad --- /dev/null +++ b/MRREADME.md @@ -0,0 +1,225 @@ +<img height="150" src="https://hysky.de/skyblocker.png" /> + +## Skyblocker + +Hypixel Skyblock Mod for Minecraft 1.17.x + 1.18.x + 1.19.x + 1.20.x + +## 🔧 Configuration - [Mod Menu](https://modrinth.com/mod/modmenu) not required +open config with modmenu \ +or **/skyblocker config** + +Skyblocker has a variety of configurations. \ +To access the configuration menu, you must install [Mod Menu](https://modrinth.com/mod/modmenu). +<figure><a href="https://cdn-raw.modrinth.com/data/y6DuFGwJ/images/7a284adbbdc9cbad48c627e3898dc8cfb9f54a64.png"><img src="https://cdn.modrinth.com/data/y6DuFGwJ/images/7a284adbbdc9cbad48c627e3898dc8cfb9f54a64.png" alt="Mod Menu" style="width:100%"></a><figcaption align = "center"><b>Mod Menu - Skyblocker config</b></figcaption></figure> + +### List of Configuration + +<details> +<summary> General </summary> + +|Config option|Description| +|---|---| +| Update Notification | Get notified when there is a new update | +| View [backpack preview](https://cdn-raw.modrinth.com/data/y6DuFGwJ/images/ef33e34b79c1615bcb23f3a395b29b793ef32e34.png) without holding shift | Preview on hover | + +<details> +<summary> Health, Mana, Defence & XP Bars </summary> + +|Config option|Description| +|---|---| +|Enable Bars| Change Minecraft health ui with skyblocker [custom ui](https://user-images.githubusercontent.com/27798256/170806938-f858f0ae-4d8b-4767-9b53-8fe5a65edf56.png)| +|Configure Bar Position|[Customize Bar Positions](https://cdn.discordapp.com/attachments/1103292463558438993/1103292498345984070/healt-layer.png)| +</details> + +<details> +<summary> Item List </summary> + +|Config option|Description| +|---|---| +|Enable Item List| Acitvate [recipe viewer](https://cdn-raw.modrinth.com/data/y6DuFGwJ/images/cf9f8077067b9781686f23116f163d529c21c404.png)| +</details> + +<details> +<summary> Item Tooltip </summary> + +Customize [Item tooltip](https://cdn-raw.modrinth.com/data/y6DuFGwJ/images/12903f3f839d769fac48a4e74e04bee9aa1657d5.png) + +</details> + +<details> +<summary> Hitboxes </summary> + +|Config option|Description| +|---|---| +|Enable 1.8 farmland hitbox| Change hitbox to the 1.8 one | +|Enable 1.8 lever hitbox| Change hitbox to the 1.8 one | +</details> +</details> + +<details> +<summary> Locations </summary> + +<details> +<summary> Dungeons </summary> + +|Config option|Description| +|---|---| +|Croseus Helper|Gray out chests that have already been opened| +|Enable Map| [Map](https://cdn-raw.modrinth.com/data/y6DuFGwJ/images/43243429b1c4d17236ae3e5a9836ecd7d905644b.png)| +|Solve Three Weirdos Puzzle|Solver usefull in Dungeons| +|Solve Blaze Puzzle|Solver usefull in Dungeons| +|Solve Trivia Puzzle|Solver usefull in Dungeons| + +<details> +<summary> Terminal </summary> + +|Config option|Description| +|---|---| +|Solve Selectect Colored|Solver usefull in Dungeons 7| +|Solve Click In Order|Solver usefull in Dungeons 7| +|Solve Starts With|Solver usefull in Dungeons 7| +</details> +</details> +<details> +<summary> Dwarven Mines </summary> + +|Config option|Description| +|---|---| +|Enable Drill Fuel|[Drill icon](https://cdn-raw.modrinth.com/data/y6DuFGwJ/images/43c7ab7aa7c90fcf833c7cddbf73e6644c6ce5fa.png)| +|Solve Fetchur| Solver usefull in Mines| +|Solve Puzzler Puzzle| Solver usefull in Mines | +|Dwarven Hud| [Commision Hud](https://cdn.discordapp.com/attachments/905867886428565565/950513333478494248/Screen_Shot_2022-03-07_at_4.58.12_PM.png)| +</details> +</details> + + +<details> +<summary> Quick Navigation </summary> + +|Config option|Description| +|---|---| +|Enable Quick Navigation|Enable [Quicknav](https://cdn.discordapp.com/attachments/1103292463558438993/1103358576870817866/quick-nav.png)| +<details> +<summary> Button 1-12 </summary> + +|Config option|Description| +|---|---| +|Render|To show the tab| +|Item name| The name of the item e.g. iron_boots | +|NBT| NBT tag of the item e.g. custom head id on skull item| +|UI Title| Title of the tab| +|Click event|The command that is executed when you click the tab| +</details> +</details> + + +<details> +<summary> Messages </summary> + +|Config option|Description| +|---|---| +|Hide Ability Cooldown|Disable,Filter or Move to action bar| +|Hide Heal Messages|Disable,Filter or Move to action bar| +|Hide AOTE Messages|Disable,Filter or Move to action bar| +|Hide Implosion Message|Disable,Filter or Move to action bar| +|Hide Molten Wave Message|Disable,Filter or Move to action bar| +|Hide Ads from Public Chat|Disable,Filter or Move to action bar| +|Hide Teleport Pad Messages|Disable,Filter or Move to action bar| +|Hide Combo Messages|Disable,Filter or Move to action bar| +|Hide Autopet Messages|Disable,Filter or Move to action bar| +|Hide Mana Consumption Messages from Action Bar|Activate or deactivate| +</details> + + +<details> +<summary> Discord Rich Presence </summary> + +|Config option|Description| +|---|---| +|Enable|Activate [Discord Rich Presence](https://cdn-raw.modrinth.com/data/y6DuFGwJ/images/f6314d0ae0fc24d77fb3371e59b7abfe4774a17e.png)| +|Skyblock Info|Choose between Location,Purse and Bits| +|Cycle Skyblock Info| Cycles between the three options| +|Custom Message| Show a custom message| +</details> + +## 🖼️ Images +Click [#Gallery](https://modrinth.com/mod/skyblocker-liap/gallery) for images to this mod + +## 📖Features +<details open> +<summary>open</summary> + +* Bars: Health and absorption, Mana, Defense, XP (moving fancy bars) +* Hide Messages: Ability Cooldown, Heal, AOTE, Implosion, Molten Wave, Teleport Pad Messages +* Dungeon Minimap +* Dungeon Secrets +* Starred Mob Glow +* Dungeon Puzzle Solver: + * Three Weirdos + * Blaze + * Tic Tac Toe + * Croesus + * Terminal: + * Order + * Coloured Items + * Item Name +* Dwarven Mines Solver: Fetchur, Puzzler +* Barn Solver: Treasure Hunter, Hungry Hiker +* Experiments Solvers +* Slayer helper: + * Vampire : Effigy Waypoints, Healing Melon Indicator, Twinclaws Ice Indicator, Steak Stake Indicator +* Drill Fuel and Pickonimbus 2000 in Item Durability Bar +* Hotbar Slot Lock Keybind (Select the hotbar slot you want to lock/unlock and press the lockbutton) +* Price tooltip: npc, motes, bazaar (avg, lbin), ah, museum +* reparty: write /rp to reparty + auto rejoin +* Wiki Lookup: press f4 to open the wiki page about the held item +* Discord Rich Presence: Allows user to show either their Piggy, Bits, or location. Along with a custom message +* Quicknav: fast navigate between pets, armor, enderchest, skill, collection, crafting, enchant, envil, warp dungeon, + warp hub +* Recipe book: in the vanilla recipe book all skyblock items are listed, and you can see the recipe of the item +* Backpack preview: after you clicked your backpack or enderchest once you can hover over the backpack or enderchest and + hold shift to preview +* Update notification +* Commission HUD: Dwarven Mines quests +* 1.8 hitbox for lever and farmland +* Custom Tab HUD + Fully configureable with ressourcepack +* Roughly enough items (REI) and Emi Support +* Fishing Helper + sound notification +* Mirrorverse Waypoints +* Attribute Shard Info Display +* Item and Armour customisation: + * Item Renaming + * Custom Armour Dye Colours + * Custom Armour Trims +* OptiFabric Compatibility +* Rare Drop Special Effects! Dungeon chest +* Dungeon Chest Profit Calculator +* Hide Status Effect Overlay +* Personal Compactor/Deletor preview +* Hide fake players in social interactions screen +* hidden relic helper + +</details> + + +## [Modpack](https://modrinth.com/modpack/skyblocker-modpack) + +<details open> +<summary>open</summary> + +1. [Here](https://docs.modrinth.com/docs/modpacks/playing_modpacks) is a tutorial how to install it easy with a launcher. +2. Download the [Skyblocker Modpack](https://modrinth.com/modpack/skyblocker-modpack/version/latest). + * Drag and drop the .mrpack file into a Custom MC Launcher like [MultiMC](https://multimc.org/) or [Prism Launcher](https://prismlauncher.org/) and start the new instance. + +</details> + +## Kinetic Hosting Affiliate - 15% off your first month + +Looking for an affordable and reliable hosting platform for your Minecraft server? Look no further than Kinetic Hosting! As an affiliate partner with Kinetic Hosting, we highly recommend their service. They offer fast and reliable servers with the largest range of supported modpacks. + +As a special offer for our audience, you can **<u>[use the discount code "Skyblocker" during checkout to get 15% off your first month](https://billing.kinetichosting.net/aff.php?aff=315)</u>**. +This helps to cover our server costs. + +[](https://billing.kinetichosting.net/aff.php?aff=315) + +So what are you waiting for? Click on the **<u>[link](https://billing.kinetichosting.net/aff.php?aff=315)</u>** to check out Kinetic Hosting and start playing with your friends today!
\ No newline at end of file diff --git a/build.gradle b/build.gradle index d26c0e92..3e4a13d3 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.3-SNAPSHOT' + id 'fabric-loom' version '1.4-SNAPSHOT' id 'maven-publish' id 'com.modrinth.minotaur' version '2.+' } @@ -140,18 +140,22 @@ modrinth { gameVersions = [project.minecraft_version] loaders = ["fabric"] versionType = "release" - dependencies = [ // Yet another array. Create a new `ModDependency` or `VersionDependency` with two strings - the ID and the scope - new ModDependency("P7dR8mSH", "required"), // Creates a new required dependency on Fabric API - new ModDependency("mOgUt4GM", "optional"), // modmenu - new ModDependency("nfn13YXA", "optional") // REI - ] + dependencies { + required.project "fabric-api" + optional.project "modmenu" + optional.project "rei" + optional.project "emi" + } changelog = System.getenv('CHANGELOG') + syncBodyFrom = rootProject.file("MRREADME.md").text } tasks.modrinth.doLast { println "::set-output name=url::https://modrinth.com/mod/skyblocker-liap/version/$uploadInfo.id" } +tasks.modrinth.dependsOn(tasks.modrinthSyncBody) + // configure the maven publication publishing { publications { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar Binary files differindex c1962a79..7f93135c 100644 --- a/gradle/wrapper/gradle-wrapper.jar +++ b/gradle/wrapper/gradle-wrapper.jar diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37aef8d3..3fa8f862 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists @@ -83,7 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -130,10 +131,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -141,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -149,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -198,11 +202,11 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/src/main/java/me/xmrvizzy/skyblocker/SkyblockerMod.java b/src/main/java/me/xmrvizzy/skyblocker/SkyblockerMod.java index 07a5be76..6f4276e9 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/SkyblockerMod.java +++ b/src/main/java/me/xmrvizzy/skyblocker/SkyblockerMod.java @@ -4,6 +4,7 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; import me.xmrvizzy.skyblocker.config.SkyblockerConfigManager; import me.xmrvizzy.skyblocker.skyblock.*; +import me.xmrvizzy.skyblocker.skyblock.item.ItemCooldowns; import me.xmrvizzy.skyblocker.skyblock.dungeon.*; import me.xmrvizzy.skyblocker.skyblock.dungeon.secrets.DungeonSecrets; import me.xmrvizzy.skyblocker.skyblock.dwarven.DwarvenHud; @@ -78,6 +79,7 @@ public class SkyblockerMod implements ClientModInitializer { Relics.init(); BackpackPreview.init(); QuickNav.init(); + ItemCooldowns.init(); DwarvenHud.init(); ChatMessageListener.init(); Shortcuts.init(); @@ -101,6 +103,7 @@ public class SkyblockerMod implements ClientModInitializer { QuiverWarning.init(); SpecialEffects.init(); ItemProtection.init(); + ItemRarityBackgrounds.init(); containerSolverManager.init(); statusBarTracker.init(); Scheduler.INSTANCE.scheduleCyclic(Utils::update, 20); diff --git a/src/main/java/me/xmrvizzy/skyblocker/config/ConfigUtils.java b/src/main/java/me/xmrvizzy/skyblocker/config/ConfigUtils.java index 28ed704b..552ed091 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/config/ConfigUtils.java +++ b/src/main/java/me/xmrvizzy/skyblocker/config/ConfigUtils.java @@ -3,9 +3,17 @@ package me.xmrvizzy.skyblocker.config; import dev.isxander.yacl3.api.Option; import dev.isxander.yacl3.api.controller.BooleanControllerBuilder; import dev.isxander.yacl3.api.controller.EnumControllerBuilder; -import me.xmrvizzy.skyblocker.config.controllers.EnumDropdownControllerBuilder; +import dev.isxander.yacl3.api.controller.ValueFormatter; +import net.minecraft.text.Text; +import net.minecraft.util.Formatting; +import org.apache.commons.lang3.StringUtils; + +import java.util.function.Function; public class ConfigUtils { + public static final Function<Formatting, String> FORMATTING_TO_STRING = formatting -> StringUtils.capitalize(formatting.getName().replaceAll("_", " ")); + public static final ValueFormatter<Float> FLOAT_TWO_FORMATTER = value -> Text.literal(String.format("%,.2f", value).replaceAll("[\u00a0\u202F]", " ")); + public static BooleanControllerBuilder createBooleanController(Option<Boolean> opt) { return BooleanControllerBuilder.create(opt).yesNoFormatter().coloured(true); } @@ -14,8 +22,4 @@ public class ConfigUtils { public static <E extends Enum<E>> EnumControllerBuilder<E> createEnumCyclingListController(Option<E> opt) { return EnumControllerBuilder.create(opt).enumClass((Class<E>) opt.binding().defaultValue().getClass()); } - - public static <E extends Enum<E>> EnumDropdownControllerBuilder<E> createEnumDropdownController(Option<E> opt) { - return EnumDropdownControllerBuilder.create(opt); - } } diff --git a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java index e40c3f21..8e014124 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java @@ -1,10 +1,5 @@ package me.xmrvizzy.skyblocker.config; -import java.util.ArrayList; -import java.util.List; - -import org.apache.commons.lang3.StringUtils; - import dev.isxander.yacl3.config.v2.api.SerialEntry; import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; @@ -15,6 +10,9 @@ import net.minecraft.client.resource.language.I18n; import net.minecraft.text.Text; import net.minecraft.util.Formatting; +import java.util.ArrayList; +import java.util.List; + public class SkyblockerConfig { @SerialEntry public int version = 1; @@ -179,6 +177,9 @@ public class SkyblockerConfig { public FairySouls fairySouls = new FairySouls(); @SerialEntry + public ItemCooldown itemCooldown = new ItemCooldown(); + + @SerialEntry public Shortcuts shortcuts = new Shortcuts(); @SerialEntry @@ -315,6 +316,11 @@ public class SkyblockerConfig { public boolean highlightOnlyNearbySouls = false; } + public static class ItemCooldown { + @SerialEntry + public boolean enableItemCooldowns = true; + } + public static class Shortcuts { @SerialEntry public boolean enableShortcuts = true; @@ -461,6 +467,12 @@ public class SkyblockerConfig { public static class ItemInfoDisplay { @SerialEntry public boolean attributeShardInfo = true; + + @SerialEntry + public boolean itemRarityBackgrounds = false; + + @SerialEntry + public float itemRarityBackgroundsOpacity = 1f; } public static class SpecialEffects { @@ -581,55 +593,18 @@ public class SkyblockerConfig { public int neutralThreshold = 1000; @SerialEntry - public FormattingOption neutralColor = FormattingOption.DARK_GRAY; + public Formatting neutralColor = Formatting.DARK_GRAY; @SerialEntry - public FormattingOption profitColor = FormattingOption.DARK_GREEN; + public Formatting profitColor = Formatting.DARK_GREEN; @SerialEntry - public FormattingOption lossColor = FormattingOption.RED; + public Formatting lossColor = Formatting.RED; @SerialEntry - public FormattingOption incompleteColor = FormattingOption.BLUE; + public Formatting incompleteColor = Formatting.BLUE; } - - public enum FormattingOption { - BLACK(Formatting.BLACK), - DARK_BLUE(Formatting.DARK_BLUE), - DARK_GREEN(Formatting.DARK_GREEN), - DARK_AQUA(Formatting.DARK_AQUA), - DARK_RED(Formatting.DARK_RED), - DARK_PURPLE(Formatting.DARK_PURPLE), - GOLD(Formatting.GOLD), - GRAY(Formatting.GRAY), - DARK_GRAY(Formatting.DARK_GRAY), - BLUE(Formatting.BLUE), - GREEN(Formatting.GREEN), - AQUA(Formatting.AQUA), - RED(Formatting.RED), - LIGHT_PURPLE(Formatting.LIGHT_PURPLE), - YELLOW(Formatting.YELLOW), - WHITE(Formatting.WHITE), - OBFUSCATED(Formatting.OBFUSCATED), - BOLD(Formatting.BOLD), - STRIKETHROUGH(Formatting.STRIKETHROUGH), - UNDERLINE(Formatting.UNDERLINE), - ITALIC(Formatting.ITALIC), - RESET(Formatting.RESET); - - public final Formatting formatting; - - - FormattingOption(Formatting formatting) { - this.formatting = formatting; - } - - @Override - public String toString() { - return StringUtils.capitalize(formatting.getName().replaceAll("_", " ")); - } - } public static class LividColor { @SerialEntry diff --git a/src/main/java/me/xmrvizzy/skyblocker/config/categories/DungeonsCategory.java b/src/main/java/me/xmrvizzy/skyblocker/config/categories/DungeonsCategory.java index 16439cb5..2d641ac1 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/config/categories/DungeonsCategory.java +++ b/src/main/java/me/xmrvizzy/skyblocker/config/categories/DungeonsCategory.java @@ -10,11 +10,12 @@ import dev.isxander.yacl3.api.controller.FloatFieldControllerBuilder; import dev.isxander.yacl3.api.controller.IntegerFieldControllerBuilder; import dev.isxander.yacl3.api.controller.StringControllerBuilder; import me.xmrvizzy.skyblocker.config.SkyblockerConfig; -import me.xmrvizzy.skyblocker.config.SkyblockerConfig.FormattingOption; import me.xmrvizzy.skyblocker.config.ConfigUtils; +import me.xmrvizzy.skyblocker.config.controllers.EnumDropdownControllerBuilder; import me.xmrvizzy.skyblocker.skyblock.dungeon.DungeonMapConfigScreen; import net.minecraft.client.MinecraftClient; import net.minecraft.text.Text; +import net.minecraft.util.Formatting; public class DungeonsCategory { @@ -150,34 +151,34 @@ public class DungeonsCategory { newValue -> config.locations.dungeons.dungeonChestProfit.neutralThreshold = newValue) .controller(IntegerFieldControllerBuilder::create) .build()) - .option(Option.<FormattingOption>createBuilder() + .option(Option.<Formatting>createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonChestProfit.neutralColor")) .binding(defaults.locations.dungeons.dungeonChestProfit.neutralColor, () -> config.locations.dungeons.dungeonChestProfit.neutralColor, newValue -> config.locations.dungeons.dungeonChestProfit.neutralColor = newValue) - .controller(ConfigUtils::createEnumDropdownController) + .controller(EnumDropdownControllerBuilder.getFactory(ConfigUtils.FORMATTING_TO_STRING)) .build()) - .option(Option.<FormattingOption>createBuilder() + .option(Option.<Formatting>createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonChestProfit.profitColor")) .binding(defaults.locations.dungeons.dungeonChestProfit.profitColor, () -> config.locations.dungeons.dungeonChestProfit.profitColor, newValue -> config.locations.dungeons.dungeonChestProfit.profitColor = newValue) - .controller(ConfigUtils::createEnumDropdownController) + .controller(EnumDropdownControllerBuilder.getFactory(ConfigUtils.FORMATTING_TO_STRING)) .build()) - .option(Option.<FormattingOption>createBuilder() + .option(Option.<Formatting>createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonChestProfit.lossColor")) .binding(defaults.locations.dungeons.dungeonChestProfit.lossColor, () -> config.locations.dungeons.dungeonChestProfit.lossColor, newValue -> config.locations.dungeons.dungeonChestProfit.lossColor = newValue) - .controller(ConfigUtils::createEnumDropdownController) + .controller(EnumDropdownControllerBuilder.getFactory(ConfigUtils.FORMATTING_TO_STRING)) .build()) - .option(Option.<FormattingOption>createBuilder() + .option(Option.<Formatting>createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonChestProfit.incompleteColor")) .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonChestProfit.incompleteColor.@Tooltip"))) .binding(defaults.locations.dungeons.dungeonChestProfit.incompleteColor, () -> config.locations.dungeons.dungeonChestProfit.incompleteColor, newValue -> config.locations.dungeons.dungeonChestProfit.incompleteColor = newValue) - .controller(ConfigUtils::createEnumDropdownController) + .controller(EnumDropdownControllerBuilder.getFactory(ConfigUtils.FORMATTING_TO_STRING)) .build()) .build()) diff --git a/src/main/java/me/xmrvizzy/skyblocker/config/categories/GeneralCategory.java b/src/main/java/me/xmrvizzy/skyblocker/config/categories/GeneralCategory.java index c5e2d34c..318d579c 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/config/categories/GeneralCategory.java +++ b/src/main/java/me/xmrvizzy/skyblocker/config/categories/GeneralCategory.java @@ -1,15 +1,12 @@ package me.xmrvizzy.skyblocker.config.categories; -import dev.isxander.yacl3.api.ButtonOption; -import dev.isxander.yacl3.api.ConfigCategory; -import dev.isxander.yacl3.api.Option; -import dev.isxander.yacl3.api.OptionDescription; -import dev.isxander.yacl3.api.OptionGroup; +import dev.isxander.yacl3.api.*; import dev.isxander.yacl3.api.controller.FloatFieldControllerBuilder; +import dev.isxander.yacl3.api.controller.FloatSliderControllerBuilder; import dev.isxander.yacl3.api.controller.IntegerFieldControllerBuilder; import dev.isxander.yacl3.api.controller.IntegerSliderControllerBuilder; -import me.xmrvizzy.skyblocker.config.SkyblockerConfig; import me.xmrvizzy.skyblocker.config.ConfigUtils; +import me.xmrvizzy.skyblocker.config.SkyblockerConfig; import me.xmrvizzy.skyblocker.skyblock.shortcut.ShortcutsConfigScreen; import me.xmrvizzy.skyblocker.utils.render.title.TitleContainerConfigScreen; import net.minecraft.client.MinecraftClient; @@ -17,10 +14,10 @@ import net.minecraft.text.Text; public class GeneralCategory { - public static ConfigCategory create(SkyblockerConfig defaults, SkyblockerConfig config) { + public static ConfigCategory create(SkyblockerConfig defaults, SkyblockerConfig config) { return ConfigCategory.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.category.general")) - + //Ungrouped Options .option(Option.<Boolean>createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.general.acceptReparty")) @@ -57,7 +54,7 @@ public class GeneralCategory { newValue -> config.general.hideStatusEffectOverlay = newValue) .controller(ConfigUtils::createBooleanController) .build()) - + //Tab Hud .group(OptionGroup.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.general.tabHud")) @@ -94,7 +91,7 @@ public class GeneralCategory { .controller(ConfigUtils::createEnumCyclingListController) .build()) .build()) - + //Fancy Bars .group(OptionGroup.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.general.bars")) @@ -135,7 +132,7 @@ public class GeneralCategory { .controller(ConfigUtils::createEnumCyclingListController) .build()) .build()) - + //Experiments Solver .group(OptionGroup.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.general.experiments")) @@ -162,7 +159,7 @@ public class GeneralCategory { .controller(ConfigUtils::createBooleanController) .build()) .build()) - + //Fishing Helper .group(OptionGroup.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.general.fishing")) @@ -175,7 +172,7 @@ public class GeneralCategory { .controller(ConfigUtils::createBooleanController) .build()) .build()) - |
