use of forestry.api.recipes.IFabricatorRecipe in project ForestryMC by ForestryMC.
the class FabricatorRecipeWrapper method getIngredients.
@Override
public void getIngredients(IIngredients ingredients) {
IFabricatorRecipe recipe = getRecipe();
NonNullList<NonNullList<ItemStack>> itemInputs = recipe.getIngredients();
List<List<ItemStack>> inputStacks = new ArrayList<>();
for (List<ItemStack> stacks : itemInputs) {
List<ItemStack> copy = new ArrayList<>();
copy.addAll(stacks);
inputStacks.add(copy);
}
ingredients.setInputLists(ItemStack.class, inputStacks);
ingredients.setInputs(FluidStack.class, Collections.singletonList(getRecipe().getLiquid()));
ingredients.setOutput(ItemStack.class, recipe.getRecipeOutput());
}
Aggregations