Search in sources :

Example 1 with IGuiItemStackGroup

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

the class WorkbenchRecipeCategory method setRecipe.

@Override
public void setRecipe(IRecipeLayout recipeLayout, WorkbenchRecipeWrapper recipeWrapper, IIngredients ingredients) {
    IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
    guiItemStacks.init(0, true, 24, 16);
    guiItemStacks.set(0, Lists.newArrayList(ItemEngineersBlueprint.getTypedBlueprint(recipeWrapper.blueprintCategory)));
    for (int i = 0; i < recipeWrapper.recipeInputs.length; i++) {
        guiItemStacks.init(1 + i, true, 80 + i % 2 * 18, 20 + i / 2 * 18);
        guiItemStacks.set(1 + i, recipeWrapper.recipeInputs[i]);
    }
    guiItemStacks.init(1 + recipeWrapper.recipeInputs.length, false, 140, 24);
    guiItemStacks.set(1 + recipeWrapper.recipeInputs.length, recipeWrapper.recipeOutputs[0]);
}
Also used : IGuiItemStackGroup(mezz.jei.api.gui.IGuiItemStackGroup) ItemEngineersBlueprint(blusunrize.immersiveengineering.common.items.ItemEngineersBlueprint)

Example 2 with IGuiItemStackGroup

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

the class MetalPressRecipeCategory method setRecipe.

@Override
public void setRecipe(IRecipeLayout recipeLayout, MetalPressRecipeWrapper recipeWrapper, IIngredients ingredients) {
    IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
    guiItemStacks.init(0, true, 20, 3);
    guiItemStacks.init(1, true, 71, 0);
    guiItemStacks.init(2, false, 102, 3);
    guiItemStacks.set(0, recipeWrapper.recipeInputs[0]);
    guiItemStacks.set(1, recipeWrapper.recipeInputs[1]);
    guiItemStacks.set(2, ingredients.getOutputs(ItemStack.class));
}
Also used : IGuiItemStackGroup(mezz.jei.api.gui.IGuiItemStackGroup) ItemStack(net.minecraft.item.ItemStack)

Example 3 with IGuiItemStackGroup

use of mezz.jei.api.gui.IGuiItemStackGroup 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 4 with IGuiItemStackGroup

use of mezz.jei.api.gui.IGuiItemStackGroup 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 5 with IGuiItemStackGroup

use of mezz.jei.api.gui.IGuiItemStackGroup 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)

Aggregations

IGuiItemStackGroup (mezz.jei.api.gui.IGuiItemStackGroup)13 ItemStack (net.minecraft.item.ItemStack)7 IGuiFluidStackGroup (mezz.jei.api.gui.IGuiFluidStackGroup)5 FluidStack (net.minecraftforge.fluids.FluidStack)4 ItemEngineersBlueprint (blusunrize.immersiveengineering.common.items.ItemEngineersBlueprint)1 List (java.util.List)1