2014-04-04 07:17:20 +02:00
|
|
|
package appeng.integration.modules;
|
2014-02-15 07:40:02 +01:00
|
|
|
|
|
|
|
import java.lang.reflect.Method;
|
|
|
|
|
|
|
|
import appeng.integration.IIntegrationModule;
|
2014-04-04 07:17:20 +02:00
|
|
|
import appeng.integration.modules.helpers.NEIAEShapedRecipeHandler;
|
|
|
|
import appeng.integration.modules.helpers.NEIAEShapelessRecipeHandler;
|
2014-02-15 07:40:02 +01:00
|
|
|
|
|
|
|
public class NEI implements IIntegrationModule
|
|
|
|
{
|
|
|
|
|
|
|
|
public static NEI instance;
|
|
|
|
|
2014-04-06 10:20:30 +02:00
|
|
|
Class API;
|
|
|
|
|
|
|
|
public NEI() throws ClassNotFoundException {
|
|
|
|
API = Class.forName( "codechicken.nei.api.API" );
|
|
|
|
}
|
|
|
|
|
2014-02-15 07:40:02 +01:00
|
|
|
@Override
|
|
|
|
public void Init() throws Throwable
|
|
|
|
{
|
|
|
|
Method registerRecipeHandler = API.getDeclaredMethod( "registerRecipeHandler", new Class[] { codechicken.nei.recipe.ICraftingHandler.class } );
|
|
|
|
Method registerUsageHandler = API.getDeclaredMethod( "registerUsageHandler", new Class[] { codechicken.nei.recipe.IUsageHandler.class } );
|
|
|
|
|
2014-04-04 07:17:20 +02:00
|
|
|
registerRecipeHandler.invoke( API, new NEIAEShapedRecipeHandler() );
|
|
|
|
registerUsageHandler.invoke( API, new NEIAEShapedRecipeHandler() );
|
|
|
|
|
|
|
|
registerRecipeHandler.invoke( API, new NEIAEShapelessRecipeHandler() );
|
|
|
|
registerUsageHandler.invoke( API, new NEIAEShapelessRecipeHandler() );
|
2014-02-15 07:40:02 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Method registerGuiOverlay = API.getDeclaredMethod( "registerGuiOverlay", new Class[] { Class.class,
|
|
|
|
* String.class, int.class, int.class } ); Class IOverlayHandler = Class.forName(
|
|
|
|
* "codechicken.nei.api.IOverlayHandler" ); Class DefaultOverlayHandler =
|
|
|
|
* NEICraftingTerminalOverlayHandler.class; Method registerGuiOverlayHandler = API.getDeclaredMethod(
|
|
|
|
* "registerGuiOverlayHandler", new Class[] { Class.class, IOverlayHandler, String.class } );
|
|
|
|
* registerGuiOverlay.invoke( API, GuiCraftingTerminal.class, "crafting", 6, 75 ); Constructor
|
|
|
|
* DefaultOverlayHandlerConstructor = DefaultOverlayHandler .getConstructor( new Class[] { int.class, int.class
|
|
|
|
* } ); registerGuiOverlayHandler.invoke( API, GuiCraftingTerminal.class,
|
|
|
|
* DefaultOverlayHandlerConstructor.newInstance( 6, 75 ), "crafting" );
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void PostInit() throws Throwable
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|