aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/hysky/skyblocker/config
diff options
context:
space:
mode:
authorRime <81419447+Emirlol@users.noreply.github.com>2024-01-18 08:39:14 +0300
committerRime <81419447+Emirlol@users.noreply.github.com>2024-01-21 09:37:49 +0300
commit9a86e3fa1ff130285a998f089939da24c3b5b7b9 (patch)
tree49d4094311b9ef6429404f69a9efb230acb73450 /src/main/java/de/hysky/skyblocker/config
parent8feae9fc42e894431bc16474c4476ee0f7e58fa4 (diff)
downloadSkyblocker-9a86e3fa1ff130285a998f089939da24c3b5b7b9.tar.gz
Skyblocker-9a86e3fa1ff130285a998f089939da24c3b5b7b9.tar.bz2
Skyblocker-9a86e3fa1ff130285a998f089939da24c3b5b7b9.zip
Refactored score hud configs from Dungeons to DungeonScore
Diffstat (limited to 'src/main/java/de/hysky/skyblocker/config')
-rw-r--r--src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java24
-rw-r--r--src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java16
2 files changed, 20 insertions, 20 deletions
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
@@ -624,18 +624,6 @@ public class SkyblockerConfig {
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;
@SerialEntry
@@ -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.<Boolean>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.<Float>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())