/* * Roughly Enough Items by Danielshe. * Licensed under the MIT License. */ package me.shedaniel.rei.api; import me.shedaniel.rei.RoughlyEnoughItemsCore; import net.minecraft.item.ItemStack; import net.minecraft.recipe.Recipe; import net.minecraft.recipe.RecipeManager; import net.minecraft.util.Identifier; import java.util.List; import java.util.Map; import java.util.Optional; public interface RecipeHelper { /** * @return the api instance of {@link me.shedaniel.rei.client.RecipeHelperImpl} */ static RecipeHelper getInstance() { return RoughlyEnoughItemsCore.getRecipeHelper(); } int getRecipeCount(); List getVanillaSortedRecipes(); List findCraftableByItems(List inventoryItems); /** * Registers a category * * @param category the category to register */ void registerCategory(RecipeCategory category); /** * Registers a recipe display * * @param categoryIdentifier the category to display in * @param display the recipe display */ void registerDisplay(Identifier categoryIdentifier, RecipeDisplay display); Map> getRecipesFor(ItemStack stack); /** * Gets the vanilla recipe manager * * @return the recipe manager */ RecipeManager getRecipeManager(); /** * Gets all registered categories * @return the list of categories */ List getAllCategories(); Map> getUsagesFor(ItemStack stack); Optional getSpeedCraftButtonArea(RecipeCategory category); void registerSpeedCraftButtonArea(Identifier category, ButtonAreaSupplier rectangle); void registerDefaultSpeedCraftButtonArea(Identifier category); List getSpeedCraftFunctional(RecipeCategory category); void registerSpeedCraftFunctional(Identifier category, SpeedCraftFunctional functional); Map> getAllRecipes(); void registerRecipeVisibilityHandler(DisplayVisibilityHandler visibilityHandler); void unregisterRecipeVisibilityHandler(DisplayVisibilityHandler visibilityHandler); List getDisplayVisibilityHandlers(); boolean isDisplayVisible(RecipeDisplay display, boolean respectConfig); Optional getCachedCategorySettings(Identifier category); }