File tree Expand file tree Collapse file tree
src/main/java/minevalley/crafting/api/recipe Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,23 +33,26 @@ public interface CustomRecipe {
3333 *
3434 * @param symbol the symbol to map
3535 * @param ingredient the crafting ingredient to map to the symbol
36+ * @return this
3637 * @throws IllegalArgumentException if the symbol is already mapped or if the ingredient is null
3738 */
38- void mapIngredient(char symbol, @Nonnull RecipeIngredient ingredient) throws IllegalArgumentException;
39+ CustomRecipe mapIngredient(char symbol, @Nonnull RecipeIngredient ingredient) throws IllegalArgumentException;
3940
4041 /**
4142 * Sets a requirement that must be fulfilled by the user trying to craft this recipe.
4243 *
4344 * @param requirement the requirement predicate
45+ * @return this
4446 * @throws IllegalArgumentException if the requirement is null
4547 */
46- void require(@Nonnull Predicate<OnlineUser> requirement) throws IllegalArgumentException;
48+ CustomRecipe require(@Nonnull Predicate<OnlineUser> requirement) throws IllegalArgumentException;
4749
4850 /**
4951 * Removes all requirements for crafting this recipe.
52+ * @return this
5053 */
51- default void removeRequirements() {
52- require(user -> true);
54+ default CustomRecipe removeRequirements() {
55+ return require(user -> true);
5356 }
5457
5558 /**
You can’t perform that action at this time.
0 commit comments