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

The following examples show how to use mezz.jei.api.ingredients.IIngredients#setOutputs() . 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: GTJeiMultiRecipeWrapper.java    From GT-Classic with GNU Lesser General Public License v3.0 6 votes vote down vote up
@SuppressWarnings("deprecation")
@Override
public void getIngredients(IIngredients ingredients) {
	ArrayList<FluidStack> inputFluids = new ArrayList<>();
	ArrayList<ItemStack> inputItems = new ArrayList<>();
	for (IRecipeInput input : multiRecipe.getInputs()) {
		if (input instanceof RecipeInputFluid) {
			inputFluids.add(((RecipeInputFluid) input).fluid);
		} else {
			inputItems.addAll(input.getInputs());
		}
	}
	if (!inputFluids.isEmpty()) {
		ingredients.setInputs(FluidStack.class, inputFluids);
	}
	ingredients.setInputs(ItemStack.class, inputItems);
	MachineOutput output = multiRecipe.getOutputs();
	if (output instanceof GTFluidMachineOutput) {
		ingredients.setOutputs(FluidStack.class, ((GTFluidMachineOutput) output).getFluids());
	}
	ingredients.setOutputs(ItemStack.class, multiRecipe.getOutputs().getAllOutputs());
}
 
Example 2
Source File: GTJeiUUAmplifierWrapper.java    From GT-Classic with GNU Lesser General Public License v3.0 6 votes vote down vote up
@SuppressWarnings("deprecation")
@Override
public void getIngredients(IIngredients ingredients) {
	ArrayList<FluidStack> inputFluids = new ArrayList<>();
	ArrayList<ItemStack> inputItems = new ArrayList<>();
	for (IRecipeInput input : multiRecipe.getInputs()) {
		if (input instanceof RecipeInputFluid) {
			inputFluids.add(((RecipeInputFluid) input).fluid);
		} else {
			inputItems.addAll(input.getInputs());
		}
	}
	if (!inputFluids.isEmpty()) {
		ingredients.setInputs(FluidStack.class, inputFluids);
	}
	ingredients.setInputs(ItemStack.class, inputItems);
	ingredients.setOutputs(ItemStack.class, multiRecipe.getOutputs().getAllOutputs());
}
 
Example 3
Source File: GTJeiMagicFuelWrapper.java    From GT-Classic with GNU Lesser General Public License v3.0 6 votes vote down vote up
@SuppressWarnings("deprecation")
@Override
public void getIngredients(IIngredients ingredients) {
	ArrayList<FluidStack> inputFluids = new ArrayList<>();
	ArrayList<ItemStack> inputItems = new ArrayList<>();
	for (IRecipeInput input : multiRecipe.getInputs()) {
		if (input instanceof RecipeInputFluid) {
			inputFluids.add(((RecipeInputFluid) input).fluid);
		} else {
			inputItems.addAll(input.getInputs());
		}
	}
	if (!inputFluids.isEmpty()) {
		ingredients.setInputs(FluidStack.class, inputFluids);
	}
	ingredients.setInputs(ItemStack.class, inputItems);
	ingredients.setOutputs(ItemStack.class, multiRecipe.getOutputs().getAllOutputs());
}
 
Example 4
Source File: MachineRecipeWrapper.java    From customstuff4 with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients)
{
    List<Object> inputs = Lists.newArrayList();
    for (RecipeInput input : recipe.getRecipeInput())
    {
        if (input.isOreClass())
            inputs.add(input.getOreClass().getOreName());
        else
            inputs.add(input.getStack().getItemStack().copy());
    }

    ingredients.setInputLists(ItemStack.class, jeiHelpers.getStackHelper().expandRecipeItemStackInputs(inputs));
    ingredients.setInputs(FluidStack.class, recipe.getFluidRecipeInput());

    ingredients.setOutputs(ItemStack.class, output.getOutputItems());
    ingredients.setOutputs(FluidStack.class, output.getOutputFluids());
}
 
Example 5
Source File: GTJeiMortarWrapper.java    From GT-Classic with GNU Lesser General Public License v3.0 5 votes vote down vote up
@SuppressWarnings("deprecation")
@Override
public void getIngredients(IIngredients ingredients) {
	ArrayList<ItemStack> inputs = new ArrayList<>();
	for (IRecipeInput input : multiRecipe.getInputs()) {
		inputs.addAll(input.getInputs());
	}
	ingredients.setInputs(ItemStack.class, inputs);
	ingredients.setOutputs(ItemStack.class, multiRecipe.getOutputs().getAllOutputs());
}
 
Example 6
Source File: MachineRecipe.java    From AdvancedRocketry with MIT License 5 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients) {
	ingredients.setInputLists(ItemStack.class, this.ingredients);
	ingredients.setOutputs(ItemStack.class, result);
	ingredients.setInputs(FluidStack.class, fluidIngredients);
	ingredients.setOutputs(FluidStack.class, fluidOutputs);
}
 
Example 7
Source File: ProduceRecipeWrapper.java    From AgriCraft with MIT License 5 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients) {
    // Set Inputs
    ingredients.setInputs(ItemStack.class, input);

    // Set Outputs
    ingredients.setOutputs(ItemStack.class, output);
}
 
Example 8
Source File: OreByProduct.java    From GregTech with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients) {
	ingredients.setInputLists(ItemStack.class, this.matchingInputs);
	ingredients.setOutputs(ItemStack.class, this.outputs);
}
 
Example 9
Source File: CokeOvenRecipeWrapper.java    From GregTech with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients) {
	ingredients.setInputLists(ItemStack.class, this.matchingInputs);
	ingredients.setOutputs(ItemStack.class, this.outputs);
	ingredients.setOutputs(FluidStack.class, this.fluidOutputs);
}
 
Example 10
Source File: HammerRecipe.java    From ExNihiloAdscensio with MIT License 4 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients)
{
    ingredients.setInputs(ItemStack.class, inputs);
    ingredients.setOutputs(ItemStack.class, outputs);
}
 
Example 11
Source File: SieveRecipe.java    From ExNihiloAdscensio with MIT License 4 votes vote down vote up
@Override
public void getIngredients(IIngredients ingredients)
{
    ingredients.setInputs(ItemStack.class, inputs);
    ingredients.setOutputs(ItemStack.class, outputs);
}