aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/api/RecipeHelper.java
blob: 42836444fb1dd72e2d2da7372be7c910dc008c94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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 {
    
    static RecipeHelper getInstance() {
        return RoughlyEnoughItemsCore.getRecipeHelper();
    }
    
    int getRecipeCount();
    
    List<ItemStack> findCraftableByItems(List<ItemStack> inventoryItems);
    
    void registerCategory(RecipeCategory category);
    
    void registerDisplay(Identifier categoryIdentifier, RecipeDisplay display);
    
    Map<RecipeCategory, List<RecipeDisplay>> getRecipesFor(ItemStack stack);
    
    RecipeManager getRecipeManager();
    
    List<RecipeCategory> getAllCategories();
    
    Map<RecipeCategory, List<RecipeDisplay>> getUsagesFor(ItemStack stack);
    
    Optional<ButtonAreaSupplier> getSpeedCraftButtonArea(RecipeCategory category);
    
    void registerSpeedCraftButtonArea(Identifier category, ButtonAreaSupplier rectangle);
    
    void registerDefaultSpeedCraftButtonArea(Identifier category);
    
    List<SpeedCraftFunctional> getSpeedCraftFunctional(RecipeCategory category);
    
    void registerSpeedCraftFunctional(Identifier category, SpeedCraftFunctional functional);
    
    Map<RecipeCategory, List<RecipeDisplay>> getAllRecipes();
    
    void registerRecipeVisibilityHandler(DisplayVisibilityHandler visibilityHandler);
    
    void unregisterRecipeVisibilityHandler(DisplayVisibilityHandler visibilityHandler);
    
    List<DisplayVisibilityHandler> getDisplayVisibilityHandlers();
    
    boolean isDisplayVisible(RecipeDisplay display, boolean respectConfig);
    
}