Search in sources :

Example 1 with IGuiFluidStackGroup

use of mezz.jei.api.gui.ingredient.IGuiFluidStackGroup in project TinkersConstruct by SlimeKnights.

the class AbstractCastingCategory method setRecipe.

@Override
public void setRecipe(IRecipeLayout recipeLayout, IDisplayableCastingRecipe recipe, IIngredients ingredients) {
    IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
    guiItemStacks.init(INPUT_SLOT, true, 37, 18);
    guiItemStacks.init(OUTPUT_SLOT, false, 92, 17);
    guiItemStacks.set(ingredients);
    IGuiFluidStackGroup fluidStacks = recipeLayout.getFluidStacks();
    fluidStacks.addTooltipCallback(this);
    int capacity = FluidValues.METAL_BLOCK;
    fluidStacks.init(0, true, 3, 3, 32, 32, capacity, false, tankOverlay);
    fluidStacks.set(ingredients);
    int h = 11;
    if (!recipe.hasCast()) {
        h += 16;
    }
    fluidStacks.init(1, true, 43, 8, 6, h, 1, false, null);
    fluidStacks.set(1, recipe.getFluids());
}
Also used : IGuiFluidStackGroup(mezz.jei.api.gui.ingredient.IGuiFluidStackGroup) IGuiItemStackGroup(mezz.jei.api.gui.ingredient.IGuiItemStackGroup)

Example 2 with IGuiFluidStackGroup

use of mezz.jei.api.gui.ingredient.IGuiFluidStackGroup in project Mekanism by mekanism.

the class FluidToFluidRecipeCategory method setRecipe.

@Override
public void setRecipe(IRecipeLayout recipeLayout, FluidToFluidRecipe recipe, IIngredients ingredients) {
    IGuiFluidStackGroup fluidStacks = recipeLayout.getFluidStacks();
    initFluid(fluidStacks, 0, true, input, recipe.getInput().getRepresentations());
    initFluid(fluidStacks, 1, false, output, recipe.getOutputDefinition());
}
Also used : IGuiFluidStackGroup(mezz.jei.api.gui.ingredient.IGuiFluidStackGroup)

Example 3 with IGuiFluidStackGroup

use of mezz.jei.api.gui.ingredient.IGuiFluidStackGroup in project MCMOD-Industria by M-Marvin.

the class RecipeCategoryBlastFurnace method setRecipe.

@Override
public void setRecipe(IRecipeLayout recipeLayout, BlastFurnaceRecipe recipe, IIngredients ingredients) {
    IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
    IGuiFluidStackGroup fluidStacks = recipeLayout.getFluidStacks();
    itemStacks.init(0, true, 57, 2);
    itemStacks.init(1, true, 57, 22);
    itemStacks.init(2, true, 57, 42);
    itemStacks.init(3, false, 134, 2);
    itemStacks.init(4, false, 134, 22);
    fluidStacks.init(0, true, 18, 3, 16, 56, 3000, true, null);
    if (recipe.getItemsIn().length >= 1)
        itemStacks.set(0, recipe.getItemsIn()[0]);
    if (recipe.getItemsIn().length >= 2)
        itemStacks.set(1, recipe.getItemsIn()[1]);
    if (recipe.getItemsIn().length >= 3)
        itemStacks.set(2, recipe.getItemsIn()[2]);
    fluidStacks.set(0, recipe.getConsumtionFluid());
    itemStacks.set(3, recipe.getResultItem());
    itemStacks.set(4, recipe.getWasteOut());
    this.progressArrow = helper.createAnimatedDrawable(arrow, recipe.getSmeltingTime(), StartDirection.LEFT, false);
}
Also used : IGuiFluidStackGroup(mezz.jei.api.gui.ingredient.IGuiFluidStackGroup) IGuiItemStackGroup(mezz.jei.api.gui.ingredient.IGuiItemStackGroup)

Example 4 with IGuiFluidStackGroup

use of mezz.jei.api.gui.ingredient.IGuiFluidStackGroup in project MCMOD-Industria by M-Marvin.

the class RecipeCategoryBlender method setRecipe.

@Override
public void setRecipe(IRecipeLayout recipeLayout, BlendingRecipe recipe, IIngredients ingredients) {
    IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
    IGuiFluidStackGroup fluidStacks = recipeLayout.getFluidStacks();
    itemStacks.init(0, true, 40, 2);
    itemStacks.init(1, true, 40, 22);
    itemStacks.init(2, true, 40, 42);
    fluidStacks.init(0, true, 3, 3, 16, 56, 3000, true, null);
    fluidStacks.init(1, true, 22, 3, 16, 56, 3000, true, null);
    fluidStacks.init(2, false, 147, 3, 16, 56, 3000, true, null);
    if (recipe.getItemsIn().length >= 1)
        itemStacks.set(0, recipe.getItemsIn()[0]);
    if (recipe.getItemsIn().length >= 2)
        itemStacks.set(1, recipe.getItemsIn()[1]);
    if (recipe.getItemsIn().length >= 3)
        itemStacks.set(2, recipe.getItemsIn()[2]);
    if (recipe.getFluidsIn().length >= 1)
        fluidStacks.set(0, recipe.getFluidsIn()[0]);
    if (recipe.getFluidsIn().length >= 2)
        fluidStacks.set(1, recipe.getFluidsIn()[1]);
    fluidStacks.set(2, recipe.getFluidOut());
    this.progressArrow = helper.createAnimatedDrawable(arrow, recipe.getMixingTime(), StartDirection.LEFT, false);
}
Also used : IGuiFluidStackGroup(mezz.jei.api.gui.ingredient.IGuiFluidStackGroup) IGuiItemStackGroup(mezz.jei.api.gui.ingredient.IGuiItemStackGroup)

Example 5 with IGuiFluidStackGroup

use of mezz.jei.api.gui.ingredient.IGuiFluidStackGroup in project MCMOD-Industria by M-Marvin.

the class RecipeCategoryFluidBath method setRecipe.

@Override
public void setRecipe(IRecipeLayout recipeLayout, FluidBathRecipe recipe, IIngredients ingredients) {
    IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
    IGuiFluidStackGroup fluidStacks = recipeLayout.getFluidStacks();
    itemStacks.init(0, true, 29, 2);
    itemStacks.init(1, false, 119, 2);
    fluidStacks.init(0, true, 3, 3, 16, 56, 3000, true, null);
    fluidStacks.init(1, false, 147, 3, 16, 56, 3000, true, null);
    if (!recipe.getItemIn().isEmpty())
        itemStacks.set(0, recipe.getItemIn());
    if (!recipe.getResultItem().isEmpty())
        itemStacks.set(1, recipe.getResultItem());
    fluidStacks.set(0, recipe.getFluidIn());
    if (!recipe.getFluidOut().isEmpty())
        fluidStacks.set(1, recipe.getFluidOut());
    this.progressArrow = helper.createAnimatedDrawable(arrow, recipe.getProcessTime(), StartDirection.LEFT, false);
}
Also used : IGuiFluidStackGroup(mezz.jei.api.gui.ingredient.IGuiFluidStackGroup) IGuiItemStackGroup(mezz.jei.api.gui.ingredient.IGuiItemStackGroup)

Aggregations

IGuiFluidStackGroup (mezz.jei.api.gui.ingredient.IGuiFluidStackGroup)48 IGuiItemStackGroup (mezz.jei.api.gui.ingredient.IGuiItemStackGroup)34 List (java.util.List)14 ItemStack (net.minecraft.world.item.ItemStack)7 ItemStack (net.minecraft.item.ItemStack)6 FluidStack (net.minecraftforge.fluids.FluidStack)6 EntityIngredient (com.teamresourceful.resourcefulbees.compat.jei.ingredients.EntityIngredient)4 FluidIngredient (com.simibubi.create.foundation.fluid.FluidIngredient)3 PoseStack (com.mojang.blaze3d.vertex.PoseStack)2 ArrayList (java.util.ArrayList)2 IRecipeLayout (mezz.jei.api.gui.IRecipeLayout)2 IIngredients (mezz.jei.api.ingredients.IIngredients)2 Ingredient (net.minecraft.world.item.crafting.Ingredient)2 OreRateType (slimeknights.tconstruct.library.recipe.melting.IMeltingContainer.OreRateType)2 CABlocks (com.mrh0.createaddition.index.CABlocks)1 CrudeBurningRecipe (com.mrh0.createaddition.recipe.crude_burning.CrudeBurningRecipe)1 SequencedAssemblySubCategory (com.simibubi.create.compat.jei.category.sequencedAssembly.SequencedAssemblySubCategory)1 HeatCondition (com.simibubi.create.content.contraptions.processing.HeatCondition)1 AllGuiTextures (com.simibubi.create.foundation.gui.AllGuiTextures)1 Pair (com.simibubi.create.foundation.utility.Pair)1