Interface CookingRecipe
- All Superinterfaces:
Keyed,Recipe,ResourceKeyed
A general interface for cooking-type/furnace recipes.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilds a simple furnace recipe. -
Method Summary
Modifier and TypeMethodDescriptionstatic CookingRecipe.Builderbuilder()Builds a cooking recipe.Returns the cooking time in ticks.floatReturns the experience of this recipe.Returns theIngredientfor thisCookingRecipe.booleanisValid(ItemStackSnapshot ingredient) Checks if the givenItemStackSnapshotfits the required constraints to craft thisCookingRecipe.result(ItemStackSnapshot ingredient) Returns theCookingResultcontaining the resultingItemStackSnapshotand the amount of experience released.Methods inherited from interface org.spongepowered.api.item.recipe.Recipe
exemplaryResult, ingredients, isDynamic, isValid, remainingItems, result, result, typeMethods inherited from interface org.spongepowered.api.ResourceKeyed
key
-
Method Details
-
builder
Builds a cooking recipe.- Returns:
- A
CookingRecipebuilder
-
ingredient
Ingredient ingredient()Returns theIngredientfor thisCookingRecipe.- Returns:
- The
Ingredientfor thisCookingRecipe.
-
isValid
Checks if the givenItemStackSnapshotfits the required constraints to craft thisCookingRecipe.- Parameters:
ingredient- The ingredient to check against- Returns:
- Whether this ingredient can be used to craft the result
-
result
Returns the
CookingResultcontaining the resultingItemStackSnapshotand the amount of experience released.- Parameters:
ingredient- TheItemStackSnapshotcurrently being cooked- Returns:
- The
CookingResult, orOptional.empty()if the recipe is not valid according toisValid(ItemStackSnapshot).
-
cookingTime
Ticks cookingTime()Returns the cooking time in ticks.- Returns:
- The cooking time in ticks.
-
experience
float experience()Returns the experience of this recipe.- Returns:
- The experience of this recipe.
-