aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/interfaces/tileentity/IRecipeLockable.java
blob: f793221a50365fa15736795e63d9ec0684bf222c (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
package gregtech.api.interfaces.tileentity;

import gregtech.api.recipe.check.SingleRecipeCheck;
import gregtech.api.util.GT_Recipe;

/**
 * Machines implementing this interface can have logic to lock to a single recipe.
 */
public interface IRecipeLockable {

    /**
     * @return if this machine supports single recipe locking.
     */
    boolean supportsSingleRecipeLocking();

    /**
     * @return true if recipe locking is enabled, else false. This is getter is used for displaying the icon in the GUI
     */
    boolean isRecipeLockingEnabled();

    void setRecipeLocking(boolean enabled);

    default boolean getDefaultRecipeLockingMode() {
        return false;
    }

    default SingleRecipeCheck getSingleRecipeCheck() {
        return null;
    }

    default void setSingleRecipeCheck(SingleRecipeCheck recipeCheck) {}

    GT_Recipe.GT_Recipe_Map getRecipeMap();
}