Search in sources :

Example 1 with GrindstoneRecipe

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

the class GrindingRecipeMaker method getGrindstoneRecipes.

public static List<GrindstoneRecipeWrapper> getGrindstoneRecipes(IJeiHelpers helpers, boolean hand) {
    IStackHelper stackHelper = helpers.getStackHelper();
    Collection<GrindstoneRecipe> grindingRecipes = hand ? HPRecipes.instance().getHandGrindstoneRecipes() : HPRecipes.instance().getGrindstoneRecipes();
    List<GrindstoneRecipeWrapper> recipes = new ArrayList<>();
    for (GrindstoneRecipe recipe : grindingRecipes) {
        ItemStack input = recipe.getInput();
        ItemStack output = recipe.getOutput();
        ItemStack secondary = recipe.getSecondary();
        List<ItemStack> inputs = stackHelper.getSubtypes(input);
        GrindstoneRecipeWrapper grindstoneRecipeWrapper = new GrindstoneRecipeWrapper(inputs, output, secondary, recipe.getSecondaryChance(), recipe.getTime());
        recipes.add(grindstoneRecipeWrapper);
    }
    return recipes;
}
Also used : ArrayList(java.util.ArrayList) GrindstoneRecipe(se.gory_moon.horsepower.recipes.GrindstoneRecipe) 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 GrindstoneRecipe (se.gory_moon.horsepower.recipes.GrindstoneRecipe)1