Java Code Examples for mezz.jei.api.gui.IRecipeLayout#getItemStacks()

The following examples show how to use mezz.jei.api.gui.IRecipeLayout#getItemStacks() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GTJeiMagicFuelCategory.java    From GT-Classic with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
public void setRecipe(IRecipeLayout layout, GTJeiMagicFuelWrapper wrapper, IIngredients ingredients) {
	IGuiItemStackGroup itemGroup = layout.getItemStacks();
	IGuiFluidStackGroup fluidGroup = layout.getFluidStacks();
	int index = 0;
	int actualIndex = 0;
	for (IRecipeInput list : wrapper.getMultiRecipe().getInputs()) {
		int x = index % 3;
		int y = index / 3;
		if (list instanceof RecipeInputFluid) {
			fluidGroup.init(actualIndex, true, (18 * x) + 1, (18 * y)
					+ 1, 16, 16, ((RecipeInputFluid) list).fluid.amount, true, null);
			fluidGroup.set(actualIndex, ((RecipeInputFluid) list).fluid);
		} else {
			itemGroup.init(actualIndex, true, (18 * x), (18 * y));
			itemGroup.set(actualIndex, list.getInputs());
		}
		index++;
		actualIndex++;
		if (index >= 6) {
			break;
		}
	}
}
 
Example 2
Source File: OreByProductCategory.java    From GregTech with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
public void setRecipe(IRecipeLayout recipeLayout, OreByProduct recipeWrapper, IIngredients ingredients) {
	IGuiItemStackGroup itemStackGroup = recipeLayout.getItemStacks();
	itemStackGroup.init(0, true,  22,  29); //Ore
	itemStackGroup.init(1, true,  70,  19); //Crushed
	itemStackGroup.init(2, true,  88,  19); //Crushed Prurified
	itemStackGroup.init(3, true, 106,  19); //Crushed Centfiguged
	itemStackGroup.init(4, true,  70,  37); //Dust Impure
	itemStackGroup.init(5, true,  88,  37); //Dust Purified
	itemStackGroup.init(6, true, 106,  37); //Dust
	
	for(int i = 0; i < recipeWrapper.getOutputCount();i++)
		itemStackGroup.init(i + 7, false, 70 + (i * 18), 59);
	
	itemStackGroup.addTooltipCallback(recipeWrapper::addTooltip);
	itemStackGroup.set(ingredients);
}
 
Example 3
Source File: CraftingRecipeCategory.java    From customstuff4 with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients)
{
    super.setRecipe(recipeLayout, recipeWrapper, ingredients);

    IGuiItemStackGroup stacks = recipeLayout.getItemStacks();

    List<List<ItemStack>> inputItems = ingredients.getInputs(ItemStack.class);
    List<List<ItemStack>> outputItems = ingredients.getOutputs(ItemStack.class);

    initItems(stacks, true, module.rows * module.columns, 0);
    initItems(stacks, false, 1, module.rows * module.columns);

    if (recipeWrapper instanceof IShapedCraftingRecipeWrapper)
    {
        IShapedCraftingRecipeWrapper wrapper = (IShapedCraftingRecipeWrapper) recipeWrapper;
        craftingGridHelper.setInputs(stacks, inputItems, wrapper.getWidth(), wrapper.getHeight());
    } else
    {
        craftingGridHelper.setInputs(stacks, inputItems);
        recipeLayout.setShapeless();
    }

    stacks.set(module.rows * module.columns, outputItems.get(0));
}
 
Example 4
Source File: FloadRecipeCategory.java    From YouTubeModdingTutorial with MIT License 5 votes vote down vote up
@Override
public void setRecipe(IRecipeLayout recipeLayout, FloadRecipeWrapper recipeWrapper, IIngredients ingredients) {
    IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
    IGuiFluidStackGroup guiFluidStacks = recipeLayout.getFluidStacks();

    guiFluidStacks.init(0, false, 65, 6, 18, 18, 100, true, null);
    guiItemStacks.init(0, true, 6, 6);

    List<ItemStack> inputs = ingredients.getInputs(VanillaTypes.ITEM).get(0);
    List<FluidStack> outputs = ingredients.getOutputs(VanillaTypes.FLUID).get(0);

    guiItemStacks.set(0, inputs);
    guiFluidStacks.set(0, outputs);
}
 
Example 5
Source File: HydroponicCategory.java    From EmergingTechnology with MIT License 5 votes vote down vote up
@Override
public void setRecipe(IRecipeLayout recipeLayout, HydroponicRecipeWrapper recipeWrapper, IIngredients ingredients)
{
    IGuiItemStackGroup guiStacks = recipeLayout.getItemStacks();

    guiStacks.init(INPUT_SLOT, true, 16, 34);
    guiStacks.init(OUTPUT_SLOT, false, 79, 34);

    guiStacks.set(ingredients);
}
 
Example 6
Source File: InjectorCategory.java    From EmergingTechnology with MIT License 5 votes vote down vote up
@Override
public void setRecipe(IRecipeLayout recipeLayout, InjectorRecipeWrapper recipeWrapper, IIngredients ingredients)
{
    IGuiItemStackGroup guiStacks = recipeLayout.getItemStacks();

    guiStacks.init(INPUT_SLOT, true, 16, 34);
    guiStacks.init(OUTPUT_SLOT, false, 79, 34);

    guiStacks.set(ingredients);
}
 
Example 7
Source File: ProcessorCategory.java    From EmergingTechnology with MIT License 5 votes vote down vote up
@Override
public void setRecipe(IRecipeLayout recipeLayout, ProcessorRecipeWrapper recipeWrapper, IIngredients ingredients)
{
    IGuiItemStackGroup guiStacks = recipeLayout.getItemStacks();

    guiStacks.init(INPUT_SLOT, true, 16, 34);
    guiStacks.init(OUTPUT_SLOT, false, 79, 34);

    guiStacks.set(ingredients);
}
 
Example 8
Source File: JEICrusherRecipeCategory.java    From BaseMetals with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper) {
	IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();

	int x = 45, y = 7;
	guiItemStacks.init(inputSlot, true, x, y);
	guiItemStacks.init(outputSlot, false, x+58, y);

	guiItemStacks.setFromRecipe(inputSlot, recipeWrapper.getInputs());
	guiItemStacks.setFromRecipe(outputSlot, recipeWrapper.getOutputs());
}
 
Example 9
Source File: BiomassCategory.java    From EmergingTechnology with MIT License 5 votes vote down vote up
@Override
public void setRecipe(IRecipeLayout recipeLayout, BiomassRecipeWrapper recipeWrapper, IIngredients ingredients)
{
    IGuiItemStackGroup guiStacks = recipeLayout.getItemStacks();

    guiStacks.init(INPUT_SLOT, true, 16, 34);
    guiStacks.init(OUTPUT_SLOT, false, 79, 34);

    guiStacks.set(ingredients);
}
 
Example 10
Source File: CollectorCategory.java    From EmergingTechnology with MIT License 5 votes vote down vote up
@Override
public void setRecipe(IRecipeLayout recipeLayout, CollectorRecipeWrapper recipeWrapper, IIngredients ingredients)
{
    IGuiItemStackGroup guiStacks = recipeLayout.getItemStacks();

    guiStacks.init(INPUT_SLOT, true, 16, 34);
    guiStacks.init(OUTPUT_SLOT, false, 77, 34);

    guiStacks.set(ingredients);
}
 
Example 11
Source File: PrimitiveBlastRecipeCategory.java    From GregTech with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void setRecipe(IRecipeLayout recipeLayout, PrimitiveBlastRecipeWrapper recipeWrapper,
		IIngredients ingredients) {
	IGuiItemStackGroup itemStackGroup = recipeLayout.getItemStacks();
	itemStackGroup.init(0, true, 32, 4);
	itemStackGroup.init(1, true, 32, 22);

	itemStackGroup.init(2, false, 84, 13);
	itemStackGroup.init(3, false, 102, 13);
	itemStackGroup.set(ingredients);
}
 
Example 12
Source File: FabricatorCategory.java    From EmergingTechnology with MIT License 5 votes vote down vote up
@Override
public void setRecipe(IRecipeLayout recipeLayout, FabricatorRecipeWrapper recipeWrapper, IIngredients ingredients)
{
    IGuiItemStackGroup guiStacks = recipeLayout.getItemStacks();

    guiStacks.init(INPUT_SLOT, true, 16, 34);
    guiStacks.init(OUTPUT_SLOT, false, 79, 34);

    guiStacks.set(ingredients);
}
 
Example 13
Source File: CokeOvenRecipeCategory.java    From GregTech with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void setRecipe(IRecipeLayout recipeLayout, CokeOvenRecipeWrapper recipeWrapper, IIngredients ingredients) {
	IGuiItemStackGroup itemStackGroup = recipeLayout.getItemStacks();
	IGuiFluidStackGroup fluidStackGroup = recipeLayout.getFluidStacks();
	itemStackGroup.init(0, true, 32, 19);
	itemStackGroup.init(1, false, 84, 19);
	itemStackGroup.set(ingredients);
	fluidStackGroup.init(0, false, 133, 3, 20, 58, 32000, true, this.fluidTankOverlay);
	fluidStackGroup.set(ingredients);
}
 
Example 14
Source File: ShredderCategory.java    From EmergingTechnology with MIT License 5 votes vote down vote up
@Override
public void setRecipe(IRecipeLayout recipeLayout, ShredderRecipeWrapper recipeWrapper, IIngredients ingredients)
{
    IGuiItemStackGroup guiStacks = recipeLayout.getItemStacks();

    guiStacks.init(INPUT_SLOT, true, 16, 34);
    guiStacks.init(OUTPUT_SLOT, false, 79, 34);

    guiStacks.set(ingredients);
}
 
Example 15
Source File: CategoryMortar.java    From Sakura_mod with MIT License 5 votes vote down vote up
@Override
public void setRecipe(IRecipeLayout arg0, IRecipeWrapper arg1, IIngredients arg2) {
	IGuiItemStackGroup items = arg0.getItemStacks();
	
	items.init(0, true, 1, 1);
	items.init(1, true, 19, 1);
	items.init(2, true, 1, 19);
	items.init(3, true, 19, 19);
	items.init(4, false, 69, 12);
	items.init(5, false, 93, 12);
    
	items.set(arg2);
}
 
Example 16
Source File: CategoryDistillation.java    From Sakura_mod with MIT License 5 votes vote down vote up
@Override
public void setRecipe(IRecipeLayout arg0, IRecipeWrapper arg1, IIngredients arg2) {
	IGuiItemStackGroup items = arg0.getItemStacks();
    items.init(0,true, 29, 13);
    items.init(1,true, 29, 31);
    items.init(2,true, 29, 49);
	items.set(arg2);
	IGuiFluidStackGroup fiuld = arg0.getFluidStacks();
	fiuld.init(0, true, 6, 6, 16, 68, arg2.getInputs(VanillaTypes.FLUID).get(0).get(0).amount, false, null);
	fiuld.set(0, arg2.getInputs(VanillaTypes.FLUID).get(0));
	fiuld.init(1, false, 77, 6, 16, 68, arg2.getOutputs(VanillaTypes.FLUID).get(0).get(0).amount, false, null);
	fiuld.set(1, arg2.getOutputs(VanillaTypes.FLUID).get(0));
}
 
Example 17
Source File: CustomRecipeCategory.java    From YouTubeModdingTutorial with MIT License 5 votes vote down vote up
@Override
public void setRecipe(IRecipeLayout recipeLayout, CustomRecipeWrapper recipeWrapper, IIngredients ingredients) {
    IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();

    guiItemStacks.init(0, true, 6, 6);
    guiItemStacks.init(3, false, 114, 6);

    List<ItemStack> inputs = ingredients.getInputs(VanillaTypes.ITEM).get(0);
    List<ItemStack> outputs = ingredients.getOutputs(VanillaTypes.ITEM).get(0);

    guiItemStacks.set(0, inputs);
    guiItemStacks.set(3, outputs);
}
 
Example 18
Source File: CategoryAggregator.java    From TofuCraftReload with MIT License 5 votes vote down vote up
@Override
public void setRecipe(IRecipeLayout arg0, IRecipeWrapper arg1, IIngredients arg2) {
	IGuiItemStackGroup items = arg0.getItemStacks();
	
	items.init(0, true, 4, 4);
	items.init(1, false, 74, 4);
    
	items.set(arg2);
}
 
Example 19
Source File: CategoryCrusher.java    From TofuCraftReload with MIT License 5 votes vote down vote up
@Override
public void setRecipe(IRecipeLayout arg0, IRecipeWrapper arg1, IIngredients arg2) {
	IGuiItemStackGroup items = arg0.getItemStacks();
	
	items.init(0, true, 4, 4);
	items.init(1, false, 74, 4);
    
	items.set(arg2);
}