diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/gregtech/GT_Mod.java | 2 | ||||
-rw-r--r-- | src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java | 28 | ||||
-rw-r--r-- | src/main/java/gregtech/nei/IMCForNEI.java | 47 |
3 files changed, 49 insertions, 28 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 165ec23297..4aebc96c03 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -39,6 +39,7 @@ import gregtech.loaders.misc.GT_Bees; import gregtech.loaders.misc.GT_CoverLoader; import gregtech.loaders.postload.*; import gregtech.loaders.preload.*; +import gregtech.nei.IMCForNEI; import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeOutput; import net.minecraft.entity.player.EntityPlayer; @@ -269,6 +270,7 @@ public class GT_Mod implements IGT_Mod { } Waila.init(); Harvestcraft.init(); + IMCForNEI.IMCSender(); GregTech_API.sLoadFinished = true; GT_Log.out.println("GT_Mod: Load-Phase finished!"); GT_Log.ore.println("GT_Mod: Load-Phase finished!"); diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java index e6a07842bc..dc65e9b2ef 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java @@ -794,34 +794,6 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { GT_OreDictUnificator.set(OrePrefixes.dust, Materials.Cocoa, GT_ModHandler.getModItem("harvestcraft", "cocoapowderItem", 1L, 0)); GT_OreDictUnificator.set(OrePrefixes.dust, Materials.Coffee, ItemList.IC2_CoffeePowder.get(1L, new Object[0])); - { - NBTTagCompound aNBT = new NBTTagCompound(); - aNBT.setString("handler","gt.recipe.plasmaforge"); - aNBT.setString("modName","GregTech"); - aNBT.setString("modId","gregtech"); - aNBT.setBoolean("modRequired",true); - aNBT.setString("itemName","gregtech:gt.blockmachines:1004"); - aNBT.setInteger("handlerHeight",135); - aNBT.setInteger("handlerWidth",166); - aNBT.setInteger("maxRecipesPerPage",2); - aNBT.setInteger("yShift",6); - FMLInterModComms.sendMessage("NotEnoughItems","registerHandlerInfo",aNBT); - } - - { - NBTTagCompound aNBT = new NBTTagCompound(); - aNBT.setString("handler","gt.recipe.complexfusionreactor"); - aNBT.setString("modName","GregTech"); - aNBT.setString("modId","gregtech"); - aNBT.setBoolean("modRequired",true); - aNBT.setString("itemName","gregtech:gt.blockmachines:1193"); - aNBT.setInteger("handlerHeight",135); - aNBT.setInteger("handlerWidth",166); - aNBT.setInteger("maxRecipesPerPage",2); - aNBT.setInteger("yShift",6); - FMLInterModComms.sendMessage("NotEnoughItems","registerHandlerInfo",aNBT); - } - //TODO ADD LATER @Technus why it crash if enable? //FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(Materials.Naquadah.getMolten(1000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Naquadah, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L))); diff --git a/src/main/java/gregtech/nei/IMCForNEI.java b/src/main/java/gregtech/nei/IMCForNEI.java new file mode 100644 index 0000000000..93b4cd5f1c --- /dev/null +++ b/src/main/java/gregtech/nei/IMCForNEI.java @@ -0,0 +1,47 @@ +package gregtech.nei; + +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.event.FMLInterModComms; +import net.minecraft.nbt.NBTTagCompound; + +public class IMCForNEI { + public static void IMCSender() { + if (!Loader.isModLoaded("NotEnoughItems")) { + return; + } + + sendHandler("gt.recipe.plasmaforge", "gregtech:gt.blockmachines:1004"); + sendCatalyst("gt.recipe.plasmaforge", "gregtech:gt.blockmachines:1004"); + + sendHandler("gt.recipe.complexfusionreactor", "gregtech:gt.blockmachines:1193"); + sendCatalyst("gt.recipe.complexfusionreactor", "gregtech:gt.blockmachines:1193"); + sendCatalyst("gt.recipe.complexfusionreactor", "gregtech:gt.blockmachines:1194"); + sendCatalyst("gt.recipe.complexfusionreactor", "gregtech:gt.blockmachines:1195"); + } + + private static void sendHandler(String aName, String aBlock) { + NBTTagCompound aNBT = new NBTTagCompound(); + aNBT.setString("handler", aName); + aNBT.setString("modName", "GregTech"); + aNBT.setString("modId", "gregtech"); + aNBT.setBoolean("modRequired", true); + aNBT.setString("itemName", aBlock); + aNBT.setInteger("handlerHeight", 135); + aNBT.setInteger("handlerWidth", 166); + aNBT.setInteger("maxRecipesPerPage", 2); + aNBT.setInteger("yShift", 6); + FMLInterModComms.sendMessage("NotEnoughItems", "registerHandlerInfo", aNBT); + } + + private static void sendCatalyst(String aName, String aStack, int aPriority) { + NBTTagCompound aNBT = new NBTTagCompound(); + aNBT.setString("handlerID", aName); + aNBT.setString("itemName", aStack); + aNBT.setInteger("priority", aPriority); + FMLInterModComms.sendMessage("NotEnoughItems", "registerCatalystInfo", aNBT); + } + + private static void sendCatalyst(String aName, String aStack) { + sendCatalyst(aName, aStack, 0); + } +} |