Interface CraftingRecipe
- All Superinterfaces:
Keyed,Recipe,ResourceKeyed
- 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.BuilderProvides a builder for aShapedCraftingRecipe.Provides a builder for aShapelessCraftingRecipe.Provides a builder for aSpecialCraftingRecipeRecipeType<? extends CraftingRecipe>type()Gets theRecipeTypeof this recipe.Methods inherited from interface org.spongepowered.api.item.recipe.Recipe
exemplaryResult, ingredients, isDynamic, isValid, remainingItems, result, resultMethods inherited from interface org.spongepowered.api.ResourceKeyed
key
-
Method Details
-
type
RecipeType<? extends CraftingRecipe> type()Description copied from interface:RecipeGets theRecipeTypeof 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.
-