From c8f1c10e6c661ecf949ab29e0e8efeaa13324670 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Fri, 22 Oct 2021 01:40:06 +0800 Subject: Add Performance Analysis --- .../java/me/shedaniel/rei/fabric/PluginDetectorImpl.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'fabric/src/main/java') diff --git a/fabric/src/main/java/me/shedaniel/rei/fabric/PluginDetectorImpl.java b/fabric/src/main/java/me/shedaniel/rei/fabric/PluginDetectorImpl.java index c44ae6a06..711437449 100644 --- a/fabric/src/main/java/me/shedaniel/rei/fabric/PluginDetectorImpl.java +++ b/fabric/src/main/java/me/shedaniel/rei/fabric/PluginDetectorImpl.java @@ -80,7 +80,8 @@ public class PluginDetectorImpl { } catch (Throwable t) { Throwable throwable = t; while (throwable != null) { - if (throwable.getMessage() != null && throwable.getMessage().contains("environment type SERVER") && !RoughlyEnoughItemsInitializer.isClient()) continue out; + if (throwable.getMessage() != null && throwable.getMessage().contains("environment type SERVER") && !RoughlyEnoughItemsInitializer.isClient()) + continue out; throwable = throwable.getCause(); } String error = "Could not create REI Plugin [" + getSimpleName(pluginClass) + "] due to errors, provided by '" + container.getProvider().getMetadata().getId() + "'!"; @@ -98,12 +99,10 @@ public class PluginDetectorImpl { public static void detectServerPlugins() { loadPlugin(REIServerPlugin.class, ((PluginView) PluginManager.getServerInstance())::registerPlugin); - if (FabricLoader.getInstance().isModLoaded("libblockattributes-fluids")) { - try { - PluginView.getServerInstance().registerPlugin((REIServerPlugin) Class.forName("me.shedaniel.rei.impl.common.compat.FabricFluidAPISupportPlugin").getConstructor().newInstance()); - } catch (Throwable throwable) { - throwable.printStackTrace(); - } + try { + PluginView.getServerInstance().registerPlugin((REIServerPlugin) Class.forName("me.shedaniel.rei.impl.common.compat.FabricFluidAPISupportPlugin").getConstructor().newInstance()); + } catch (Throwable throwable) { + throwable.printStackTrace(); } } -- cgit