Class JEIPressureChamberRecipeCategory
java.lang.Object
me.desht.pneumaticcraft.common.thirdparty.jei.AbstractPNCCategory<PressureChamberRecipe>
me.desht.pneumaticcraft.common.thirdparty.jei.JEIPressureChamberRecipeCategory
- All Implemented Interfaces:
mezz.jei.api.recipe.category.IRecipeCategory<PressureChamberRecipe>
-
Method Summary
Modifier and TypeMethodDescriptionapplyOverrides(boolean isInput, List<List<net.minecraft.world.item.ItemStack>> slotCycles, Map<PressureChamberRecipe.RecipeSlot, List<Integer>> slotCycleOverrides) voiddraw(PressureChamberRecipe recipe, mezz.jei.api.gui.ingredient.IRecipeSlotsView recipeSlotsView, com.mojang.blaze3d.vertex.PoseStack matrixStack, double mouseX, double mouseY) Draw extras or additional info about the recipe.protected static Optional<PressureChamberRecipe.SlotCycle>getMatchingCycle(PressureChamberRecipe recipe, mezz.jei.api.recipe.IFocus<net.minecraft.world.item.ItemStack> focus) Looks for the first slot that has more than one stack and has a match for the given item ignoring NBT.List<net.minecraft.network.chat.Component>getTooltipStrings(PressureChamberRecipe recipe, mezz.jei.api.gui.ingredient.IRecipeSlotsView recipeSlotsView, double mouseX, double mouseY) Get the tooltip for whatever is under the mouse.voidsetRecipe(mezz.jei.api.gui.builder.IRecipeLayoutBuilder builder, PressureChamberRecipe recipe, mezz.jei.api.recipe.IFocusGroup focuses) Sets all the recipe's ingredients by filling out an instance ofIRecipeLayoutBuilder.Methods inherited from class me.desht.pneumaticcraft.common.thirdparty.jei.AbstractPNCCategory
getBackground, getIcon, getRecipeClass, getRecipeType, getTitle, getUidMethods 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
draw, getRegistryName, getTooltipStrings, handleClick, handleInput, isHandled, setIngredients, setRecipe, setRecipe
-
Method Details
-
getMatchingCycle
protected static Optional<PressureChamberRecipe.SlotCycle> getMatchingCycle(PressureChamberRecipe recipe, mezz.jei.api.recipe.IFocus<net.minecraft.world.item.ItemStack> focus) Looks for the first slot that has more than one stack and has a match for the given item ignoring NBT.- Returns:
- empty iff no match was found in a slot with more than one stack, or the matching slot cycle otherwise.
-
applyOverrides
protected static List<List<net.minecraft.world.item.ItemStack>> applyOverrides(boolean isInput, List<List<net.minecraft.world.item.ItemStack>> slotCycles, Map<PressureChamberRecipe.RecipeSlot, List<Integer>> slotCycleOverrides) - Returns:
- slot cycles with the overrides applied if applicable.
-
setRecipe
public void setRecipe(mezz.jei.api.gui.builder.IRecipeLayoutBuilder builder, PressureChamberRecipe recipe, mezz.jei.api.recipe.IFocusGroup focuses) Description copied from interface:mezz.jei.api.recipe.category.IRecipeCategorySets all the recipe's ingredients by filling out an instance ofIRecipeLayoutBuilder. This is used by JEI for lookups, to figure out what ingredients are inputs and outputs for a recipe. -
draw
public void draw(PressureChamberRecipe recipe, mezz.jei.api.gui.ingredient.IRecipeSlotsView recipeSlotsView, com.mojang.blaze3d.vertex.PoseStack matrixStack, 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, IRecipeSlotsView, double, double)- Parameters:
recipe- the current recipe being drawn.recipeSlotsView- a view of the current recipe slots being drawn.matrixStack- the currentPoseStackfor rendering.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.for information about the ingredients that are currently being drawn.
-
getTooltipStrings
public List<net.minecraft.network.chat.Component> getTooltipStrings(PressureChamberRecipe recipe, mezz.jei.api.gui.ingredient.IRecipeSlotsView recipeSlotsView, double mouseX, double mouseY) Description copied from interface:mezz.jei.api.recipe.category.IRecipeCategoryGet the tooltip for whatever is under the mouse. Ingredient tooltips are already handled by JEI, this is for anything else. To add to ingredient tooltips, seeIRecipeSlotBuilder.addTooltipCallback(IRecipeSlotTooltipCallback)- Parameters:
recipe- the current recipe being drawn.recipeSlotsView- a view of the current recipe slots being drawn.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.
-