Interface ShapelessCraftingRecipe.Builder.ResultStep
- All Superinterfaces:
AbstractBuilder<ShapelessCraftingRecipe>
,Builder<ShapelessCraftingRecipe,
,ShapelessCraftingRecipe.Builder> ResettableBuilder<ShapelessCraftingRecipe,
,ShapelessCraftingRecipe.Builder> ShapelessCraftingRecipe.Builder
- Enclosing interface:
ShapelessCraftingRecipe.Builder
public static interface ShapelessCraftingRecipe.Builder.ResultStep
extends ShapelessCraftingRecipe.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.ShapelessCraftingRecipe.Builder
ShapelessCraftingRecipe.Builder.EndStep, ShapelessCraftingRecipe.Builder.ResultStep
-
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 result and returns this builder.Methods inherited from interface net.kyori.adventure.builder.AbstractBuilder
build
Methods inherited from interface org.spongepowered.api.item.recipe.crafting.ShapelessCraftingRecipe.Builder
addIngredients, addIngredients, addIngredients
-
Method Details
-
remainingItems
ShapelessCraftingRecipe.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 result and returns this builder. The result is theItemStackLike
created when the recipe is fulfilled.- Parameters:
result
- The result- Returns:
- This builder, for chaining
-
result
ShapelessCraftingRecipe.Builder.EndStep result(Function<RecipeInput.Crafting, ? extends ItemStackLike> resultFunction, ItemStackLike exemplaryResult) Sets the result function and an exemplary result.The exemplary result is used for the recipe book.
- Parameters:
resultFunction
- The result functionexemplaryResult
- The exemplary result stack- Returns:
- This builder, for chaining
-