public class DebugRecipeCategory extends java.lang.Object implements IRecipeCategory<DebugRecipe>
Modifier and Type | Field and Description |
---|---|
static int |
RECIPE_HEIGHT |
static int |
RECIPE_WIDTH |
static net.minecraft.util.ResourceLocation |
UID |
Constructor and Description |
---|
DebugRecipeCategory(IGuiHelper guiHelper) |
Modifier and Type | Method and Description |
---|---|
void |
draw(DebugRecipe recipe,
com.mojang.blaze3d.matrix.MatrixStack matrixStack,
double mouseX,
double mouseY)
Draw extras or additional info about the recipe.
|
IDrawable |
getBackground()
Returns the drawable background for a single recipe in this category.
|
IDrawable |
getIcon()
Icon for the category tab.
|
java.lang.Class<? extends DebugRecipe> |
getRecipeClass() |
java.lang.String |
getTitle()
Deprecated.
|
net.minecraft.util.text.ITextComponent |
getTitleAsTextComponent()
Returns a text component representing the name of this recipe type.
|
java.util.List<net.minecraft.util.text.ITextComponent> |
getTooltipStrings(DebugRecipe recipe,
double mouseX,
double mouseY)
Get the tooltip for whatever's under the mouse.
|
net.minecraft.util.ResourceLocation |
getUid()
Returns a unique ID for this recipe category.
|
boolean |
handleClick(DebugRecipe recipe,
double mouseX,
double mouseY,
int mouseButton)
Called when a player clicks the recipe.
|
void |
setIngredients(DebugRecipe recipe,
IIngredients ingredients)
Sets all the recipe's ingredients by filling out an instance of
IIngredients . |
void |
setRecipe(IRecipeLayout recipeLayout,
DebugRecipe recipe,
IIngredients ingredients)
Set the
IRecipeLayout properties from the recipe. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isHandled
public static final net.minecraft.util.ResourceLocation UID
public static final int RECIPE_WIDTH
public static final int RECIPE_HEIGHT
public DebugRecipeCategory(IGuiHelper guiHelper)
public net.minecraft.util.ResourceLocation getUid()
IRecipeCategory
getUid
in interface IRecipeCategory<DebugRecipe>
for vanilla examples
public java.lang.Class<? extends DebugRecipe> getRecipeClass()
getRecipeClass
in interface IRecipeCategory<DebugRecipe>
@Deprecated public java.lang.String getTitle()
IRecipeCategory
getTitle
in interface IRecipeCategory<DebugRecipe>
public net.minecraft.util.text.ITextComponent getTitleAsTextComponent()
IRecipeCategory
getTitleAsTextComponent
in interface IRecipeCategory<DebugRecipe>
public IDrawable getBackground()
IRecipeCategory
getBackground
in interface IRecipeCategory<DebugRecipe>
public IDrawable getIcon()
IRecipeCategory
IGuiHelper.createDrawableIngredient(Object)
to create a drawable from an ingredient.getIcon
in interface IRecipeCategory<DebugRecipe>
public void setIngredients(DebugRecipe recipe, IIngredients ingredients)
IRecipeCategory
IIngredients
.
This is used by JEI for lookups, to figure out what ingredients are inputs and outputs for a recipe.setIngredients
in interface IRecipeCategory<DebugRecipe>
public void draw(DebugRecipe recipe, com.mojang.blaze3d.matrix.MatrixStack matrixStack, double mouseX, double mouseY)
IRecipeCategory
IRecipeCategory.getTooltipStrings(Object, double, double)
draw
in interface IRecipeCategory<DebugRecipe>
mouseX
- the X position of the mouse, relative to the recipe.mouseY
- the Y position of the mouse, relative to the recipe.for a simple class for drawing things.
,
for useful functions.
public void setRecipe(IRecipeLayout recipeLayout, DebugRecipe recipe, IIngredients ingredients)
IRecipeCategory
IRecipeLayout
properties from the recipe.setRecipe
in interface IRecipeCategory<DebugRecipe>
recipeLayout
- the layout that needs its properties set.recipe
- the recipe, for extra information.ingredients
- the ingredients, already set earlier by IRecipeCategory.setIngredients(T, mezz.jei.api.ingredients.IIngredients)
public java.util.List<net.minecraft.util.text.ITextComponent> getTooltipStrings(DebugRecipe recipe, double mouseX, double mouseY)
IRecipeCategory
IGuiIngredientGroup.addTooltipCallback(ITooltipCallback)
getTooltipStrings
in interface IRecipeCategory<DebugRecipe>
mouseX
- the X position of the mouse, relative to the recipe.mouseY
- the Y position of the mouse, relative to the recipe.public boolean handleClick(DebugRecipe recipe, double mouseX, double mouseY, int mouseButton)
IRecipeCategory
handleClick
in interface IRecipeCategory<DebugRecipe>
mouseX
- the X position of the mouse, relative to the recipe.mouseY
- the Y position of the mouse, relative to the recipe.mouseButton
- the current mouse event button.