aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/goodgenerator/crossmod/nei/IMCForNEI.java
blob: c1fae90a88b69d309b03ba061cf6c4dc36b1dc03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package goodgenerator.crossmod.nei;

import cpw.mods.fml.common.event.FMLInterModComms;
import goodgenerator.crossmod.LoadedList;
import net.minecraft.nbt.NBTTagCompound;

public class IMCForNEI {
    public static void IMCSender() {
        sendHandler("goodgenerator.crossmod.nei.NeutronActivatorHandler", "gregtech:gt.blockmachines:32013");
        sendCatalyst("gg.recipe.neutron_activator", "gregtech:gt.blockmachines:32013");

        sendHandler("goodgenerator.crossmod.nei.ExtremeHeatExchangerHandler", "gregtech:gt.blockmachines:32017");
        sendCatalyst("gg.recipe.extreme_heat_exchanger", "gregtech:gt.blockmachines:32017");

        sendHandler("goodgenerator.crossmod.nei.PreciseAssemblerHandler", "gregtech:gt.blockmachines:32018");
        sendCatalyst("gg.recipe.precise_assembler", "gregtech:gt.blockmachines:32018");
        sendCatalyst("gt.recipe.assembler", "gregtech:gt.blockmachines:32018");

        sendCatalyst("gt.recipe.fusionreactor", "gregtech:gt.blockmachines:32019", -10);
        sendCatalyst("gt.recipe.fusionreactor", "gregtech:gt.blockmachines:32020", -10);
        sendCatalyst("gt.recipe.fusionreactor", "gregtech:gt.blockmachines:32021", -10);
        if (LoadedList.GTPP) {
            sendCatalyst("gt.recipe.fusionreactor", "gregtech:gt.blockmachines:32022", -10);
        }
//        sendCatalyst("gt.recipe.fusionreactor", "gregtech:gt.blockmachines:32023", -10); // Compact Fusion MK-V

        sendCatalyst("gt.recipe.complexfusionreactor", "gregtech:gt.blockmachines:32019", -10);
        sendCatalyst("gt.recipe.complexfusionreactor", "gregtech:gt.blockmachines:32020", -10);
        sendCatalyst("gt.recipe.complexfusionreactor", "gregtech:gt.blockmachines:32021", -10);
        if (LoadedList.GTPP) {
            sendCatalyst("gt.recipe.complexfusionreactor", "gregtech:gt.blockmachines:32022", -10);
        }
//        sendCatalyst("gt.recipe.complexfusionreactor", "gregtech:gt.blockmachines:32023", -10); // Compact Fusion MK-V
    }

    private static void sendHandler(String aName, String aBlock) {
        NBTTagCompound aNBT = new NBTTagCompound();
        aNBT.setString("handler", aName);
        aNBT.setString("modName", "Good Generator");
        aNBT.setString("modId", "GoodGenerator");
        aNBT.setBoolean("modRequired", true);
        aNBT.setString("itemName", aBlock);
        aNBT.setInteger("handlerHeight", 135);
        aNBT.setInteger("handlerWidth", 166);
        aNBT.setInteger("maxRecipesPerPage", 1);
        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);
    }
}