diff options
author | GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> | 2022-12-23 06:08:33 +0000 |
---|---|---|
committer | GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> | 2022-12-23 06:08:33 +0000 |
commit | ffdccadd464f19dc1f985ea17f7346be674a2c21 (patch) | |
tree | fea9240630556d43d8e706871e110db254972c83 | |
parent | 37da5aa8693ab075ec25b3703733c14d24068cdc (diff) | |
download | GT5-Unofficial-ffdccadd464f19dc1f985ea17f7346be674a2c21.tar.gz GT5-Unofficial-ffdccadd464f19dc1f985ea17f7346be674a2c21.tar.bz2 GT5-Unofficial-ffdccadd464f19dc1f985ea17f7346be674a2c21.zip |
IMC for NEI in TT
-rw-r--r-- | src/main/java/com/github/technus/tectech/TecTech.java | 2 | ||||
-rw-r--r-- | src/main/java/com/github/technus/tectech/nei/IMCForNEI.java | 46 |
2 files changed, 48 insertions, 0 deletions
diff --git a/src/main/java/com/github/technus/tectech/TecTech.java b/src/main/java/com/github/technus/tectech/TecTech.java index 6640949617..01c15a6b04 100644 --- a/src/main/java/com/github/technus/tectech/TecTech.java +++ b/src/main/java/com/github/technus/tectech/TecTech.java @@ -19,6 +19,7 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.commands.EMList import com.github.technus.tectech.mechanics.elementalMatter.core.definitions.registry.EMDefinitionsRegistry; import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.EMTransformationRegistry; import com.github.technus.tectech.mechanics.enderStorage.EnderWorldSavedData; +import com.github.technus.tectech.nei.IMCForNEI; import com.github.technus.tectech.proxy.CommonProxy; import com.github.technus.tectech.util.XSTR; import cpw.mods.fml.common.FMLCommonHandler; @@ -209,6 +210,7 @@ public class TecTech { MainLoader.load(definitionsRegistry); MainLoader.addAfterGregTechPostLoadRunner(); + IMCForNEI.IMCSender(); } @Mod.EventHandler diff --git a/src/main/java/com/github/technus/tectech/nei/IMCForNEI.java b/src/main/java/com/github/technus/tectech/nei/IMCForNEI.java new file mode 100644 index 0000000000..d01ecfc2d8 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/nei/IMCForNEI.java @@ -0,0 +1,46 @@ +package com.github.technus.tectech.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.eyeofharmony", "gregtech:gt.blockmachines:15410", 1); + sendCatalyst("gt.recipe.eyeofharmony", "gregtech:gt.blockmachines:15410"); + } + + private static void sendHandler(String aName, String aBlock, int aMaxRecipesPerPage) { + 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", aMaxRecipesPerPage); + aNBT.setInteger("yShift", 6); + FMLInterModComms.sendMessage("NotEnoughItems", "registerHandlerInfo", aNBT); + } + + private static void sendHandler(String aName, String aBlock) { + sendHandler(aName, aBlock, 2); + } + + 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); + } +} |