Moved NEI Check to constructor.

This commit is contained in:
AlgorithmX2 2014-04-06 03:20:30 -05:00
parent 0036e050ca
commit 14f93f66f6

View file

@ -11,11 +11,15 @@ public class NEI implements IIntegrationModule
public static NEI instance; public static NEI instance;
Class API;
public NEI() throws ClassNotFoundException {
API = Class.forName( "codechicken.nei.api.API" );
}
@Override @Override
public void Init() throws Throwable public void Init() throws Throwable
{ {
Class API = Class.forName( "codechicken.nei.api.API" );
Method registerRecipeHandler = API.getDeclaredMethod( "registerRecipeHandler", new Class[] { codechicken.nei.recipe.ICraftingHandler.class } ); Method registerRecipeHandler = API.getDeclaredMethod( "registerRecipeHandler", new Class[] { codechicken.nei.recipe.ICraftingHandler.class } );
Method registerUsageHandler = API.getDeclaredMethod( "registerUsageHandler", new Class[] { codechicken.nei.recipe.IUsageHandler.class } ); Method registerUsageHandler = API.getDeclaredMethod( "registerUsageHandler", new Class[] { codechicken.nei.recipe.IUsageHandler.class } );