Fix world gen progress ui button
This commit is contained in:
@@ -104,7 +104,7 @@ public class Config
|
||||
public static ConfigUiLinkedEntry quickEnableWorldGenerator = new ConfigUiLinkedEntry(Common.WorldGenerator.enableDistantGeneration);
|
||||
|
||||
public static ConfigEntry<Boolean> quickShowWorldGenProgress = new ConfigEntry.Builder<Boolean>()
|
||||
.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();
|
||||
|
||||
|
||||
+6
-3
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user