Search in sources :

Example 1 with IGuiFluidStackGroup

use of mezz.jei.api.gui.IGuiFluidStackGroup in project ImmersiveEngineering by BluSunrize.

the class MixerRecipeCategory method setRecipe.

@Override
public void setRecipe(IRecipeLayout recipeLayout, MixerRecipeWrapper recipeWrapper, IIngredients ingredients) {
    IGuiFluidStackGroup guiFluidStacks = recipeLayout.getFluidStacks();
    guiFluidStacks.init(0, true, 8, 3, 58, 47, 4000, false, null);
    guiFluidStacks.set(0, recipeWrapper.getFluidIn());
    guiFluidStacks.init(1, false, 100, 2, 16, 47, 4000, false, tankOverlay);
    guiFluidStacks.set(1, ingredients.getOutputs(FluidStack.class));
    guiFluidStacks.addTooltipCallback(JEIHelper.fluidTooltipCallback);
    IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
    for (int i = 0; i < recipeWrapper.recipeInputs.length; i++) {
        int x = -40 + (i % 2) * 18;
        int y = 0 + i / 2 * 18;
        guiItemStacks.init(i, true, x, y);
        guiItemStacks.set(i, recipeWrapper.recipeInputs[i]);
    }
}
Also used : FluidStack(net.minecraftforge.fluids.FluidStack) IGuiFluidStackGroup(mezz.jei.api.gui.IGuiFluidStackGroup) IGuiItemStackGroup(mezz.jei.api.gui.IGuiItemStackGroup)

Example 2 with IGuiFluidStackGroup

use of mezz.jei.api.gui.IGuiFluidStackGroup in project ImmersiveEngineering by BluSunrize.

the class RefineryRecipeCategory method setRecipe.

@Override
public void setRecipe(IRecipeLayout recipeLayout, RefineryRecipeWrapper recipeWrapper, IIngredients ingredients) {
    List<List<FluidStack>> inputs = ingredients.getInputs(FluidStack.class);
    IGuiFluidStackGroup guiFluidStacks = recipeLayout.getFluidStacks();
    if (inputs.size() > 0) {
        guiFluidStacks.init(0, true, 7, 10, 16, 47, 6000, false, tankOverlay);
        guiFluidStacks.set(0, inputs.get(0));
        if (inputs.size() > 1) {
            guiFluidStacks.init(1, true, 55, 10, 16, 47, 6000, false, tankOverlay);
            guiFluidStacks.set(1, inputs.get(1));
        }
    }
    guiFluidStacks.init(2, false, 103, 10, 16, 47, 6000, false, tankOverlay);
    guiFluidStacks.set(2, ingredients.getOutputs(FluidStack.class));
    guiFluidStacks.addTooltipCallback(JEIHelper.fluidTooltipCallback);
}
Also used : FluidStack(net.minecraftforge.fluids.FluidStack) IGuiFluidStackGroup(mezz.jei.api.gui.IGuiFluidStackGroup) List(java.util.List)

Example 3 with IGuiFluidStackGroup

use of mezz.jei.api.gui.IGuiFluidStackGroup in project ImmersiveEngineering by BluSunrize.

the class SqueezerRecipeCategory method setRecipe.

@Override
public void setRecipe(IRecipeLayout recipeLayout, SqueezerRecipeWrapper recipeWrapper, IIngredients ingredients) {
    IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
    guiItemStacks.init(0, true, 1, 22);
    guiItemStacks.init(1, false, 84, 40);
    guiItemStacks.set(0, ingredients.getInputs(ItemStack.class).get(0));
    guiItemStacks.set(1, ingredients.getOutputs(ItemStack.class));
    IGuiFluidStackGroup guiFluidStacks = recipeLayout.getFluidStacks();
    guiFluidStacks.init(0, false, 106, 9, 16, 47, 24000, false, tankOverlay);
    guiFluidStacks.set(0, ingredients.getOutputs(FluidStack.class));
    guiFluidStacks.addTooltipCallback(JEIHelper.fluidTooltipCallback);
}
Also used : FluidStack(net.minecraftforge.fluids.FluidStack) IGuiFluidStackGroup(mezz.jei.api.gui.IGuiFluidStackGroup) IGuiItemStackGroup(mezz.jei.api.gui.IGuiItemStackGroup) ItemStack(net.minecraft.item.ItemStack)

Example 4 with IGuiFluidStackGroup

use of mezz.jei.api.gui.IGuiFluidStackGroup in project ImmersiveEngineering by BluSunrize.

the class BottlingMachineRecipeCategory method setRecipe.

@Override
public void setRecipe(IRecipeLayout recipeLayout, BottlingMachineRecipeWrapper recipeWrapper, IIngredients ingredients) {
    IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
    guiItemStacks.init(0, true, 0, 12);
    guiItemStacks.init(1, false, 100, 12);
    guiItemStacks.set(0, ingredients.getInputs(ItemStack.class).get(0));
    guiItemStacks.set(1, ingredients.getOutputs(ItemStack.class));
    IGuiFluidStackGroup guiFluidStacks = recipeLayout.getFluidStacks();
    guiFluidStacks.init(0, true, 75, 0, 16, 47, 4000, false, tankOverlay);
    guiFluidStacks.set(0, ingredients.getInputs(FluidStack.class).get(0));
    guiFluidStacks.addTooltipCallback(JEIHelper.fluidTooltipCallback);
}
Also used : IGuiFluidStackGroup(mezz.jei.api.gui.IGuiFluidStackGroup) IGuiItemStackGroup(mezz.jei.api.gui.IGuiItemStackGroup) ItemStack(net.minecraft.item.ItemStack)

Example 5 with IGuiFluidStackGroup

use of mezz.jei.api.gui.IGuiFluidStackGroup in project ImmersiveEngineering by BluSunrize.

the class FermenterRecipeCategory method setRecipe.

@Override
public void setRecipe(IRecipeLayout recipeLayout, FermenterRecipeWrapper recipeWrapper, IIngredients ingredients) {
    IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
    guiItemStacks.init(0, true, 1, 6);
    guiItemStacks.init(1, false, 84, 40);
    guiItemStacks.set(0, ingredients.getInputs(ItemStack.class).get(0));
    guiItemStacks.set(1, ingredients.getOutputs(ItemStack.class));
    IGuiFluidStackGroup guiFluidStacks = recipeLayout.getFluidStacks();
    guiFluidStacks.init(0, false, 106, 9, 16, 47, 24000, false, tankOverlay);
    guiFluidStacks.set(0, ingredients.getOutputs(FluidStack.class));
    guiFluidStacks.addTooltipCallback(JEIHelper.fluidTooltipCallback);
}
Also used : FluidStack(net.minecraftforge.fluids.FluidStack) IGuiFluidStackGroup(mezz.jei.api.gui.IGuiFluidStackGroup) IGuiItemStackGroup(mezz.jei.api.gui.IGuiItemStackGroup) ItemStack(net.minecraft.item.ItemStack)

Aggregations

IGuiFluidStackGroup (mezz.jei.api.gui.IGuiFluidStackGroup)6 IGuiItemStackGroup (mezz.jei.api.gui.IGuiItemStackGroup)5 FluidStack (net.minecraftforge.fluids.FluidStack)5 ItemStack (net.minecraft.item.ItemStack)4 List (java.util.List)1