Package jeresources.jei.mob
Class MobWrapper
java.lang.Object
jeresources.jei.mob.MobWrapper
- All Implemented Interfaces:
mezz.jei.api.gui.ingredient.ITooltipCallback<net.minecraft.world.item.ItemStack>,mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension
public class MobWrapper
extends Object
implements mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension, mezz.jei.api.gui.ingredient.ITooltipCallback<net.minecraft.world.item.ItemStack>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddrawInfo(int recipeWidth, int recipeHeight, com.mojang.blaze3d.vertex.PoseStack poseStack, double mouseX, double mouseY)Draw additional info about the recipe.LootDrop[]getDrops()net.minecraft.world.entity.LivingEntitygetMob()net.minecraft.world.item.ItemStackList<net.minecraft.network.chat.Component>getToolTip(net.minecraft.world.item.ItemStack stack)List<net.minecraft.network.chat.Component>getTooltipStrings(double mouseX, double mouseY)Get the tooltip for whatever's under the mouse.booleanvoidonTooltip(int slotIndex, boolean input, net.minecraft.world.item.ItemStack ingredient, List<net.minecraft.network.chat.Component> tooltip)Change the tooltip for an ingredient.voidsetIngredients(mezz.jei.api.ingredients.IIngredients ingredients)Gets 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.extensions.IRecipeCategoryExtension
handleClick, handleInput
-
Constructor Details
-
MobWrapper
-
-
Method Details
-
setIngredients
public void setIngredients(@Nonnull mezz.jei.api.ingredients.IIngredients ingredients)Description copied from interface:mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtensionGets all the recipe's ingredients by filling out an instance ofIIngredients.- Specified by:
setIngredientsin interfacemezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension
-
getDrops
-
drawInfo
public void drawInfo(int recipeWidth, int recipeHeight, com.mojang.blaze3d.vertex.PoseStack poseStack, double mouseX, double mouseY)Description copied from interface:mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtensionDraw additional info about the recipe. Use the mouse position for things like button highlights. Tooltips are handled byIRecipeCategoryExtension.getTooltipStrings(double, double)- Specified by:
drawInfoin interfacemezz.jei.api.recipe.category.extensions.IRecipeCategoryExtensionmouseX- 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
Description copied from interface:mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtensionGet the tooltip for whatever's under the mouse. ItemStack and fluid tooltips are already handled by JEI, this is for anything else. To add to ingredient tooltips, seeIGuiIngredientGroup.addTooltipCallback(ITooltipCallback)To add tooltips for a recipe category, seeIRecipeCategory.getTooltipStrings(Object, double, double)- Specified by:
getTooltipStringsin interfacemezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension- Parameters:
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.
-
onTooltip
public void onTooltip(int slotIndex, boolean input, net.minecraft.world.item.ItemStack ingredient, List<net.minecraft.network.chat.Component> tooltip)Description copied from interface:mezz.jei.api.gui.ingredient.ITooltipCallbackChange the tooltip for an ingredient.- Specified by:
onTooltipin interfacemezz.jei.api.gui.ingredient.ITooltipCallback<net.minecraft.world.item.ItemStack>
-
getMob
public net.minecraft.world.entity.LivingEntity getMob() -
getToolTip
public List<net.minecraft.network.chat.Component> getToolTip(net.minecraft.world.item.ItemStack stack) -
hasSpawnEgg
public boolean hasSpawnEgg() -
getSpawnEgg
public net.minecraft.world.item.ItemStack getSpawnEgg()
-