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

package me.shedaniel.rei.api;

public interface DisplayVisibilityHandler {
    
    /**
     * Gets the priority of the handler
     *
     * @return the priority
     */
    default float getPriority() {
        return 0f;
    }
    
    /**
     * Handles the visibility of the display.
     * {@link DisplayVisibility#PASS} to pass the handling to another handler
     * {@link DisplayVisibility#ALWAYS_VISIBLE} to always display it
     * {@link DisplayVisibility#NEVER_VISIBLE} to never display it
     *
     * @param category the category of the display
     * @param display  the display of the recipe
     * @return the visibility
     */
    DisplayVisibility handleDisplay(RecipeCategory category, RecipeDisplay display);
    
}