aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/api/SpeedCraftFunctional.java
blob: 32f67438d27b64f30d673ee54b9c7f2d298beaa1 (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
/*
 * Roughly Enough Items by Danielshe.
 * Licensed under the MIT License.
 */

package me.shedaniel.rei.api;

import net.minecraft.client.gui.screen.Screen;

public interface SpeedCraftFunctional<T extends RecipeDisplay> {
    
    /**
     * Gets the classes that it is functioning for
     *
     * @return the array of classes
     */
    Class[] getFunctioningFor();
    
    /**
     * Performs the auto crafting
     *
     * @param screen the current screen
     * @param recipe the current recipe
     * @return whether it worked
     */
    boolean performAutoCraft(Screen screen, T recipe);
    
    /**
     * Gets if this functional accepts the auto crafting
     *
     * @param screen the current screen
     * @param recipe the current recipe
     * @return whether it is accepted
     */
    boolean acceptRecipe(Screen screen, T recipe);
    
}