Skip to content

Commit

Permalink
Fix Server-Side Crash
Browse files Browse the repository at this point in the history
  • Loading branch information
IntegerLimit committed Jul 14, 2024
1 parent fb88611 commit 273601c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
3 changes: 2 additions & 1 deletion src/main/java/com/nomiceu/nomilabs/NomiLabs.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ public void preInit(FMLPreInitializationEvent event) {

@EventHandler
public void postInit(FMLPostInitializationEvent event) {
CommonProxy.postInit();
if (LabsSide.isClient())
ClientProxy.postInit();
}

@EventHandler
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/com/nomiceu/nomilabs/event/ClientProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@ public static void latePreInit() {
LabsTierHelper.preInit();
}

public static void postInit() {
// Load EnderIO Keybinds, Make Sure Loaded Before Groovy Keybind Overrides
if (Loader.isModLoaded(LabsValues.ENDER_IO_MODID)) {
try {
Class.forName("crazypants.enderio.base.handler.KeyTracker");
} catch (ClassNotFoundException e) {
NomiLabs.LOGGER.error(
"Failed to load EnderIO's KeyTracker Class! Overrides for Ender IO Keybindings may not be available!");
}
}
}

@SubscribeEvent
public static void registerModels(ModelRegistryEvent event) {
LabsItems.registerModels();
Expand Down
13 changes: 0 additions & 13 deletions src/main/java/com/nomiceu/nomilabs/event/CommonProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.cleanroommc.groovyscript.event.GsHandEvent;
import com.cleanroommc.groovyscript.event.ScriptRunEvent;
import com.nomiceu.nomilabs.LabsValues;
import com.nomiceu.nomilabs.NomiLabs;
import com.nomiceu.nomilabs.block.registry.LabsBlocks;
import com.nomiceu.nomilabs.config.LabsConfig;
import com.nomiceu.nomilabs.creativetab.registry.LabsCreativeTabs;
Expand Down Expand Up @@ -102,18 +101,6 @@ public static void preInit() {
LabsDimensions.register();
}

public static void postInit() {
// Load EnderIO Keybinds, Make Sure Loaded Before Groovy Keybind Overrides
if (Loader.isModLoaded(LabsValues.ENDER_IO_MODID)) {
try {
Class.forName("crazypants.enderio.base.handler.KeyTracker");
} catch (ClassNotFoundException e) {
NomiLabs.LOGGER.error(
"Failed to load EnderIO's KeyTracker Class! Overrides for Ender IO Keybindings may not be available!");
}
}
}

public static void loadComplete() {
FluidRegistryMixinHelper.loadComplete();

Expand Down

0 comments on commit 273601c

Please sign in to comment.