Interface ShapedCraftingRecipe.Builder.ResultStep
-
- All Superinterfaces:
Buildable.Builder<RecipeRegistration>
,Builder<RecipeRegistration,ShapedCraftingRecipe.Builder>
,ResettableBuilder<RecipeRegistration,ShapedCraftingRecipe.Builder>
,ResourceKeyedBuilder<RecipeRegistration,ShapedCraftingRecipe.Builder>
,ShapedCraftingRecipe.Builder
- All Known Subinterfaces:
ShapedCraftingRecipe.Builder.AisleStep.ResultStep
,ShapedCraftingRecipe.Builder.RowsStep.ResultStep
- Enclosing interface:
- ShapedCraftingRecipe.Builder
public static interface ShapedCraftingRecipe.Builder.ResultStep extends ShapedCraftingRecipe.Builder
In this Step set the result of the recipe.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.spongepowered.api.item.recipe.crafting.ShapedCraftingRecipe.Builder
ShapedCraftingRecipe.Builder.AisleStep, ShapedCraftingRecipe.Builder.EndStep, ShapedCraftingRecipe.Builder.ResultStep, ShapedCraftingRecipe.Builder.RowsStep
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ShapedCraftingRecipe.Builder.ResultStep
remainingItems(Function<CraftingGridInventory,List<ItemStack>> remainingItemsFunction)
Sets the remainingItems function.ShapedCraftingRecipe.Builder.EndStep
result(Function<CraftingGridInventory,ItemStack> resultFunction, ItemStack exemplaryResult)
Sets the result function and an exemplary result.ShapedCraftingRecipe.Builder.EndStep
result(ItemStack result)
Sets the resultantItemStack
for when this shaped recipe is correctly crafted.ShapedCraftingRecipe.Builder.EndStep
result(ItemStackSnapshot result)
Sets the resultantItemStackSnapshot
for when this shaped recipe is correctly crafted.-
Methods inherited from interface net.kyori.adventure.util.Buildable.Builder
build
-
Methods inherited from interface org.spongepowered.api.util.ResourceKeyedBuilder
key
-
Methods inherited from interface org.spongepowered.api.item.recipe.crafting.ShapedCraftingRecipe.Builder
aisle, rows
-
-
-
-
Method Detail
-
remainingItems
ShapedCraftingRecipe.Builder.ResultStep remainingItems(Function<CraftingGridInventory,List<ItemStack>> remainingItemsFunction)
Sets the remainingItems function. The function must return a list of the same size as the input CraftingGridInventory.- Parameters:
remainingItemsFunction
- the remaining items function- Returns:
- This builder, for chaining
-
result
ShapedCraftingRecipe.Builder.EndStep result(ItemStackSnapshot result)
Sets the resultantItemStackSnapshot
for when this shaped recipe is correctly crafted.- Parameters:
result
- The resultant snapshot- Returns:
- The builder
-
result
ShapedCraftingRecipe.Builder.EndStep result(ItemStack result)
Sets the resultantItemStack
for when this shaped recipe is correctly crafted.- Parameters:
result
- The resultant stack- Returns:
- The builder
-
result
ShapedCraftingRecipe.Builder.EndStep result(Function<CraftingGridInventory,ItemStack> resultFunction, ItemStack exemplaryResult)
Sets the result function and an exemplary result.Use
ItemStack.empty()
as exemplary result if the function returns different items.- Parameters:
resultFunction
- The result functionexemplaryResult
- The exemplary result stack- Returns:
- The builder
-
-