Java Code Examples for mezz.jei.api.ingredients.IIngredients#setOutput()

The following examples show how to use mezz.jei.api.ingredients.IIngredients#setOutput() . 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: FluidRecipeJEI.java    From Wizardry with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
public void getIngredients(@Nonnull IIngredients ingredients) {
	List<List<ItemStack>> stacks = Lists.newArrayList();
	stacks.add(Lists.newArrayList(builder.getMainInput().getMatchingStacks()));
	for (Ingredient ingredient : builder.getInputs())
		stacks.add(Lists.newArrayList(ingredient.getMatchingStacks()));

	if (!isFluidOutput())
		for (List<ItemStack> stackList : stacks)
			stackList.removeIf(Ingredient.fromStacks(builder.getOutput())::apply);

	ingredients.setInputLists(ItemStack.class, stacks);
	ingredients.setInput(FluidStack.class, new FluidStack(builder.getFluid(), 1000));

	if (isFluidOutput())
		ingredients.setOutput(FluidStack.class, builder.getFluidOutput());
	else
		ingredients.setOutput(ItemStack.class, builder.getOutput());
}
 
Example 2
Source File: ShapedRecipeWrapper.java    From customstuff4 with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients)
{
    IStackHelper stackHelper = jeiHelpers.getStackHelper();
    ItemStack recipeOutput = recipe.getRecipeOutput();

    try
    {
        List<List<ItemStack>> inputs = stackHelper.expandRecipeItemStackInputs(recipe.getIngredients());
        ingredients.setInputLists(ItemStack.class, inputs);
        ingredients.setOutput(ItemStack.class, recipeOutput);
    } catch (RuntimeException e)
    {
        e.printStackTrace();
    }
}
 
Example 3
Source File: FireRecipeJEI.java    From Wizardry with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void getIngredients(@Nonnull IIngredients ingredients) {
	List<ItemStack> stacks = Lists.newArrayList();
	stacks.addAll(Arrays.asList(input.getMatchingStacks()));
	List<List<ItemStack>> lists = Lists.newArrayList();
	lists.add(stacks);
	stacks.removeIf(Ingredient.fromStacks(recipe.getOutput())::apply);

	ingredients.setInputLists(ItemStack.class, lists);

	ingredients.setOutput(ItemStack.class, recipe.getOutput());
}
 
Example 4
Source File: FluidTransformRecipe.java    From ExNihiloAdscensio with MIT License 5 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients)
{
    ingredients.setInputs(ItemStack.class, inputStacks);
    ingredients.setInput(FluidStack.class, inputFluid);
    
    ingredients.setOutput(ItemStack.class, outputBucket);
    ingredients.setOutput(FluidStack.class, outputFluid);
}
 
Example 5
Source File: MutationRecipeWrapper.java    From AgriCraft with MIT License 5 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients) {
    // Add Inputs
    ingredients.setInputLists(ItemStack.class, input);

    // Add Outputs
    ingredients.setOutput(ItemStack.class, output);
}
 
Example 6
Source File: FluidOnTopRecipe.java    From ExNihiloAdscensio with MIT License 5 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients)
{
    ingredients.setInputs(ItemStack.class, getInputs());
    ingredients.setInputs(FluidStack.class, getFluidInputs());
    
    ingredients.setOutput(ItemStack.class, outputStack);
}
 
Example 7
Source File: CompostRecipe.java    From ExNihiloAdscensio with MIT License 4 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients)
{
    ingredients.setInputs(ItemStack.class, inputs);
    ingredients.setOutput(ItemStack.class, output);
}
 
Example 8
Source File: SimpleRecipe.java    From TofuCraftReload with MIT License 4 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients) {
	ingredients.setInputLists(VanillaTypes.ITEM, inputs);
	ingredients.setOutput(VanillaTypes.ITEM, output);
}
 
Example 9
Source File: CustomRecipeWrapper.java    From YouTubeModdingTutorial with MIT License 4 votes vote down vote up
@Override
public void getIngredients(@Nonnull IIngredients ingredients) {
    ingredients.setOutput(VanillaTypes.ITEM, output);
    ingredients.setInputLists(VanillaTypes.ITEM, inputs);
}
 
Example 10
Source File: MultiblockInfoRecipeWrapper.java    From GregTech with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients) {
    ingredients.setInputs(ItemStack.class, allItemStackInputs);
    ingredients.setOutput(ItemStack.class, controllerStack);
}
 
Example 11
Source File: HydroponicRecipeWrapper.java    From EmergingTechnology with MIT License 4 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients)
{
    ingredients.setInput(VanillaTypes.ITEM, input);
    ingredients.setOutput(VanillaTypes.ITEM, output);
}
 
Example 12
Source File: ShredderRecipeWrapper.java    From EmergingTechnology with MIT License 4 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients)
{
    ingredients.setInput(VanillaTypes.ITEM, input);
    ingredients.setOutput(VanillaTypes.ITEM, output);
}
 
Example 13
Source File: AlgaeBioreactorRecipeWrapper.java    From EmergingTechnology with MIT License 4 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients)
{
    ingredients.setInput(VanillaTypes.ITEM, input);
    ingredients.setOutput(VanillaTypes.ITEM, output);
}
 
Example 14
Source File: CookerRecipeWrapper.java    From EmergingTechnology with MIT License 4 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients)
{
    ingredients.setInput(VanillaTypes.ITEM, input);
    ingredients.setOutput(VanillaTypes.ITEM, output);
}
 
Example 15
Source File: InjectorRecipeWrapper.java    From EmergingTechnology with MIT License 4 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients)
{
    ingredients.setInput(VanillaTypes.ITEM, input);
    ingredients.setOutput(VanillaTypes.ITEM, output);
}
 
Example 16
Source File: LightRecipeWrapper.java    From EmergingTechnology with MIT License 4 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients)
{
    ingredients.setInput(VanillaTypes.ITEM, input);
    ingredients.setOutput(VanillaTypes.ITEM, output);
}
 
Example 17
Source File: BiomassRecipeWrapper.java    From EmergingTechnology with MIT License 4 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients)
{
    ingredients.setInput(VanillaTypes.ITEM, input);
    ingredients.setOutput(VanillaTypes.ITEM, output);
}
 
Example 18
Source File: FabricatorRecipeWrapper.java    From EmergingTechnology with MIT License 4 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients)
{
    ingredients.setInput(VanillaTypes.ITEM, input);
    ingredients.setOutput(VanillaTypes.ITEM, output);
}
 
Example 19
Source File: ScrubberRecipeWrapper.java    From EmergingTechnology with MIT License 4 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients)
{
    ingredients.setInput(VanillaTypes.ITEM, input);
    ingredients.setOutput(VanillaTypes.ITEM, output);
}
 
Example 20
Source File: ItemFluidRecipe.java    From Sakura_mod with MIT License 4 votes vote down vote up
public void getIngredients(IIngredients ingredients){
  ingredients.setInputLists(VanillaTypes.ITEM, this.inputs);
  ingredients.setInputLists(VanillaTypes.FLUID, this.fluid);
  ingredients.setOutput(VanillaTypes.ITEM, this.output);
}