Interface CraftingRecipe
- All Superinterfaces:
Recipe
- All Known Subinterfaces:
ShapedCraftingRecipe
,ShapelessCraftingRecipe
,SpecialCraftingRecipe
A CraftingRecipe represents some craftable recipe in the game.
Currently supported crafting recipe types are:
ShapelessCraftingRecipe
for recipes with simple ingredients/result without pattern in a CraftingInventory
ShapedCraftingRecipe
for recipes with simple ingredients/result in a pattern in a CraftingInventory
SpecialCraftingRecipe
for recipes with complex ingredients and result in a CraftingInventory
-
Method Summary
Modifier and TypeMethodDescriptiongroup()
The group this CraftingRecipe belongs to orOptional.empty()
if not defined.static ShapedCraftingRecipe.Builder
Provides a builder for aShapedCraftingRecipe
.Provides a builder for aShapelessCraftingRecipe
.Provides a builder for aSpecialCraftingRecipe
RecipeType
<? extends CraftingRecipe> type()
Gets theRecipeType
of this recipe.Methods inherited from interface org.spongepowered.api.item.recipe.Recipe
exemplaryResult, ingredients, isDynamic, isValid, remainingItems, result, result
-
Method Details
-
type
RecipeType<? extends CraftingRecipe> type()Description copied from interface:Recipe
Gets theRecipeType
of this recipe. -
group
The group this CraftingRecipe belongs to orOptional.empty()
if not defined.This value is used to group recipes in the recipe book.
- Returns:
- The group this Recipe belongs to.
-
shapedBuilder
Provides a builder for aShapedCraftingRecipe
.- Returns:
- The builder.
-
shapelessBuilder
Provides a builder for aShapelessCraftingRecipe
.- Returns:
- The builder.
-
specialBuilder
Provides a builder for aSpecialCraftingRecipe
- Returns:
- The builder.
-