Class MixedIngredients
java.lang.Object
org.cyclops.commoncapabilities.api.ingredient.MixedIngredientsAdapter
org.cyclops.commoncapabilities.api.ingredient.MixedIngredients
- All Implemented Interfaces:
Comparable<IMixedIngredients>
,IMixedIngredients
Raw implementation of mixed ingredients.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MixedIngredients
fromRecipeInput
(IRecipeDefinition recipe) Create ingredients from the given recipe's input.Set<IngredientComponent<?,
?>> <T> List<T>
getInstances
(IngredientComponent<T, ?> ingredientComponent) Get the instances of a certain type.static <T> MixedIngredients
ofInstance
(IngredientComponent<T, ?> component, T instance) Create a new ingredients for a single instance.static <T> MixedIngredients
ofInstances
(IngredientComponent<T, ?> component, Collection<T> instances) Methods inherited from class org.cyclops.commoncapabilities.api.ingredient.MixedIngredientsAdapter
compareCollection, compareCollection, compareTo, equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.cyclops.commoncapabilities.api.ingredient.IMixedIngredients
containsAll, getFirstNonEmpty, isEmpty
-
Constructor Details
-
MixedIngredients
-
-
Method Details
-
getComponents
- Returns:
- The ingredient component types.
-
getInstances
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
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
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.
-