Class RecipeResult
java.lang.Object
org.spongepowered.api.item.recipe.crafting.RecipeResult
The result of fulfilling a
CraftingRecipe.-
Constructor Summary
ConstructorsConstructorDescriptionRecipeResult(ItemStackLike result, List<? extends ItemStackLike> remainingItems) Creates a newRecipeResult.RecipeResult(ItemStackSnapshot result, List<ItemStackSnapshot> remainingItems) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()Returns a list ofItemStackSnapshotto be set in the inputCraftingGridInventory, containsItemStackSnapshot.empty()for slots which should be cleared.result()This method should be used instead of theRecipe.exemplaryResult()method, as it customizes the result further depending on the specified ingredientItemStackSnapshot.toString()
-
Constructor Details
-
RecipeResult
@Deprecated(forRemoval=true) public RecipeResult(ItemStackSnapshot result, List<ItemStackSnapshot> remainingItems) Deprecated, for removal: This API element is subject to removal in a future version.UseRecipeResult(ItemStackLike, List)instead. -
RecipeResult
Creates a newRecipeResult.Note that this may be replaced with a static of method in the future.
- Parameters:
result- The result of the crafting reciperemainingItems- The remaining items to leave in the crafting window
-
-
Method Details
-
result
This method should be used instead of theRecipe.exemplaryResult()method, as it customizes the result further depending on the specified ingredientItemStackSnapshot. It is advised to use the output ofRecipe.exemplaryResult(), modify it accordingly, andreturnit.- Returns:
- The result of fulfilling the requirements of a
CraftingRecipe
-
remainingItems
Returns a list ofItemStackSnapshotto be set in the inputCraftingGridInventory, containsItemStackSnapshot.empty()for slots which should be cleared.- Returns:
- A list of
ItemStackSnapshots to be set in the inputCraftingGridInventory
-
equals
-
hashCode
public int hashCode() -
toString
-
RecipeResult(ItemStackLike, List)instead.