[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/NeoForge/src/main/java/com/hypherionmc/craterlib/client/NeoForgeClientHelper.java
|
||||
+++ /dev/null
|
||||
@@ -1,69 +1,0 @@
|
||||
@@ -1,68 +1,0 @@
|
||||
-package com.hypherionmc.craterlib.client;
|
||||
-
|
||||
-import com.hypherionmc.craterlib.api.events.client.LateInitEvent;
|
||||
@@ -57,12 +57,11 @@
|
||||
- LateInitEvent event = new LateInitEvent(new BridgedMinecraft(), BridgedOptions.of(Minecraft.getInstance().options));
|
||||
- CraterEventBus.INSTANCE.postEvent(event);
|
||||
-
|
||||
- ConfigController.getWatchedConfigs().forEach((conf, watcher) -> {
|
||||
- AbstractConfig config = watcher.getLeft();
|
||||
- ConfigController.getWatchedConfigs().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