Interface CraftingRecipe
-
- All Superinterfaces:
Keyed,Recipe,ResourceKeyed
- All Known Subinterfaces:
ShapedCraftingRecipe,ShapelessCraftingRecipe,SpecialCraftingRecipe
public interface CraftingRecipe extends Recipe
A CraftingRecipe represents some craftable recipe in the game.Currently supported crafting recipe types are:
ShapelessCraftingRecipefor recipes with simple ingredients/result without pattern in aCraftingInventoryShapedCraftingRecipefor recipes with simple ingredients/result in a pattern in aCraftingInventorySpecialCraftingRecipefor recipes with complex ingredients and result in aCraftingInventory
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<String>group()The group this CraftingRecipe belongs to orOptional.empty()if not defined.static ShapedCraftingRecipe.BuildershapedBuilder()Provides a builder for aShapedCraftingRecipe.static ShapelessCraftingRecipe.BuildershapelessBuilder()Provides a builder for aShapelessCraftingRecipe.static SpecialCraftingRecipe.BuilderspecialBuilder()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, result
-
Methods inherited from interface org.spongepowered.api.ResourceKeyed
key
-
-
-
-
Method Detail
-
type
RecipeType<? extends CraftingRecipe> type()
Description copied from interface:RecipeGets theRecipeTypeof this recipe.
-
group
Optional<String> 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
static ShapedCraftingRecipe.Builder shapedBuilder()
Provides a builder for aShapedCraftingRecipe.- Returns:
- The builder.
-
shapelessBuilder
static ShapelessCraftingRecipe.Builder shapelessBuilder()
Provides a builder for aShapelessCraftingRecipe.- Returns:
- The builder.
-
specialBuilder
static SpecialCraftingRecipe.Builder specialBuilder()
Provides a builder for aSpecialCraftingRecipe- Returns:
- The builder.
-
-