aboutsummaryrefslogtreecommitdiff
path: root/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2021-02-15 00:33:10 +0800
committershedaniel <daniel@shedaniel.me>2021-02-15 00:33:10 +0800
commit5e5c328320112794905a96aecdc1bc2656398603 (patch)
treedf7c8c9a30bda2fca1d26a7fed12f1b34d15379d /RoughlyEnoughItems-runtime/src/main/java/me/shedaniel
parent785df44a28e0ba91dba4dce89e68a036c6587567 (diff)
downloadRoughlyEnoughItems-5e5c328320112794905a96aecdc1bc2656398603.tar.gz
RoughlyEnoughItems-5e5c328320112794905a96aecdc1bc2656398603.tar.bz2
RoughlyEnoughItems-5e5c328320112794905a96aecdc1bc2656398603.zip
Fix filters not applying to modded entries
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'RoughlyEnoughItems-runtime/src/main/java/me/shedaniel')
-rw-r--r--RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsInitializer.java21
1 files changed, 11 insertions, 10 deletions
diff --git a/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsInitializer.java b/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsInitializer.java
index a7c3832ed..e8f62a527 100644
--- a/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsInitializer.java
+++ b/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsInitializer.java
@@ -33,7 +33,7 @@ import net.fabricmc.loader.api.VersionParsingException;
import java.lang.reflect.InvocationTargetException;
-public class RoughlyEnoughItemsInitializer implements ModInitializer {
+public class RoughlyEnoughItemsInitializer implements ModInitializer, ClientModInitializer {
@Override
public void onInitialize() {
checkRequiredFabricModules();
@@ -44,17 +44,18 @@ public class RoughlyEnoughItemsInitializer implements ModInitializer {
if (RoughlyEnoughItemsState.getErrors().isEmpty()) {
initializeEntryPoint("me.shedaniel.rei.RoughlyEnoughItemsNetwork");
-
- if (FabricLoader.getInstance().getEnvironmentType() == EnvType.CLIENT) {
- initializeEntryPoint("me.shedaniel.rei.RoughlyEnoughItemsCore");
- initializeEntryPoint("me.shedaniel.rei.impl.ClientHelperImpl");
- initializeEntryPoint("me.shedaniel.rei.impl.ScreenHelper");
- }
}
-
- if (FabricLoader.getInstance().getEnvironmentType() == EnvType.CLIENT) {
- initializeEntryPoint("me.shedaniel.rei.impl.ErrorDisplayer");
+ }
+
+ @Override
+ public void onInitializeClient() {
+ if (RoughlyEnoughItemsState.getErrors().isEmpty()) {
+ initializeEntryPoint("me.shedaniel.rei.RoughlyEnoughItemsCore");
+ initializeEntryPoint("me.shedaniel.rei.impl.ClientHelperImpl");
+ initializeEntryPoint("me.shedaniel.rei.impl.ScreenHelper");
}
+
+ initializeEntryPoint("me.shedaniel.rei.impl.ErrorDisplayer");
}
public void initializeEntryPoint(String className) {