Skip to content

Commit

Permalink
Fix server-sided issue
Browse files Browse the repository at this point in the history
  • Loading branch information
serenibyss committed Dec 28, 2021
1 parent 5cc3e75 commit 4b00326
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/gregtech/GregTechMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public void postInit(FMLPostInitializationEvent event) {

@Mod.EventHandler
public void loadComplete(FMLLoadCompleteEvent event) {
proxy.onLoadComplete();
proxy.onLoadComplete(event);
}

@Mod.EventHandler
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/gregtech/common/CommonProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
import net.minecraftforge.fml.common.event.FMLLoadCompleteEvent;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.registries.IForgeRegistry;

import java.lang.reflect.InvocationTargetException;
Expand Down Expand Up @@ -291,8 +293,9 @@ public void onPostLoad() {
TerminalRegistry.init();
}

public void onLoadComplete() {
if(GTValues.isModLoaded(GTValues.MODID_JEI))
public void onLoadComplete(FMLLoadCompleteEvent event) {
if(GTValues.isModLoaded(GTValues.MODID_JEI) && event.getSide() == Side.CLIENT) {
GTJeiPlugin.setupInputHandler();
}
}
}

0 comments on commit 4b00326

Please sign in to comment.