Interface ShapedCraftingRecipe.Builder.ResultStep
- All Superinterfaces:
AbstractBuilder<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
Modifier and TypeMethodDescriptionremainingItems
(Function<CraftingGridInventory, List<ItemStack>> remainingItemsFunction) Sets the remainingItems function.result
(Function<CraftingGridInventory, ItemStack> resultFunction, ItemStack exemplaryResult) Sets the result function and an exemplary result.Sets the resultantItemStack
for when this shaped recipe is correctly crafted.result
(ItemStackSnapshot result) Sets the resultantItemStackSnapshot
for when this shaped recipe is correctly crafted.Methods inherited from interface net.kyori.adventure.builder.AbstractBuilder
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 Details
-
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
Sets the resultantItemStackSnapshot
for when this shaped recipe is correctly crafted.- Parameters:
result
- The resultant snapshot- Returns:
- The builder
-
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
-