Search in sources :

Example 6 with ProcessingOutput

use of com.simibubi.create.content.contraptions.processing.ProcessingOutput in project Create by Creators-of-Create.

the class PolishingCategory method setRecipe.

@Override
public void setRecipe(IRecipeLayout recipeLayout, SandPaperPolishingRecipe recipe, IIngredients ingredients) {
    IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
    List<ProcessingOutput> results = recipe.getRollableResults();
    itemStacks.init(0, true, 26, 28);
    itemStacks.set(0, Arrays.asList(recipe.getIngredients().get(0).getItems()));
    itemStacks.init(1, false, 131, 28);
    itemStacks.set(1, results.get(0).getStack());
    addStochasticTooltip(itemStacks, results);
}
Also used : IGuiItemStackGroup(mezz.jei.api.gui.ingredient.IGuiItemStackGroup) ProcessingOutput(com.simibubi.create.content.contraptions.processing.ProcessingOutput)

Example 7 with ProcessingOutput

use of com.simibubi.create.content.contraptions.processing.ProcessingOutput in project Create by Creators-of-Create.

the class PressingCategory method setRecipe.

@Override
public void setRecipe(IRecipeLayout recipeLayout, PressingRecipe recipe, IIngredients ingredients) {
    IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
    itemStacks.init(0, true, 26, 50);
    itemStacks.set(0, Arrays.asList(recipe.getIngredients().get(0).getItems()));
    List<ProcessingOutput> results = recipe.getRollableResults();
    for (int outputIndex = 0; outputIndex < results.size(); outputIndex++) {
        itemStacks.init(outputIndex + 1, false, 131 + 19 * outputIndex, 50);
        itemStacks.set(outputIndex + 1, results.get(outputIndex).getStack());
    }
    addStochasticTooltip(itemStacks, results);
}
Also used : IGuiItemStackGroup(mezz.jei.api.gui.ingredient.IGuiItemStackGroup) ProcessingOutput(com.simibubi.create.content.contraptions.processing.ProcessingOutput)

Example 8 with ProcessingOutput

use of com.simibubi.create.content.contraptions.processing.ProcessingOutput in project Create by Creators-of-Create.

the class CrushingCategory method setRecipe.

@Override
public void setRecipe(IRecipeLayout recipeLayout, AbstractCrushingRecipe recipe, IIngredients ingredients) {
    IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
    itemStacks.init(0, true, 50, 2);
    itemStacks.set(0, Arrays.asList(recipe.getIngredients().get(0).getItems()));
    List<ProcessingOutput> results = recipe.getRollableResults();
    int size = results.size();
    int offset = -size * 19 / 2;
    for (int outputIndex = 0; outputIndex < size; outputIndex++) {
        itemStacks.init(outputIndex + 1, false, getBackground().getWidth() / 2 + offset + 19 * outputIndex, 78);
        itemStacks.set(outputIndex + 1, results.get(outputIndex).getStack());
    }
    addStochasticTooltip(itemStacks, results);
}
Also used : IGuiItemStackGroup(mezz.jei.api.gui.ingredient.IGuiItemStackGroup) ProcessingOutput(com.simibubi.create.content.contraptions.processing.ProcessingOutput)

Example 9 with ProcessingOutput

use of com.simibubi.create.content.contraptions.processing.ProcessingOutput in project Create by Creators-of-Create.

the class SawingCategory method setRecipe.

@Override
public void setRecipe(IRecipeLayout recipeLayout, CuttingRecipe recipe, IIngredients ingredients) {
    IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
    itemStacks.init(0, true, 43, 4);
    itemStacks.set(0, Arrays.asList(recipe.getIngredients().get(0).getItems()));
    List<ProcessingOutput> results = recipe.getRollableResults();
    for (int outputIndex = 0; outputIndex < results.size(); outputIndex++) {
        int xOffset = outputIndex % 2 == 0 ? 0 : 19;
        int yOffset = (outputIndex / 2) * -19;
        itemStacks.init(outputIndex + 1, false, 117 + xOffset, 47 + yOffset);
        itemStacks.set(outputIndex + 1, results.get(outputIndex).getStack());
    }
    addStochasticTooltip(itemStacks, results);
}
Also used : IGuiItemStackGroup(mezz.jei.api.gui.ingredient.IGuiItemStackGroup) ProcessingOutput(com.simibubi.create.content.contraptions.processing.ProcessingOutput)

Aggregations

ProcessingOutput (com.simibubi.create.content.contraptions.processing.ProcessingOutput)9 IGuiItemStackGroup (mezz.jei.api.gui.ingredient.IGuiItemStackGroup)6 ProcessingRecipe (com.simibubi.create.content.contraptions.processing.ProcessingRecipe)1 AllGuiTextures (com.simibubi.create.foundation.gui.AllGuiTextures)1