From 9a86e3fa1ff130285a998f089939da24c3b5b7b9 Mon Sep 17 00:00:00 2001 From: Rime <81419447+Emirlol@users.noreply.github.com> Date: Thu, 18 Jan 2024 08:39:14 +0300 Subject: Refactored score hud configs from Dungeons to DungeonScore --- .../hysky/skyblocker/config/SkyblockerConfig.java | 24 +++++++++++----------- .../config/categories/DungeonsCategory.java | 16 +++++++-------- 2 files changed, 20 insertions(+), 20 deletions(-) (limited to 'src/main/java/de/hysky/skyblocker/config') diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java index ffd6aa4d..e47b008d 100644 --- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java @@ -623,18 +623,6 @@ public class SkyblockerConfig { @SerialEntry public int mapY = 2; - @SerialEntry - public boolean enableScore = true; - - @SerialEntry - public int scoreX = 29; - - @SerialEntry - public int scoreY = 134; - - @SerialEntry - public float scoreScaling = 1f; - @SerialEntry public boolean playerSecretsTracker = false; @@ -772,6 +760,18 @@ public class SkyblockerConfig { @SerialEntry public String dungeonScore300Message = "300 Score Reached!"; + + @SerialEntry + public boolean enableScoreHUD = true; + + @SerialEntry + public int scoreX = 29; + + @SerialEntry + public int scoreY = 134; + + @SerialEntry + public float scoreScaling = 1f; } public static class DungeonChestProfit { diff --git a/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java index 8cd697e5..8546382f 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java @@ -317,9 +317,9 @@ public class DungeonsCategory { .build()) .option(Option.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.enableScore")) - .binding(defaults.locations.dungeons.enableScore, - () -> config.locations.dungeons.enableScore, - newValue -> config.locations.dungeons.enableScore = newValue) + .binding(defaults.locations.dungeons.dungeonScore.enableScoreHUD, + () -> config.locations.dungeons.dungeonScore.enableScoreHUD, + newValue -> config.locations.dungeons.dungeonScore.enableScoreHUD = newValue) .controller(ConfigUtils::createBooleanController) .build()) .option(ButtonOption.createBuilder() @@ -336,12 +336,12 @@ public class DungeonsCategory { .build()) .option(Option.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.scoreScaling")) - .binding(defaults.locations.dungeons.scoreScaling, - () -> config.locations.dungeons.scoreScaling, + .binding(defaults.locations.dungeons.dungeonScore.scoreScaling, + () -> config.locations.dungeons.dungeonScore.scoreScaling, newValue -> { - config.locations.dungeons.scoreX = config.locations.dungeons.scoreX + (int) ((config.locations.dungeons.scoreScaling - newValue) * 38.0); - config.locations.dungeons.scoreY = config.locations.dungeons.scoreY + (int) ((config.locations.dungeons.scoreScaling - newValue) * MinecraftClient.getInstance().textRenderer.fontHeight / 2.0); - config.locations.dungeons.scoreScaling = newValue; + config.locations.dungeons.dungeonScore.scoreX = config.locations.dungeons.dungeonScore.scoreX + (int) ((config.locations.dungeons.dungeonScore.scoreScaling - newValue) * 38.0); + config.locations.dungeons.dungeonScore.scoreY = config.locations.dungeons.dungeonScore.scoreY + (int) ((config.locations.dungeons.dungeonScore.scoreScaling - newValue) * MinecraftClient.getInstance().textRenderer.fontHeight / 2.0); + config.locations.dungeons.dungeonScore.scoreScaling = newValue; }) .controller(FloatFieldControllerBuilder::create) .build()) -- cgit