M - The type of the machine.I - The type of the recipe input of all recipes associated with the machine.O - The type of the recipe output of all recipes associated with the machine.P - The type of the recipe properties of all recipes associated with the machine.public interface IRecipeRegistry<M extends IMachine<M,I,O,P>,I extends IRecipeInput,O extends IRecipeOutput,P extends IRecipeProperties>
ISuperRecipeRegistry.getRecipeRegistry(IMachine)
by passing the appropriate machine.| Modifier and Type | Method and Description |
|---|---|
java.util.List<IRecipe<I,O,P>> |
allRecipes()
Returns a list of all recipes that are associated with the current machine.
|
IRecipe<I,O,P> |
findRecipe(IRecipeMatcher<M,IRecipe<I,O,P>> recipeMatcher)
Returns the first recipe for which the matches() method of the given RecipeMatcher returns true.
|
IRecipe<I,O,P> |
findRecipeByInput(I input)
Returns the first recipe whose input matches the given recipe input.
|
IRecipe<I,O,P> |
findRecipeByNamedId(java.lang.String namedId)
Returns the first recipe whose named id matches the given named id.
|
IRecipe<I,O,P> |
findRecipeByOutput(O output)
Returns the first recipe whose output matches the given recipe output.
|
java.util.List<IRecipe<I,O,P>> |
findRecipes(IRecipeMatcher<M,IRecipe<I,O,P>> recipeMatcher)
Returns a list of recipes for which the matches() method of the given RecipeMatcher return true.
|
java.util.List<IRecipe<I,O,P>> |
findRecipesByInput(I input)
Returns a list of recipes whose input match the given recipe input.
|
java.util.List<IRecipe<I,O,P>> |
findRecipesByOutput(O output)
Returns a list of recipes whose output match the given recipe output.
|
void |
registerRecipe(I input,
O output,
P properties)
Registers a new recipe with the given properties with this registry.
|
void |
registerRecipe(IRecipe<I,O,P> recipe)
Registers the given recipe with this registry.
|
void |
registerRecipe(java.lang.String namedId,
I input,
O output,
P properties)
Registers a new recipe with the given properties with this registry.
|
void registerRecipe(IRecipe<I,O,P> recipe)
recipe - A recipe that should be registered.void registerRecipe(java.lang.String namedId,
I input,
O output,
P properties)
namedId - A unique name for the given recipe.input - The input of the recipe.output - The output of the recipe.properties - Additional properties of the recipe.void registerRecipe(I input, O output, P properties)
input - The input of the recipe.output - The output of the recipe.properties - Additional properties of the recipe.IRecipe<I,O,P> findRecipeByNamedId(java.lang.String namedId)
namedId - The unique named id of the recipe.IRecipe<I,O,P> findRecipeByInput(I input)
input - The input of the recipe.java.util.List<IRecipe<I,O,P>> findRecipesByInput(I input)
input - The input of the recipe.IRecipe<I,O,P> findRecipeByOutput(O output)
output - The output of the recipe.java.util.List<IRecipe<I,O,P>> findRecipesByOutput(O output)
output - The output of the recipe.IRecipe<I,O,P> findRecipe(IRecipeMatcher<M,IRecipe<I,O,P>> recipeMatcher)
recipeMatcher - Defines the criteria for finding recipes.java.util.List<IRecipe<I,O,P>> findRecipes(IRecipeMatcher<M,IRecipe<I,O,P>> recipeMatcher)
recipeMatcher - Defines the criteria for finding recipes.