Package jeresources.jei
Class BlankJEIRecipeCategory<T extends mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension>
java.lang.Object
jeresources.jei.BlankJEIRecipeCategory<T>
- All Implemented Interfaces:
mezz.jei.api.recipe.category.IRecipeCategory<T>
- Direct Known Subclasses:
DungeonCategory,EnchantmentCategory,MobCategory,PlantCategory,VillagerCategory,WorldGenCategory
public abstract class BlankJEIRecipeCategory<T extends mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension>
extends Object
implements mezz.jei.api.recipe.category.IRecipeCategory<T>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBlankJEIRecipeCategory(mezz.jei.api.gui.drawable.IDrawable icon) -
Method Summary
Modifier and TypeMethodDescriptionvoidDraw extras or additional info about the recipe.mezz.jei.api.gui.drawable.IDrawablegetIcon()Icon for the category tab.List<net.minecraft.network.chat.Component>getTooltipStrings(T recipe, double mouseX, double mouseY)Get the tooltip for whatever's under the mouse.voidsetIngredients(T recipe, mezz.jei.api.ingredients.IIngredients ingredients)Sets all the recipe's ingredients by filling out an instance ofIIngredients.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface mezz.jei.api.recipe.category.IRecipeCategory
getBackground, getRecipeClass, getTitle, getUid, handleClick, handleInput, isHandled, setRecipe
-
Constructor Details
-
BlankJEIRecipeCategory
protected BlankJEIRecipeCategory(mezz.jei.api.gui.drawable.IDrawable icon)
-
-
Method Details
-
getIcon
@Nullable public mezz.jei.api.gui.drawable.IDrawable getIcon()Description copied from interface:mezz.jei.api.recipe.category.IRecipeCategoryIcon for the category tab. You can useIGuiHelper.createDrawableIngredient(Object)to create a drawable from an ingredient.- Specified by:
getIconin interfacemezz.jei.api.recipe.category.IRecipeCategory<T extends mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension>- Returns:
- icon to draw on the category tab, max size is 16x16 pixels.
-
setIngredients
Description copied from interface:mezz.jei.api.recipe.category.IRecipeCategorySets all the recipe's ingredients by filling out an instance ofIIngredients. This is used by JEI for lookups, to figure out what ingredients are inputs and outputs for a recipe.- Specified by:
setIngredientsin interfacemezz.jei.api.recipe.category.IRecipeCategory<T extends mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension>
-
draw
public void draw(T recipe, com.mojang.blaze3d.vertex.PoseStack poseStack, double mouseX, double mouseY)Description copied from interface:mezz.jei.api.recipe.category.IRecipeCategoryDraw extras or additional info about the recipe. Use the mouse position for things like button highlights. Tooltips are handled byIRecipeCategory.getTooltipStrings(Object, double, double)- Specified by:
drawin interfacemezz.jei.api.recipe.category.IRecipeCategory<T extends mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension>mouseX- the X position of the mouse, relative to the recipe.mouseY- the Y position of the mouse, relative to the recipe.- See Also:
for a simple class for drawing things.,for useful functions.
-
getTooltipStrings
public List<net.minecraft.network.chat.Component> getTooltipStrings(T recipe, double mouseX, double mouseY)Description copied from interface:mezz.jei.api.recipe.category.IRecipeCategoryGet the tooltip for whatever's under the mouse. Ingredient tooltips are already handled by JEI, this is for anything else. To add to ingredient tooltips, seeIGuiIngredientGroup.addTooltipCallback(ITooltipCallback)- Specified by:
getTooltipStringsin interfacemezz.jei.api.recipe.category.IRecipeCategory<T extends mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension>mouseX- the X position of the mouse, relative to the recipe.mouseY- the Y position of the mouse, relative to the recipe.- Returns:
- tooltip strings. If there is no tooltip at this position, return an empty list.
-