diff options
| author | shedaniel <daniel@shedaniel.me> | 2021-11-20 15:14:36 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2021-11-20 18:30:35 +0800 |
| commit | 6070b21d0e843aecaa032f473dc293382f860f0a (patch) | |
| tree | bcbf710f00aa16181e5a964604c61a7520a9b230 /forge | |
| parent | 242b0a3d140dae6eadade91e0ee5bfbcf403f3bf (diff) | |
| download | RoughlyEnoughItems-6070b21d0e843aecaa032f473dc293382f860f0a.tar.gz RoughlyEnoughItems-6070b21d0e843aecaa032f473dc293382f860f0a.tar.bz2 RoughlyEnoughItems-6070b21d0e843aecaa032f473dc293382f860f0a.zip | |
Fix REIClientPlugins on servers
Diffstat (limited to 'forge')
| -rw-r--r-- | forge/src/main/java/me/shedaniel/rei/forge/RoughlyEnoughItemsForge.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/forge/src/main/java/me/shedaniel/rei/forge/RoughlyEnoughItemsForge.java b/forge/src/main/java/me/shedaniel/rei/forge/RoughlyEnoughItemsForge.java index 8f67f2bff..e2b13d7bc 100644 --- a/forge/src/main/java/me/shedaniel/rei/forge/RoughlyEnoughItemsForge.java +++ b/forge/src/main/java/me/shedaniel/rei/forge/RoughlyEnoughItemsForge.java @@ -68,6 +68,7 @@ public class RoughlyEnoughItemsForge { .flatMap(info -> info.getMods().stream()) .map(IModInfo::getModId) .collect(Collectors.toList()); + out: for (ModFileScanData.AnnotationData annotation : data.getAnnotations()) { if (annotationType.equals(annotation.annotationType())) { try { @@ -83,6 +84,12 @@ public class RoughlyEnoughItemsForge { }, clazz)); } } catch (Throwable throwable) { + Throwable t = throwable; + while (t != null) { + if (t.getMessage() != null && t.getMessage().contains("invalid dist DEDICATED_SERVER") && !RoughlyEnoughItemsInitializer.isClient()) + continue out; + t = t.getCause(); + } LOGGER.error("Failed to load plugin: " + annotation.memberName(), throwable); } } |
