Class MixedIngredients

java.lang.Object
org.cyclops.commoncapabilities.api.ingredient.MixedIngredientsAdapter
org.cyclops.commoncapabilities.api.ingredient.MixedIngredients
All Implemented Interfaces:
Comparable<IMixedIngredients>, IMixedIngredients

public class MixedIngredients extends MixedIngredientsAdapter
Raw implementation of mixed ingredients.
  • Constructor Details

  • Method Details

    • getComponents

      public Set<IngredientComponent<?,?>> getComponents()
      Returns:
      The ingredient component types.
    • getInstances

      public <T> List<T> getInstances(IngredientComponent<T,?> ingredientComponent)
      Description copied from interface: IMixedIngredients
      Get the instances of a certain type.
      Type Parameters:
      T - The instance type.
      Parameters:
      ingredientComponent - An ingredient component type.
      Returns:
      Instances.
    • ofInstances

      public static <T> MixedIngredients ofInstances(IngredientComponent<T,?> component, Collection<T> instances)
    • ofInstance

      public static <T> MixedIngredients ofInstance(IngredientComponent<T,?> component, T instance)
      Create a new ingredients for a single instance.
      Type Parameters:
      T - The instance type.
      Parameters:
      component - A component type.
      instance - An instance.
      Returns:
      New ingredients.
    • fromRecipeInput

      public static MixedIngredients fromRecipeInput(IRecipeDefinition recipe)
      Create ingredients from the given recipe's input. This will create the ingredients based on the first prototype of the recipe's inputs.
      Parameters:
      recipe - A recipe.
      Returns:
      New ingredients.