Interface ShapedCraftingRecipe.Builder.ResultStep
- All Superinterfaces:
AbstractBuilder<ShapedCraftingRecipe>,Builder<ShapedCraftingRecipe,,ShapedCraftingRecipe.Builder> ResettableBuilder<ShapedCraftingRecipe,,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<RecipeInput.Crafting, ? extends List<? extends ItemStackLike>> remainingItemsFunction) Sets the remainingItems function.result(Function<RecipeInput.Crafting, ? extends ItemStackLike> resultFunction, ItemStackLike exemplaryResult) Sets the result function and an exemplary result.result(ItemStackLike result) Sets the resultantItemStackLikefor when this shaped recipe is correctly crafted.Methods inherited from interface net.kyori.adventure.builder.AbstractBuilder
buildMethods inherited from interface org.spongepowered.api.item.recipe.crafting.ShapedCraftingRecipe.Builder
aisle, rows
-
Method Details
-
remainingItems
ShapedCraftingRecipe.Builder.ResultStep remainingItems(Function<RecipeInput.Crafting, ? extends List<? extends ItemStackLike>> 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 resultantItemStackLikefor when this shaped recipe is correctly crafted.- Parameters:
result- The resultant snapshot- Returns:
- The builder
-
result
ShapedCraftingRecipe.Builder.EndStep result(Function<RecipeInput.Crafting, ? extends ItemStackLike> resultFunction, ItemStackLike 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
-