From 91be949dcfcb8e551eedf25ffad7cd6fe535c920 Mon Sep 17 00:00:00 2001 From: miozune Date: Sun, 24 Apr 2022 18:24:44 +0900 Subject: Add NEI catalysts (#120) Former-commit-id: 697cd3b647c9ce88acba144773196dfd301f7237 --- .../github/bartimaeusnek/bartworks/MainMod.java | 2 ++ .../bartworks/neiHandler/IMCForNEI.java | 23 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/IMCForNEI.java (limited to 'src/main') diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java index 1f8ed0487c..f0b1be2d03 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java @@ -32,6 +32,7 @@ import com.github.bartimaeusnek.bartworks.client.textures.PrefixTextureLinker; import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler; import com.github.bartimaeusnek.bartworks.common.loaders.*; import com.github.bartimaeusnek.bartworks.common.net.BW_Network; +import com.github.bartimaeusnek.bartworks.neiHandler.IMCForNEI; import com.github.bartimaeusnek.bartworks.server.EventHandler.ServerEventHandler; import com.github.bartimaeusnek.bartworks.system.material.CircuitGeneration.CircuitImprintLoader; import com.github.bartimaeusnek.bartworks.system.material.CircuitGeneration.CircuitPartLoader; @@ -153,6 +154,7 @@ public final class MainMod { } ItemRegistry.run(); RecipeLoader.run(); + IMCForNEI.IMCSender(); } @Mod.EventHandler diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/IMCForNEI.java b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/IMCForNEI.java new file mode 100644 index 0000000000..8622f18462 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/IMCForNEI.java @@ -0,0 +1,23 @@ +package com.github.bartimaeusnek.bartworks.neiHandler; + +import cpw.mods.fml.common.event.FMLInterModComms; +import net.minecraft.nbt.NBTTagCompound; + +public class IMCForNEI { + public static void IMCSender() { + sendCatalyst("gt.recipe.largechemicalreactor", "gregtech:gt.blockmachines:13366", -10); + sendCatalyst("gt.recipe.craker", "gregtech:gt.blockmachines:13367", -10); + } + + 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); + } +} -- cgit