blob: 41f2a3a4068f48b8852dcb99d6846c9194c50263 (
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
|
/*
* Copyright (c) 2018, 2019, 2020 shedaniel
* Licensed under the MIT License (the "License").
*/
package me.shedaniel.rei.api;
import net.minecraft.util.ActionResult;
public interface DisplayVisibilityHandler {
/**
* Gets the priority of the handler, the higher the priority, the earlier this is called.
*
* @return the priority
*/
default float getPriority() {
return 0f;
}
/**
* Handles the visibility of the display.
* {@link ActionResult#PASS} to pass the handling to another handler
* {@link ActionResult#SUCCESS} to always display it
* {@link ActionResult#FAIL} to never display it
*
* @param category the category of the display
* @param display the display of the recipe
* @return the visibility
*/
ActionResult handleDisplay(RecipeCategory<?> category, RecipeDisplay display);
}
|