Search in sources :

Example 1 with MetalPressRecipe

use of blusunrize.immersiveengineering.api.crafting.MetalPressRecipe in project ImmersiveEngineering by BluSunrize.

the class MetalPress method addRecipe.

@ZenMethod
public static void addRecipe(IItemStack output, IIngredient input, IItemStack mold, int energy, @Optional int inputSize) {
    Object oInput = CraftTweakerHelper.toObject(input);
    if (oInput == null)
        return;
    ItemStack sOut = CraftTweakerHelper.toStack(output);
    ItemStack sMold = CraftTweakerHelper.toStack(mold);
    if (sOut != null && sMold != null) {
        MetalPressRecipe r = new MetalPressRecipe(sOut, oInput, sMold, energy);
        if (inputSize > 0)
            r.setInputSize(inputSize);
        MineTweakerAPI.apply(new Add(r));
    }
}
Also used : MetalPressRecipe(blusunrize.immersiveengineering.api.crafting.MetalPressRecipe) ComparableItemStack(blusunrize.immersiveengineering.api.ComparableItemStack) IItemStack(minetweaker.api.item.IItemStack) ItemStack(net.minecraft.item.ItemStack) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Aggregations

ComparableItemStack (blusunrize.immersiveengineering.api.ComparableItemStack)1 MetalPressRecipe (blusunrize.immersiveengineering.api.crafting.MetalPressRecipe)1 IItemStack (minetweaker.api.item.IItemStack)1 ItemStack (net.minecraft.item.ItemStack)1 ZenMethod (stanhebben.zenscript.annotations.ZenMethod)1