Interface RecipeManager
public interface RecipeManager
Manages registered recipes.
 Register new Recipes during 
RegisterDataPackValueEvent
 using RecipeRegistrations.
 To disable a recipe override it with an empty result.- 
Method SummaryModifier and TypeMethodDescriptionCollection<Recipe<?>> all()Gets all registered recipes.default <T extends Recipe<?>>
 Collection<T> allOfType(Supplier<? extends RecipeType<T>> supplier) Returns all registered recipes of given type<T extends Recipe<?>>
 Collection<T> allOfType(RecipeType<T> type) Returns all registered recipes of given typebyKey(ResourceKey key) Gets a recipe by itskey.default <T extends Recipe<?>>
 Collection<T> findByResult(Supplier<? extends RecipeType<T>> supplier, ItemStackLike result) Gets all recipes with given item as a result.<T extends Recipe<?>>
 Collection<T> findByResult(RecipeType<T> type, ItemStackLike result) Returns all registered recipes of given type and with given item as a result.default <T extends CookingRecipe>
 Optional<T> findCookingRecipe(Supplier<? extends RecipeType<T>> supplier, ItemStackLike ingredient) Finds a matching cooking recipe for given type and ingredient<T extends CookingRecipe>
 Optional<T> findCookingRecipe(RecipeType<T> type, ItemStackLike ingredient) Finds a matching cooking recipe for given type and ingredientdefault <I extends RecipeInput,T extends Recipe<I>> 
 Optional<T> findMatchingRecipe(Supplier<? extends RecipeType<T>> supplier, I input, ServerWorld world) Finds a matching recipe for given type, recipe input and world<I extends RecipeInput,T extends Recipe<I>> 
 Optional<T> findMatchingRecipe(RecipeType<T> type, I input, ServerWorld world) Finds a matching recipe for given type, recipe input and world
- 
Method Details- 
byKeyGets a recipe by itskey.- Parameters:
- key- the recipe key
- Returns:
- The recipe if available
 
- 
allCollection<Recipe<?>> all()Gets all registered recipes.- Returns:
- All registered recipes.
 
- 
allOfTypeReturns all registered recipes of given type- Parameters:
- type- The recipe type
- Returns:
- All recipes of given type
 
- 
allOfTypeReturns all registered recipes of given type- Parameters:
- supplier- The recipe type
- Returns:
- All recipes of given type
 
- 
findByResultReturns all registered recipes of given type and with given item as a result.- Parameters:
- type- The recipe type
- result- The recipe result to match
- Returns:
- The recipes resulting in given item.
 
- 
findByResultdefault <T extends Recipe<?>> Collection<T> findByResult(Supplier<? extends RecipeType<T>> supplier, ItemStackLike result) Gets all recipes with given item as a result.- Parameters:
- result- the recipe result to match
- Returns:
- All recipes resulting in given item.
 
- 
findMatchingRecipe<I extends RecipeInput,T extends Recipe<I>> Optional<T> findMatchingRecipe(RecipeType<T> type, I input, ServerWorld world) Finds a matching recipe for given type, recipe input and world- Parameters:
- type- The recipe type
- input- The recipe input
- world- The world
- Returns:
- The matching recipes.
 
- 
findMatchingRecipedefault <I extends RecipeInput,T extends Recipe<I>> Optional<T> findMatchingRecipe(Supplier<? extends RecipeType<T>> supplier, I input, ServerWorld world) Finds a matching recipe for given type, recipe input and world- Parameters:
- supplier- The recipe type
- input- The recipe input
- world- The world
- Returns:
- The matching recipes.
 
- 
findCookingRecipe<T extends CookingRecipe> Optional<T> findCookingRecipe(RecipeType<T> type, ItemStackLike ingredient) Finds a matching cooking recipe for given type and ingredient- Parameters:
- type- The recipe type
- ingredient- The ingredient
- Returns:
- The matching recipe.
 
- 
findCookingRecipedefault <T extends CookingRecipe> Optional<T> findCookingRecipe(Supplier<? extends RecipeType<T>> supplier, ItemStackLike ingredient) Finds a matching cooking recipe for given type and ingredient- Parameters:
- supplier- The recipe type
- ingredient- The ingredient
- Returns:
- The matching recipe.
 
 
-