aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/goodgenerator/crossmod/nei/IMCForNEI.java
blob: 8035e6db8cf1526a31d1aaa2557e45f3cb6f8329 (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
62
63
64
65
66
67
68
69
70
71
72
package goodgenerator.crossmod.nei;

import net.minecraft.nbt.NBTTagCompound;

import cpw.mods.fml.common.event.FMLInterModComms;
import goodgenerator.crossmod.LoadedList;

public class IMCForNEI {

    public static void IMCSender() {
        sendHandler("gg.recipe.neutron_activator", "gregtech:gt.blockmachines:32013");
        sendCatalyst("gg.recipe.neutron_activator", "gregtech:gt.blockmachines:32013");

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

        sendHandler("gg.recipe.precise_assembler", "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

        sendHandler("gg.recipe.componentassemblyline", "gregtech:gt.blockmachines:32026", 2);
        sendCatalyst("gg.recipe.componentassemblyline", "gregtech:gt.blockmachines:32026");
    }

    private static void sendHandler(String aName, String aBlock) {
        sendHandler(aName, aBlock, 1);
    }

    private static void sendHandler(String aName, String aBlock, int maxRecipesPerPage) {
        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", maxRecipesPerPage);
        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);
    }
}