public interface CraftingRecipeRegistry extends RecipeRegistry<CraftingRecipe>
| Modifier and Type | Method and Description |
|---|---|
Optional<CraftingRecipe> |
findMatchingRecipe(CraftingGridInventory grid,
World world)
Retrieves the recipe which would be crafted when the player clicks
the output slot.
|
default Optional<CraftingResult> |
getResult(CraftingGridInventory grid,
World world)
Finds the matching recipe and creates the
CraftingResult,
which is then returned. |
getRecipes, registergetAll, getByIdregisterDefaultsOptional<CraftingRecipe> findMatchingRecipe(CraftingGridInventory grid, World world)
grid - The crafting gridworld - The world the player is inCraftingRecipe, or Optional.empty()
if no recipe was found for this configurationdefault Optional<CraftingResult> getResult(CraftingGridInventory grid, World world)
CraftingResult,
which is then returned.grid - The crafting gridworld - The world the player is inCraftingResult if a recipe was found, or
Optional.empty() if not