[BUG] Fix Config watcher using too many threads and not detecting changes on Linux systems
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--- a/Forge/src/main/java/com/hypherionmc/craterlib/mixin/ConfigScreenHandlerMixin.java
|
||||
+++ /dev/null
|
||||
@@ -1,44 +1,0 @@
|
||||
@@ -1,43 +1,0 @@
|
||||
-package com.hypherionmc.craterlib.mixin;
|
||||
-
|
||||
-import com.hypherionmc.craterlib.client.gui.config.CraterConfigScreen;
|
||||
@@ -31,12 +31,11 @@
|
||||
- */
|
||||
- @Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
||||
- private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
||||
- ConfigController.getMonitoredConfigs().forEach((conf, watcher) -> {
|
||||
- AbstractConfig config = watcher.getLeft();
|
||||
- ConfigController.getMonitoredConfigs().forEach((conf, config) -> {
|
||||
- if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
||||
- return;
|
||||
-
|
||||
- if (watcher.getLeft().getClass().isAnnotationPresent(ClothScreen.class) && (ModloaderEnvironment.INSTANCE.isModLoaded("cloth_config") || ModloaderEnvironment.INSTANCE.isModLoaded("cloth-config") || ModloaderEnvironment.INSTANCE.isModLoaded("clothconfig"))) {
|
||||
- if (config.getClass().isAnnotationPresent(ClothScreen.class) && (ModloaderEnvironment.INSTANCE.isModLoaded("cloth_config") || ModloaderEnvironment.INSTANCE.isModLoaded("cloth-config") || ModloaderEnvironment.INSTANCE.isModLoaded("clothconfig"))) {
|
||||
- ModList.get().getModContainerById(config.getModId()).ifPresent(c -> c.registerExtensionPoint(IConfigScreenFactory.class, ((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))));
|
||||
- } else {
|
||||
- //ModList.get().getModContainerById(config.getModId()).ifPresent(c -> c.registerExtensionPoint(IConfigScreenFactory.class, ((minecraft, screen) -> new CraterConfigScreen(config, screen))));
|
||||
|
Reference in New Issue
Block a user