/
IRecipeCategory.java
48 lines (38 loc) · 1.27 KB
/
IRecipeCategory.java
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
38
39
40
41
42
43
44
45
46
47
48
package mezz.jei.api.recipe;
import javax.annotation.Nonnull;
import net.minecraft.client.Minecraft;
import mezz.jei.api.gui.IDrawable;
import mezz.jei.api.gui.IRecipeLayout;
/**
* Defines a category of recipe, (i.e. Crafting Table Recipe, Furnace Recipe)
* and handles setting up the GUI for its recipe category.
*/
public interface IRecipeCategory {
/**
* Returns a unique ID for this recipe category.
* Referenced from recipes to identify which recipe category they belong to.
*/
@Nonnull
String getUid();
/**
* Returns the localized name for this recipe type.
* Drawn at the top of the recipe GUI pages for this category.
* Called every frame, so make sure to store it in a field.
*/
@Nonnull
String getTitle();
/**
* Returns the drawable background for a single recipe in this category.
* Called multiple times per frame, so make sure to store it in a field.
*/
@Nonnull
IDrawable getBackground();
/**
* Optionally draw anything else that might be necessary, like progress bars or icons.
*/
void drawExtras(Minecraft minecraft);
/**
* Set the IRecipeLayout properties from the RecipeWrapper.
*/
void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper);
}