3434import org .spongepowered .api .item .inventory .ItemStackSnapshot ;
3535import org .spongepowered .api .item .inventory .crafting .CraftingInventory ;
3636import org .spongepowered .api .item .recipe .cooking .CookingRecipe ;
37- import org .spongepowered .api .item .recipe .crafting .*;
37+ import org .spongepowered .api .item .recipe .crafting .CraftingRecipe ;
38+ import org .spongepowered .api .item .recipe .crafting .Ingredient ;
39+ import org .spongepowered .api .item .recipe .crafting .RecipeInput ;
40+ import org .spongepowered .api .item .recipe .crafting .RecipeResult ;
41+ import org .spongepowered .api .item .recipe .crafting .ShapedCraftingRecipe ;
42+ import org .spongepowered .api .item .recipe .crafting .ShapelessCraftingRecipe ;
43+ import org .spongepowered .api .item .recipe .crafting .SpecialCraftingRecipe ;
3844import org .spongepowered .api .item .recipe .single .StoneCutterRecipe ;
3945import org .spongepowered .api .item .recipe .smithing .SmithingRecipe ;
4046import org .spongepowered .api .world .server .ServerWorld ;
@@ -61,6 +67,7 @@ public interface Recipe<T extends RecipeInput> {
6167 *
6268 * @param inventory The inventory to check for validity
6369 * @param world The world this recipe would be used in
70+ *
6471 * @return True if the given input matches this recipe's requirements
6572 */
6673 boolean isValid (T inventory , ServerWorld world );
@@ -73,6 +80,7 @@ public interface Recipe<T extends RecipeInput> {
7380 * as it may customize the result further depending on the context.</p>
7481 *
7582 * @param inventory The input inventory
83+ *
7684 * @return The result of this recipe
7785 */
7886 ItemStackSnapshot result (T inventory );
@@ -107,9 +115,10 @@ public interface Recipe<T extends RecipeInput> {
107115 *
108116 * @param inventory The input inventory
109117 * @param world The world this recipe would be used in
118+ *
110119 * @return A {@link RecipeResult} if the arguments satisfy
111- * {@link #isValid(RecipeInput, ServerWorld)}, or
112- * {@link Optional#empty()} if not
120+ * {@link #isValid(RecipeInput, ServerWorld)}, or
121+ * {@link Optional#empty()} if not
113122 */
114123 default Optional <RecipeResult > result (T inventory , ServerWorld world ) {
115124 if (this .isValid (inventory , world )) {
0 commit comments