From 398bda6e8051368d48c0737719ce277028dce396 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 26 Feb 2019 16:58:22 +0800 Subject: Make dialog remember its location --- .../java/me/shedaniel/rei/api/RecipeHelper.java | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/main/java/me/shedaniel/rei/api/RecipeHelper.java (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 new file mode 100644 index 000000000..0e1cdcf6e --- /dev/null +++ b/src/main/java/me/shedaniel/rei/api/RecipeHelper.java @@ -0,0 +1,44 @@ +package me.shedaniel.rei.api; + +import me.shedaniel.rei.RoughlyEnoughItemsCore; +import net.minecraft.item.ItemStack; +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 { + + public static RecipeHelper getInstance() { + return RoughlyEnoughItemsCore.getRecipeHelper(); + } + + public int getRecipeCount(); + + public List findCraftableByItems(List inventoryItems); + + public void registerCategory(IRecipeCategory category); + + public void registerDisplay(Identifier categoryIdentifier, IRecipeDisplay display); + + public Map> getRecipesFor(ItemStack stack); + + public RecipeManager getRecipeManager(); + + public List getAllCategories(); + + public Map> getUsagesFor(ItemStack stack); + + public Optional getSpeedCraftButtonArea(IRecipeCategory category); + + public void registerSpeedCraftButtonArea(Identifier category, SpeedCraftAreaSupplier rectangle); + + public List getSpeedCraftFunctional(IRecipeCategory category); + + public void registerSpeedCraftFunctional(Identifier category, SpeedCraftFunctional functional); + + Map> getAllRecipes(); + +} -- cgit