Search in sources :

Example 1 with GrinderRecipe

use of techreborn.api.recipe.machines.GrinderRecipe in project TechReborn by TechReborn.

the class CTGrinder method addRecipe.

@ZenMethod
public static void addRecipe(IItemStack output, IIngredient input1, int ticktime, int euTick) {
    Object oInput1 = CraftTweakerCompat.toObject(input1);
    GrinderRecipe r = new GrinderRecipe(oInput1, CraftTweakerCompat.toStack(output), ticktime, euTick);
    addRecipe(r);
}
Also used : GrinderRecipe(techreborn.api.recipe.machines.GrinderRecipe) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 2 with GrinderRecipe

use of techreborn.api.recipe.machines.GrinderRecipe in project TechReborn by TechReborn.

the class ModRecipes method postInit.

public static void postInit() {
    if (ConfigTechReborn.disableRailcraftSteelNuggetRecipe) {
        Iterator<Entry<ItemStack, ItemStack>> iterator = FurnaceRecipes.instance().getSmeltingList().entrySet().iterator();
        Map.Entry<ItemStack, ItemStack> entry;
        while (iterator.hasNext()) {
            entry = iterator.next();
            if (entry.getValue() instanceof ItemStack && entry.getKey() instanceof ItemStack) {
                ItemStack input = (ItemStack) entry.getKey();
                ItemStack output = (ItemStack) entry.getValue();
                if (ItemUtils.isInputEqual("nuggetSteel", output, true, true, false) && ItemUtils.isInputEqual("nuggetIron", input, true, true, false)) {
                    Core.logHelper.info("Removing a steelnugget smelting recipe");
                    iterator.remove();
                }
            }
        }
    }
    IndustrialSawmillRecipes.init();
    // Let it be in postInit to be sure that oredict already there
    if (OreUtil.doesOreExistAndValid("stoneMarble")) {
        ItemStack marbleStack = getOre("stoneMarble");
        marbleStack.setCount(1);
        RecipeHandler.addRecipe(new GrinderRecipe(marbleStack, ItemDusts.getDustByName("marble"), 120, 10));
    }
    if (OreUtil.doesOreExistAndValid("stoneBasalt")) {
        ItemStack marbleStack = getOre("stoneBasalt");
        marbleStack.setCount(1);
        RecipeHandler.addRecipe(new GrinderRecipe(marbleStack, ItemDusts.getDustByName("basalt"), 120, 10));
    }
}
Also used : Entry(java.util.Map.Entry) ItemStack(net.minecraft.item.ItemStack) Map(java.util.Map) GrinderRecipe(techreborn.api.recipe.machines.GrinderRecipe)

Aggregations

GrinderRecipe (techreborn.api.recipe.machines.GrinderRecipe)2 Map (java.util.Map)1 Entry (java.util.Map.Entry)1 ItemStack (net.minecraft.item.ItemStack)1 ZenMethod (stanhebben.zenscript.annotations.ZenMethod)1