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:
ShapelessCraftingRecipe
for recipes with simple ingredients/result without pattern in aCraftingInventory
ShapedCraftingRecipe
for recipes with simple ingredients/result in a pattern in aCraftingInventory
SpecialCraftingRecipe
for recipes with complex ingredients and result in aCraftingInventory
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<java.lang.String>
group()
The group this CraftingRecipe belongs to orOptional.empty()
if not defined.static ShapedCraftingRecipe.Builder
shapedBuilder()
Provides a builder for aShapedCraftingRecipe
.static ShapelessCraftingRecipe.Builder
shapelessBuilder()
Provides a builder for aShapelessCraftingRecipe
.static SpecialCraftingRecipe.Builder
specialBuilder()
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
-
Methods inherited from interface org.spongepowered.api.ResourceKeyed
key
-
-
-
-
Method Detail
-
type
RecipeType<? extends CraftingRecipe> type()
Description copied from interface:Recipe
Gets theRecipeType
of this recipe.
-
group
java.util.Optional<java.lang.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.
-
-