From 9fd25621c2b9993666ce8e00bacbe52a18136b95 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 3 Jun 2019 17:33:19 +0800 Subject: Remove Perfer Visible Recipes --- src/main/java/me/shedaniel/rei/api/RecipeHelper.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main/java/me/shedaniel/rei/api/RecipeHelper.java') diff --git a/src/main/java/me/shedaniel/rei/api/RecipeHelper.java b/src/main/java/me/shedaniel/rei/api/RecipeHelper.java index a57b7146f..5a5c1b4a2 100644 --- a/src/main/java/me/shedaniel/rei/api/RecipeHelper.java +++ b/src/main/java/me/shedaniel/rei/api/RecipeHelper.java @@ -162,9 +162,19 @@ public interface RecipeHelper { * @param display the display to be checked * @param respectConfig whether it should respect the user's config * @return whether the display should be visible + * @deprecated {@link RecipeHelper#isDisplayVisible(RecipeDisplay)} )} */ + @Deprecated boolean isDisplayVisible(RecipeDisplay display, boolean respectConfig); + /** + * Checks if the display is visible by asking recipe visibility handlers + * + * @param display the display to be checked + * @return whether the display should be visible + */ + boolean isDisplayVisible(RecipeDisplay display); + /** * Gets the cached category setting by the category identifier * -- cgit From fd99a42678f27d74483cfa2ae069de8bea38f893 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 5 Jun 2019 20:14:36 +0800 Subject: recipe id cache --- src/main/java/me/shedaniel/rei/api/RecipeHelper.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/main/java/me/shedaniel/rei/api/RecipeHelper.java') diff --git a/src/main/java/me/shedaniel/rei/api/RecipeHelper.java b/src/main/java/me/shedaniel/rei/api/RecipeHelper.java index 5a5c1b4a2..5cc71f013 100644 --- a/src/main/java/me/shedaniel/rei/api/RecipeHelper.java +++ b/src/main/java/me/shedaniel/rei/api/RecipeHelper.java @@ -14,6 +14,7 @@ import net.minecraft.util.Identifier; import java.util.List; import java.util.Map; import java.util.Optional; +import java.util.function.Function; public interface RecipeHelper { @@ -106,10 +107,10 @@ public interface RecipeHelper { void registerSpeedCraftButtonArea(Identifier category, ButtonAreaSupplier rectangle); /** - * Registers a default speed crafting button area, which is bottom right - * * @param category the category of the button area + * @deprecated Not required anymore */ + @Deprecated void registerDefaultSpeedCraftButtonArea(Identifier category); /** @@ -183,6 +184,13 @@ public interface RecipeHelper { */ Optional getCachedCategorySettings(Identifier category); + /** + * Registers a live recipe generator. + * + * @param liveRecipeGenerator the generator to register + * @apiNote Still work in progress + */ void registerLiveRecipeGenerator(LiveRecipeGenerator liveRecipeGenerator); + > void registerRecipes(Identifier category, Class recipeClass, Function mappingFunction); } -- cgit From 94e6085d2d49e7fe38871c9548774c4e50a2f422 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 6 Jun 2019 16:09:48 +0800 Subject: this is still not working --- src/main/java/me/shedaniel/rei/api/RecipeHelper.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main/java/me/shedaniel/rei/api/RecipeHelper.java') diff --git a/src/main/java/me/shedaniel/rei/api/RecipeHelper.java b/src/main/java/me/shedaniel/rei/api/RecipeHelper.java index 5cc71f013..2dbf3717a 100644 --- a/src/main/java/me/shedaniel/rei/api/RecipeHelper.java +++ b/src/main/java/me/shedaniel/rei/api/RecipeHelper.java @@ -52,6 +52,16 @@ public interface RecipeHelper { */ void registerCategory(RecipeCategory category); + /** + * Registers the working stations of a category + * + * @param category the category + * @param workingStations the working stations + */ + void registerWorkingStations(Identifier category, ItemStack... workingStations); + + List getWorkingStations(Identifier category); + /** * Registers a recipe display * -- cgit From 98c2c0f1af8b264cfce5c005f4694318cce001b2 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 6 Jun 2019 18:36:51 +0800 Subject: alterative solution to the working stations --- src/main/java/me/shedaniel/rei/api/RecipeHelper.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/main/java/me/shedaniel/rei/api/RecipeHelper.java') diff --git a/src/main/java/me/shedaniel/rei/api/RecipeHelper.java b/src/main/java/me/shedaniel/rei/api/RecipeHelper.java index 2dbf3717a..cb5e3684f 100644 --- a/src/main/java/me/shedaniel/rei/api/RecipeHelper.java +++ b/src/main/java/me/shedaniel/rei/api/RecipeHelper.java @@ -52,6 +52,14 @@ public interface RecipeHelper { */ void registerCategory(RecipeCategory category); + /** + * Registers the working stations of a category + * + * @param category the category + * @param workingStations the working stations + */ + void registerWorkingStations(Identifier category, List... workingStations); + /** * Registers the working stations of a category * @@ -60,7 +68,7 @@ public interface RecipeHelper { */ void registerWorkingStations(Identifier category, ItemStack... workingStations); - List getWorkingStations(Identifier category); + List> getWorkingStations(Identifier category); /** * Registers a recipe display -- cgit From 23698d1218bb325596ead0736a7a0636c7796ad7 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 6 Jun 2019 20:13:29 +0800 Subject: better api for whatever reason --- src/main/java/me/shedaniel/rei/api/RecipeHelper.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/java/me/shedaniel/rei/api/RecipeHelper.java') diff --git a/src/main/java/me/shedaniel/rei/api/RecipeHelper.java b/src/main/java/me/shedaniel/rei/api/RecipeHelper.java index cb5e3684f..cfbda23f0 100644 --- a/src/main/java/me/shedaniel/rei/api/RecipeHelper.java +++ b/src/main/java/me/shedaniel/rei/api/RecipeHelper.java @@ -211,4 +211,6 @@ public interface RecipeHelper { void registerLiveRecipeGenerator(LiveRecipeGenerator liveRecipeGenerator); > void registerRecipes(Identifier category, Class recipeClass, Function mappingFunction); + + > void registerRecipes(Identifier category, Function recipeFilter, Function mappingFunction); } -- cgit