use of mezz.jei.api.recipe.IStackHelper in project Gaspunk by Ladysnake.
the class GrenadeRecipeWrapper method getIngredients.
@Override
public void getIngredients(@Nonnull IIngredients ingredients) {
ItemStack recipeOutput = recipe.getRecipeOutput();
IStackHelper stackHelper = jeiHelpers.getStackHelper();
List<List<ItemStack>> inputLists = stackHelper.expandRecipeItemStackInputs(recipe.getIngredients());
ingredients.setInputLists(ItemStack.class, inputLists);
ingredients.setOutput(ItemStack.class, recipeOutput);
}
use of mezz.jei.api.recipe.IStackHelper in project HorsePower by GoryMoon.
the class PressRecipeMaker method getPressRecipes.
public static List<PressRecipeWrapper> getPressRecipes(IJeiHelpers helpers) {
IStackHelper stackHelper = helpers.getStackHelper();
Collection<PressRecipe> grindingRecipes = HPRecipes.instance().getPressRecipes();
List<PressRecipeWrapper> recipes = new ArrayList<>();
for (PressRecipe recipe : grindingRecipes) {
ItemStack input = recipe.getInput();
ItemStack output = recipe.getOutput();
List<ItemStack> inputs = stackHelper.getSubtypes(input);
PressRecipeWrapper pressRecipeWrapper = new PressRecipeWrapper(inputs, output);
recipes.add(pressRecipeWrapper);
}
return recipes;
}
use of mezz.jei.api.recipe.IStackHelper in project Binnie by ForestryMC.
the class PolymeriserRecipeMaker method create.
public static List<PolymeriserRecipeWrapper> create() {
List<PolymeriserRecipeWrapper> recipes = new ArrayList<>();
List<ItemStack> inputs = Arrays.asList(new ItemStack(Genetics.items().itemSequencer, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Genetics.items().itemSerum, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Genetics.items().itemSerumArray, 1, OreDictionary.WILDCARD_VALUE));
IStackHelper stackHelper = GeneticsJeiPlugin.jeiHelpers.getStackHelper();
for (ItemStack input : inputs) {
List<ItemStack> subtypes = stackHelper.toItemStackList(input);
for (ItemStack subtype : subtypes) {
subtype = subtype.copy();
subtype.setItemDamage(subtype.getMaxDamage());
recipes.add(new PolymeriserRecipeWrapper(subtype));
}
}
return recipes;
}
use of mezz.jei.api.recipe.IStackHelper in project Pearcel-Mod by MiningMark48.
the class GeneratorFuelRecipeMaker method getFuelRecipes.
public static List<GeneratorFuelRecipe> getFuelRecipes(IJeiHelpers helpers) {
IGuiHelper guiHelper = helpers.getGuiHelper();
IStackHelper stackHelper = helpers.getStackHelper();
List<ItemStack> fuelStacks = GeneratorRegistry.getFuels();
List<GeneratorFuelRecipe> fuelRecipes = new ArrayList<GeneratorFuelRecipe>(fuelStacks.size());
for (ItemStack fuelStack : fuelStacks) {
if (fuelStack == null) {
continue;
}
List<ItemStack> fuels = stackHelper.getSubtypes(fuelStack);
if (fuels.isEmpty()) {
continue;
}
int cooldownTime = getBurnTime(fuels.get(0));
int rfPerTick = getRFPerTick(fuels.get(0));
fuelRecipes.add(new GeneratorFuelRecipe(guiHelper, fuels, cooldownTime, rfPerTick));
}
return fuelRecipes;
}
use of mezz.jei.api.recipe.IStackHelper in project HorsePower by GoryMoon.
the class ShapedChoppingCraftingWrapper method getIngredients.
@Override
public void getIngredients(IIngredients ingredients) {
IStackHelper stackHelper = HorsePowerPlugin.jeiHelpers.getStackHelper();
List<List<ItemStack>> inputs = stackHelper.expandRecipeItemStackInputs(recipe.getIngredients());
ingredients.setInputLists(ItemStack.class, inputs);
if (!outputs.isEmpty())
ingredients.setOutputLists(ItemStack.class, outputs);
}
Aggregations