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

import gregtech.api.recipe.check.SingleRecipeCheck;

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

    /**
     * @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) {}
}