From 6099b959bc1601023ee9dfb639dff2e1bf2a48ec Mon Sep 17 00:00:00 2001 From: shedaniel Date: Thu, 5 Nov 2020 21:19:33 +0800 Subject: Fix #431 Signed-off-by: shedaniel --- .../me/shedaniel/rei/RoughlyEnoughItemsState.java | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'RoughlyEnoughItems-runtime/src/main/java') diff --git a/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsState.java b/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsState.java index 398ea52ca..15430e858 100644 --- a/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsState.java +++ b/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsState.java @@ -58,14 +58,20 @@ public class RoughlyEnoughItemsState { } public static void checkRequiredFabricModules() { - ImmutableSet requiredModules = ImmutableSet.builder() - .add("fabric-api-base") - .add("fabric-resource-loader-v0") - .add("fabric-networking-v0") - .add("fabric-lifecycle-events-v1") - .add("fabric-lifecycle-events-v1") - .add("fabric-rendering-fluids-v1") - .build(); + ImmutableSet requiredModules = FabricLoader.getInstance().getEnvironmentType() == EnvType.CLIENT ? + ImmutableSet.builder() + .add("fabric-api-base") + .add("fabric-resource-loader-v0") + .add("fabric-networking-v0") + .add("fabric-lifecycle-events-v1") + .add("fabric-rendering-fluids-v1") + .build() : + ImmutableSet.builder() + .add("fabric-api-base") + .add("fabric-resource-loader-v0") + .add("fabric-networking-v0") + .add("fabric-lifecycle-events-v1") + .build(); for (String module : requiredModules) { boolean moduleLoaded = FabricLoader.getInstance().isModLoaded(module); if (!moduleLoaded) { -- cgit