Interface ShapelessCraftingRecipe.Builder.ResultStep
- All Superinterfaces:
AbstractBuilder<RecipeRegistration>
,Builder<RecipeRegistration,
,ShapelessCraftingRecipe.Builder> ResettableBuilder<RecipeRegistration,
,ShapelessCraftingRecipe.Builder> ResourceKeyedBuilder<RecipeRegistration,
,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<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 result and returns this builder.result
(ItemStackSnapshot 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.util.ResourceKeyedBuilder
key
Methods inherited from interface org.spongepowered.api.item.recipe.crafting.ShapelessCraftingRecipe.Builder
addIngredients, addIngredients, addIngredients
-
Method Details
-
remainingItems
ShapelessCraftingRecipe.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 result and returns this builder. The result is theItemStack
created when the recipe is fulfilled.- Parameters:
result
- The result- Returns:
- This builder, for chaining
-
result
Sets the result and returns this builder. The result is theItemStack
created when the recipe is fulfilled.- Parameters:
result
- The result- Returns:
- This builder, for chaining
-
result
ShapelessCraftingRecipe.Builder.EndStep result(Function<CraftingGridInventory, ItemStack> resultFunction, ItemStack 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
-