/
IRecipeWrapper.java
51 lines (40 loc) · 1.63 KB
/
IRecipeWrapper.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
49
50
51
package mezz.jei.api.recipe;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
import net.minecraft.client.Minecraft;
import net.minecraftforge.fluids.FluidStack;
/**
* A wrapper around a normal recipe with methods that allow JEI can make sense of it.
* Implementers will have to create a wrapper for each type of recipe they have.
*/
public interface IRecipeWrapper {
/**
* Return a list of recipe inputs.
* Each element can be an ItemStack, null, or a List of ItemStacks.
*/
List getInputs();
/**
* Return a list of recipe inputs.
* Each element can be an ItemStack, null, or a List of ItemStacks.
*/
List getOutputs();
/** Return a list of recipe fluid inputs. */
List<FluidStack> getFluidInputs();
/** Return a list of recipe fluid outputs. */
List<FluidStack> getFluidOutputs();
/** Draw additional info about the recipe. */
void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight);
/** Draw animations involving the recipe. Can be disabled in the config. */
void drawAnimations(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight);
/**
* Get the tooltip for whatever's under the mouse.
* ItemStack and fluid tooltips are already handled by JEI, this is for anything else.
*
* @param mouseX the X position of the mouse, relative to the recipe.
* @param mouseY the Y position of the mouse, relative to the recipe.
* @return tooltip strings. If there is no tooltip at this position, return null or an empty list.
*/
@Nullable
List<String> getTooltipStrings(int mouseX, int mouseY);
}