Search in sources :

Example 1 with IStationRecipe

use of net.mcft.copy.betterstorage.api.crafting.IStationRecipe in project BetterStorage by copygirl.

the class MTCraftingStation method addShapeless.

@ZenMethod
public static void addShapeless(IItemStack[] output, IIngredient[] input, @Optional int experience, @Optional int craftingTime) {
    ItemStack[] recipeOutput = MTHelper.toStacks(output);
    IStationRecipe recipe = new MTShapelessStationRecipe(input, recipeOutput, experience, craftingTime);
    MineTweakerAPI.apply(new UndoableRecipeAddAction(recipe, recipeOutput));
}
Also used : IItemStack(minetweaker.api.item.IItemStack) ItemStack(net.minecraft.item.ItemStack) IStationRecipe(net.mcft.copy.betterstorage.api.crafting.IStationRecipe) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 2 with IStationRecipe

use of net.mcft.copy.betterstorage.api.crafting.IStationRecipe in project BetterStorage by copygirl.

the class MTCraftingStation method addShaped.

private static void addShaped(IItemStack[] output, IIngredient[][] input, int experience, int craftingTime, boolean mirrored) {
    ItemStack[] recipeOutput = MTHelper.toStacks(output);
    IStationRecipe recipe = new MTShapedStationRecipe(input, recipeOutput, experience, craftingTime, mirrored);
    MineTweakerAPI.apply(new UndoableRecipeAddAction(recipe, recipeOutput));
}
Also used : IItemStack(minetweaker.api.item.IItemStack) ItemStack(net.minecraft.item.ItemStack) IStationRecipe(net.mcft.copy.betterstorage.api.crafting.IStationRecipe)

Example 3 with IStationRecipe

use of net.mcft.copy.betterstorage.api.crafting.IStationRecipe in project BetterStorage by copygirl.

the class NEIRecipeHandler method getRecipes.

public List<CachedStationRecipe> getRecipes() {
    if (cachedRecipes == null) {
        cachedRecipes = new ArrayList<CachedStationRecipe>();
        for (IStationRecipe recipe : BetterStorageCrafting.recipes) {
            List<IRecipeInput[]> sampleInput = recipe.getSampleInputs();
            if (sampleInput == null)
                continue;
            cachedRecipes.add(new CachedStationRecipe(recipe));
        }
    }
    return cachedRecipes;
}
Also used : IStationRecipe(net.mcft.copy.betterstorage.api.crafting.IStationRecipe)

Aggregations

IStationRecipe (net.mcft.copy.betterstorage.api.crafting.IStationRecipe)3 IItemStack (minetweaker.api.item.IItemStack)2 ItemStack (net.minecraft.item.ItemStack)2 ZenMethod (stanhebben.zenscript.annotations.ZenMethod)1