mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 12:19:48 +00:00
restore NEI integration
This commit is contained in:
1 parent
12c4a94823
commit
7528d0819e
12 files changed
+36
-71
No files matched your search
@@ -1,25 +0,0 @@
|
||||
package tconstruct.plugins;
|
||||
|
||||
/**
|
||||
* Interface for TiC compat plugins.
|
||||
*
|
||||
* Do not include mod API usage directly in this file except for IMC! This must
|
||||
* be constructable even when the target mod isn't available due to Java not
|
||||
* allowing static abstracts.
|
||||
*/
|
||||
public interface ICompatPlugin
|
||||
{
|
||||
|
||||
// Mod ID the plugin handles
|
||||
public abstract String getModId ();
|
||||
|
||||
// Called during TCon PreInit
|
||||
public abstract void preInit ();
|
||||
|
||||
// Called during TCon Init
|
||||
public abstract void init ();
|
||||
|
||||
// Called during TCon PostInit
|
||||
public abstract void postInit ();
|
||||
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import tconstruct.plugins.imc.AppEng;
|
||||
import tconstruct.plugins.imc.BuildcraftTransport;
|
||||
import tconstruct.plugins.imc.Mystcraft;
|
||||
import tconstruct.plugins.imc.Thaumcraft;
|
||||
import tconstruct.plugins.nei.NotEnoughItems;
|
||||
|
||||
public class PluginController
|
||||
{
|
||||
@@ -24,6 +25,8 @@ public class PluginController
|
||||
moduleLoader.registerModule(ForgeMultiPart.class);
|
||||
moduleLoader.registerModule(IC2.class);
|
||||
moduleLoader.registerModule(Thaumcraft.class);
|
||||
}
|
||||
moduleLoader.registerModule(NotEnoughItems.class);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,7 +6,6 @@ import mantle.module.ILoadableModule;
|
||||
import net.minecraft.block.Block;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.plugins.ICompatPlugin;
|
||||
|
||||
public class ForgeMultiPart implements ILoadableModule
|
||||
{
|
||||
|
||||
@@ -9,7 +9,6 @@ import net.minecraftforge.fluids.FluidStack;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.crafting.LiquidCasting;
|
||||
import tconstruct.plugins.ICompatPlugin;
|
||||
|
||||
public class IC2 implements ILoadableModule
|
||||
{
|
||||
|
||||
@@ -5,7 +5,6 @@ import java.util.List;
|
||||
|
||||
import mantle.module.ILoadableModule;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.plugins.ICompatPlugin;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
public class AppEng implements ILoadableModule
|
||||
|
||||
@@ -5,7 +5,6 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.plugins.ICompatPlugin;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
public class BuildcraftTransport implements ILoadableModule
|
||||
|
||||
@@ -3,7 +3,6 @@ package tconstruct.plugins.imc;
|
||||
import mantle.module.ILoadableModule;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.plugins.ICompatPlugin;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
public class Mystcraft implements ILoadableModule
|
||||
|
||||
@@ -4,7 +4,6 @@ import mantle.module.ILoadableModule;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.plugins.ICompatPlugin;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
public class Thaumcraft implements ILoadableModule
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package tconstruct.plugins.nei;
|
||||
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.recipe.DefaultOverlayHandler;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import mantle.module.ILoadableModule;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.client.gui.CraftingStationGui;
|
||||
|
||||
public class NotEnoughItems implements ILoadableModule
|
||||
{
|
||||
@SuppressWarnings("unused")
|
||||
public static String modId = "NotEnoughItems";
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
TConstruct.logger.info("NotEnoughItems detected. Registering TConstruct NEI plugin.");
|
||||
registerNEICompat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit() {
|
||||
// Nothing
|
||||
}
|
||||
public static void registerNEICompat ()
|
||||
{
|
||||
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
|
||||
{
|
||||
API.registerGuiOverlay(CraftingStationGui.class, "crafting");
|
||||
API.registerGuiOverlayHandler(CraftingStationGui.class, new DefaultOverlayHandler(), "crafting");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user