diff options
author | miozune <miozune@gmail.com> | 2022-07-02 21:49:42 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-02 14:49:42 +0200 |
commit | e39396aa0eb0daf46ab0a684b083ec2f95f0b121 (patch) | |
tree | 0968329557b3d4d34ba3533f800b2363a70fbf7a /src/main/java/gregtech/nei | |
parent | 27fd1fb43a545b300680625a4a49f35bbf559f0d (diff) | |
download | GT5-Unofficial-e39396aa0eb0daf46ab0a684b083ec2f95f0b121.tar.gz GT5-Unofficial-e39396aa0eb0daf46ab0a684b083ec2f95f0b121.tar.bz2 GT5-Unofficial-e39396aa0eb0daf46ab0a684b083ec2f95f0b121.zip |
Add IMC for NEI RecipeCatalyst (#1109)
Diffstat (limited to 'src/main/java/gregtech/nei')
-rw-r--r-- | src/main/java/gregtech/nei/IMCForNEI.java | 47 |
1 files changed, 47 insertions, 0 deletions
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); + } +} |