From bb15ef0c3657acd1bc6b73574373660df274d79c Mon Sep 17 00:00:00 2001 From: "Vincent B." <79211348+Snabeldier@users.noreply.github.com> Date: Tue, 10 Feb 2026 13:55:51 +0100 Subject: [PATCH] Change method signatures to return CustomRecipe --- .../minevalley/crafting/api/recipe/CustomRecipe.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/minevalley/crafting/api/recipe/CustomRecipe.java b/src/main/java/minevalley/crafting/api/recipe/CustomRecipe.java index ec70630..99df083 100644 --- a/src/main/java/minevalley/crafting/api/recipe/CustomRecipe.java +++ b/src/main/java/minevalley/crafting/api/recipe/CustomRecipe.java @@ -33,23 +33,26 @@ public interface CustomRecipe { * * @param symbol the symbol to map * @param ingredient the crafting ingredient to map to the symbol + * @return this * @throws IllegalArgumentException if the symbol is already mapped or if the ingredient is null */ - void mapIngredient(char symbol, @Nonnull RecipeIngredient ingredient) throws IllegalArgumentException; + CustomRecipe mapIngredient(char symbol, @Nonnull RecipeIngredient ingredient) throws IllegalArgumentException; /** * Sets a requirement that must be fulfilled by the user trying to craft this recipe. * * @param requirement the requirement predicate + * @return this * @throws IllegalArgumentException if the requirement is null */ - void require(@Nonnull Predicate requirement) throws IllegalArgumentException; + CustomRecipe require(@Nonnull Predicate requirement) throws IllegalArgumentException; /** * Removes all requirements for crafting this recipe. + * @return this */ - default void removeRequirements() { - require(user -> true); + default CustomRecipe removeRequirements() { + return require(user -> true); } /**