aboutsummaryrefslogtreecommitdiff
path: root/forge/src/main
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2021-11-20 15:14:36 +0800
committershedaniel <daniel@shedaniel.me>2021-11-20 15:14:36 +0800
commit6b5aaeb240eb10d7d9d918955701637157152871 (patch)
tree1f9e208a325af6cd4760347eac42345955daf164 /forge/src/main
parent3c2be7753cebfe420cf4861e5590c8eef9469c33 (diff)
downloadRoughlyEnoughItems-6b5aaeb240eb10d7d9d918955701637157152871.tar.gz
RoughlyEnoughItems-6b5aaeb240eb10d7d9d918955701637157152871.tar.bz2
RoughlyEnoughItems-6b5aaeb240eb10d7d9d918955701637157152871.zip
Fix REIClientPlugins on servers
Diffstat (limited to 'forge/src/main')
-rw-r--r--forge/src/main/java/me/shedaniel/rei/forge/RoughlyEnoughItemsForge.java7
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 a04a1a8c3..a63f50abe 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.getAnnotationType())) {
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.getMemberName(), throwable);
}
}