Class RecipeResult
java.lang.Object
org.spongepowered.api.item.recipe.crafting.RecipeResult
The result of fulfilling a
CraftingRecipe
.-
Constructor Summary
ConstructorDescriptionRecipeResult
(ItemStackSnapshot result, List<ItemStackSnapshot> remainingItems) Creates a newRecipeResult
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
Returns a list ofItemStackSnapshot
to 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
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, andreturn
it.- Returns:
- The result of fulfilling the requirements of a
CraftingRecipe
-
remainingItems
Returns a list ofItemStackSnapshot
to be set in the inputCraftingGridInventory
, containsItemStackSnapshot.empty()
for slots which should be cleared.- Returns:
- A list of
ItemStackSnapshot
s to be set in the inputCraftingGridInventory
-
equals
-
hashCode
public int hashCode() -
toString
-