From 90605796150705ec47c5ecba8ceab58cf3a1b558 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Mon, 13 Oct 2025 07:42:46 -0500 Subject: [PATCH] Fix world gen progress ui button --- .../com/seibel/distanthorizons/core/config/Config.java | 2 +- .../QuickShowWorldGenProgressConfigEventHandler.java | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/config/Config.java b/core/src/main/java/com/seibel/distanthorizons/core/config/Config.java index 719ebd25c..386d4ec0c 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/config/Config.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/config/Config.java @@ -104,7 +104,7 @@ public class Config public static ConfigUiLinkedEntry quickEnableWorldGenerator = new ConfigUiLinkedEntry(Common.WorldGenerator.enableDistantGeneration); public static ConfigEntry quickShowWorldGenProgress = new ConfigEntry.Builder() - .set(true) + .set(false) // TODO should be set by the underlying world gen progress button, not a static default .setAppearance(EConfigEntryAppearance.ONLY_IN_GUI) .build(); diff --git a/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/presets/QuickShowWorldGenProgressConfigEventHandler.java b/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/presets/QuickShowWorldGenProgressConfigEventHandler.java index e0891d776..9d80e9c1b 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/presets/QuickShowWorldGenProgressConfigEventHandler.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/presets/QuickShowWorldGenProgressConfigEventHandler.java @@ -39,14 +39,17 @@ public class QuickShowWorldGenProgressConfigEventHandler this.quickChangeListener = new ConfigChangeListener<>(Config.Client.quickShowWorldGenProgress, (val) -> { - Config.Common.WorldGenerator.showGenerationProgress.set(Config.Client.quickShowWorldGenProgress.get() - ? Config.Common.WorldGenerator.showGenerationProgress.getDefaultValue() + boolean quickShowProgress = Config.Client.quickShowWorldGenProgress.get(); + Config.Common.WorldGenerator.showGenerationProgress.set( + quickShowProgress + ? EDhApiDistantGeneratorProgressDisplayLocation.OVERLAY : EDhApiDistantGeneratorProgressDisplayLocation.DISABLED); }); this.fullChangeListener = new ConfigChangeListener<>(Config.Common.WorldGenerator.showGenerationProgress, (val) -> { - Config.Client.quickShowWorldGenProgress.set(Config.Common.WorldGenerator.showGenerationProgress.get() != EDhApiDistantGeneratorProgressDisplayLocation.DISABLED); + boolean showProgress = Config.Common.WorldGenerator.showGenerationProgress.get() != EDhApiDistantGeneratorProgressDisplayLocation.DISABLED; + Config.Client.quickShowWorldGenProgress.setWithoutFiringEvents(showProgress); }); }