aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorRime <81419447+Emirlol@users.noreply.github.com>2024-01-20 19:09:17 +0300
committerRime <81419447+Emirlol@users.noreply.github.com>2024-01-21 09:37:49 +0300
commit6120f55ac3161ebf4c0858ab674a5cbffa7879a9 (patch)
tree2b5314ee5db7dcc6ba00ef6f2306b635cd8911c4 /src/main
parent4fd8d4f727ce611eb28218e6a47080894a78b7b1 (diff)
downloadSkyblocker-6120f55ac3161ebf4c0858ab674a5cbffa7879a9.tar.gz
Skyblocker-6120f55ac3161ebf4c0858ab674a5cbffa7879a9.tar.bz2
Skyblocker-6120f55ac3161ebf4c0858ab674a5cbffa7879a9.zip
Refactor score hud settings
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java38
1 files changed, 19 insertions, 19 deletions
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 c39eb05c..6ec06e7a 100644
--- a/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java
+++ b/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java
@@ -230,6 +230,25 @@ public class DungeonsCategory {
newValue -> config.locations.dungeons.dungeonScore.dungeonScore300Message = newValue)
.controller(StringControllerBuilder::create)
.build())
+ .option(Option.<Boolean>createBuilder()
+ .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore.enableScoreHUD"))
+ .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore.enableScoreHUD.@Tooltip"), Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore.enableScoreHUD.deathMessagesNote")))
+ .binding(defaults.locations.dungeons.dungeonScore.enableScoreHUD,
+ () -> config.locations.dungeons.dungeonScore.enableScoreHUD,
+ newValue -> config.locations.dungeons.dungeonScore.enableScoreHUD = newValue)
+ .controller(ConfigUtils::createBooleanController)
+ .build())
+ .option(Option.<Float>createBuilder()
+ .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore.scoreScaling"))
+ .binding(defaults.locations.dungeons.dungeonScore.scoreScaling,
+ () -> config.locations.dungeons.dungeonScore.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())
.build())
//Dungeon Chest Profit
@@ -315,14 +334,6 @@ public class DungeonsCategory {
newValue -> config.locations.dungeons.enableMap = newValue)
.controller(ConfigUtils::createBooleanController)
.build())
- .option(Option.<Boolean>createBuilder()
- .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore.enableScoreHUD"))
- .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore.enableScoreHUD.@Tooltip"), Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore.enableScoreHUD.deathMessagesNote")))
- .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()
.name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.mapScreen"))
.text(Text.translatable("text.skyblocker.open"))
@@ -335,17 +346,6 @@ public class DungeonsCategory {
newValue -> config.locations.dungeons.mapScaling = newValue)
.controller(FloatFieldControllerBuilder::create)
.build())
- .option(Option.<Float>createBuilder()
- .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore.scoreScaling"))
- .binding(defaults.locations.dungeons.dungeonScore.scoreScaling,
- () -> config.locations.dungeons.dungeonScore.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())
.option(Option.<Boolean>createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.playerSecretsTracker"))
.description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.playerSecretsTracker.@Tooltip")))