Search in sources :

Example 1 with ChoppingBlockRecipe

use of se.gory_moon.horsepower.recipes.ChoppingBlockRecipe in project HorsePower by GoryMoon.

the class ChoppingRecipeMaker method getChoppingRecipes.

public static List<ChoppingRecipeWrapper> getChoppingRecipes(IJeiHelpers helpers, boolean hand) {
    IStackHelper stackHelper = helpers.getStackHelper();
    Collection<ChoppingBlockRecipe> grindingRecipes = hand ? HPRecipes.instance().getManualChoppingRecipes() : HPRecipes.instance().getChoppingRecipes();
    List<ChoppingRecipeWrapper> recipes = new ArrayList<>();
    for (ChoppingBlockRecipe recipe : grindingRecipes) {
        ItemStack input = recipe.getInput();
        ItemStack output = recipe.getOutput();
        List<ItemStack> inputs = stackHelper.getSubtypes(input);
        ChoppingRecipeWrapper grindstoneRecipeWrapper = new ChoppingRecipeWrapper(inputs, output, recipe.getTime(), hand);
        recipes.add(grindstoneRecipeWrapper);
    }
    return recipes;
}
Also used : ArrayList(java.util.ArrayList) ChoppingBlockRecipe(se.gory_moon.horsepower.recipes.ChoppingBlockRecipe) IStackHelper(mezz.jei.api.recipe.IStackHelper) ItemStack(net.minecraft.item.ItemStack)

Aggregations

ArrayList (java.util.ArrayList)1 IStackHelper (mezz.jei.api.recipe.IStackHelper)1 ItemStack (net.minecraft.item.ItemStack)1 ChoppingBlockRecipe (se.gory_moon.horsepower.recipes.ChoppingBlockRecipe)1