From 5e2eccadbd91171c01cdb209d1338bcfb7786b1c Mon Sep 17 00:00:00 2001 From: shedaniel Date: Thu, 2 Jan 2020 14:31:16 +0800 Subject: 3.3 Fix #58 Close #134 Close #158 Fix #227 --- .../java/me/shedaniel/rei/api/RecipeHelper.java | 74 +++++++++++----------- 1 file changed, 37 insertions(+), 37 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 ae3541e86..448f00d9e 100644 --- a/src/main/java/me/shedaniel/rei/api/RecipeHelper.java +++ b/src/main/java/me/shedaniel/rei/api/RecipeHelper.java @@ -19,28 +19,28 @@ import java.util.function.Function; import java.util.function.Predicate; public interface RecipeHelper { - + @SuppressWarnings("deprecation") static RecipeHelper getInstance() { return RoughlyEnoughItemsCore.getRecipeHelper(); } - + AutoTransferHandler registerAutoCraftingHandler(AutoTransferHandler handler); - + List getSortedAutoCraftingHandler(); - + /** * Gets the total recipe count registered * * @return the recipe count */ int getRecipeCount(); - + /** * @return a list of sorted recipes */ List getAllSortedRecipes(); - + /** * Gets all craftable items from materials. * @@ -48,14 +48,14 @@ public interface RecipeHelper { * @return the list of craftable entries */ List findCraftableEntriesByItems(List inventoryItems); - + /** * Registers a category * * @param category the category to register */ void registerCategory(RecipeCategory category); - + /** * Registers the working stations of a category * @@ -63,7 +63,7 @@ public interface RecipeHelper { * @param workingStations the working stations */ void registerWorkingStations(Identifier category, List... workingStations); - + /** * Registers the working stations of a category * @@ -71,9 +71,9 @@ public interface RecipeHelper { * @param workingStations the working stations */ void registerWorkingStations(Identifier category, EntryStack... workingStations); - + List> getWorkingStations(Identifier category); - + /** * Registers a recipe display * @@ -81,7 +81,7 @@ public interface RecipeHelper { * @param display the recipe display */ void registerDisplay(Identifier categoryIdentifier, RecipeDisplay display); - + /** * Gets a map of recipes for an entry * @@ -89,23 +89,23 @@ public interface RecipeHelper { * @return the map of recipes */ Map, List> getRecipesFor(EntryStack stack); - + RecipeCategory getCategory(Identifier identifier); - + /** * Gets the vanilla recipe manager * * @return the recipe manager */ RecipeManager getRecipeManager(); - + /** * Gets all registered categories * * @return the list of categories */ List> getAllCategories(); - + /** * Gets a map of usages for an entry * @@ -113,7 +113,7 @@ public interface RecipeHelper { * @return the map of recipes */ Map, List> getUsagesFor(EntryStack stack); - + /** * Gets the optional of the auto crafting button area from a category * @@ -121,7 +121,7 @@ public interface RecipeHelper { * @return the optional of auto crafting button area */ Optional getAutoCraftButtonArea(RecipeCategory category); - + /** * Registers a auto crafting button area * @@ -129,7 +129,7 @@ public interface RecipeHelper { * @param rectangle the button area */ void registerAutoCraftButtonArea(Identifier category, ButtonAreaSupplier rectangle); - + /** * Removes the auto crafting button * @@ -138,37 +138,37 @@ public interface RecipeHelper { default void removeAutoCraftButton(Identifier category) { registerAutoCraftButtonArea(category, bounds -> null); } - + /** * Gets the map of all recipes visible to the player * * @return the map of recipes */ Map, List> getAllRecipes(); - + List getAllRecipesFromCategory(RecipeCategory category); - + /** * Registers a recipe visibility handler * * @param visibilityHandler the handler to be registered */ void registerRecipeVisibilityHandler(DisplayVisibilityHandler visibilityHandler); - + /** * Unregisters a recipe visibility handler * * @param visibilityHandler the handler to be unregistered */ void unregisterRecipeVisibilityHandler(DisplayVisibilityHandler visibilityHandler); - + /** * Gets an unmodifiable list of recipe visibility handlers * * @return the unmodifiable list of handlers */ List getDisplayVisibilityHandlers(); - + /** * Checks if the display is visible by asking recipe visibility handlers * @@ -179,7 +179,7 @@ public interface RecipeHelper { */ @Deprecated boolean isDisplayVisible(RecipeDisplay display, boolean respectConfig); - + /** * Checks if the display is visible by asking recipe visibility handlers * @@ -187,9 +187,9 @@ public interface RecipeHelper { * @return whether the display should be visible */ boolean isDisplayVisible(RecipeDisplay display); - + > void registerRecipes(Identifier category, Predicate recipeFilter, Function mappingFunction); - + /** * Registers a live recipe generator. * @@ -197,24 +197,24 @@ public interface RecipeHelper { * @apiNote Still work in progress */ void registerLiveRecipeGenerator(LiveRecipeGenerator liveRecipeGenerator); - + void registerScreenClickArea(Rectangle rectangle, Class> screenClass, Identifier... categories); - + > void registerRecipes(Identifier category, Class recipeClass, Function mappingFunction); - + > void registerRecipes(Identifier category, Function recipeFilter, Function mappingFunction); - + List getScreenClickAreas(); - + boolean arePluginsLoading(); - + interface ScreenClickArea { Class getScreenClass(); - + Rectangle getRectangle(); - + Identifier[] getCategories(); } - + } -- cgit