diff options
| -rw-r--r-- | forge/build.gradle | 4 | ||||
| -rw-r--r-- | runtime/src/main/java/me/shedaniel/rei/impl/common/plugins/PluginManagerImpl.java | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/forge/build.gradle b/forge/build.gradle index 9cd12ffad..95d9d0ac4 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -93,6 +93,10 @@ dependencies { // modRuntime("curse.maven:eidolon-429625:3157832") modRuntime("curse.maven:token-enchanter-444421:3449483") modRuntime("curse.maven:silent-lib-242998:3400030") + // modRuntime("curse.maven:resourceful-bees-384508:3485315") + // modRuntime("curse.maven:thermal-expansion-69163:3404884") + // modRuntime("curse.maven:thermal-foundation-222880:3412300") + // modRuntime("curse.maven:cofh-core-69162:3407019") } shadowJar { diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/common/plugins/PluginManagerImpl.java b/runtime/src/main/java/me/shedaniel/rei/impl/common/plugins/PluginManagerImpl.java index bda591fb1..f0680cd47 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/common/plugins/PluginManagerImpl.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/common/plugins/PluginManagerImpl.java @@ -178,10 +178,13 @@ public class PluginManagerImpl<P extends REIPlugin<?>> implements PluginManager< try (SectionClosable section = section(stage, sectionName + wrapper.getPluginProviderName() + "/")) { if (reloadable == null || !wrapper.plugin.shouldBeForcefullyDoneOnMainThread(reloadable)) { consumer.accept(wrapper); - } else if (Platform.getEnvironment() == Env.CLIENT) { - EnvExecutor.runInEnv(Env.CLIENT, () -> () -> queueExecutionClient(() -> consumer.accept(wrapper))); } else { - queueExecution(() -> consumer.accept(wrapper)); + RoughlyEnoughItemsCore.LOGGER.warn("Forcing plugin " + wrapper.getPluginProviderName() + " to run on the main thread for " + sectionName + "! This is extremely dangerous, and have large performance implications."); + if (Platform.getEnvironment() == Env.CLIENT) { + EnvExecutor.runInEnv(Env.CLIENT, () -> () -> queueExecutionClient(() -> consumer.accept(wrapper))); + } else { + queueExecution(() -> consumer.accept(wrapper)); + } } } catch (Throwable throwable) { RoughlyEnoughItemsCore.LOGGER.error(wrapper.getPluginProviderName() + " plugin failed to " + sectionName + "!", throwable); |
