Record Class ProfessionWrapper
java.lang.Object
java.lang.Record
com.mrbysco.justenoughprofessions.jei.ProfessionWrapper
- Record Components:
entry- The professionHolder entry for the recipe.
- All Implemented Interfaces:
mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension<ProfessionWrapper>
public record ProfessionWrapper(ProfessionEntry entry)
extends Record
implements mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension<ProfessionWrapper>
A wrapper class for the professionHolder recipe.
-
Constructor Summary
ConstructorsConstructorDescriptionProfessionWrapper(ProfessionEntry entry) Creates an instance of aProfessionWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoiddrawInfo(ProfessionWrapper recipe, int recipeWidth, int recipeHeight, net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, double mouseX, double mouseY) Get the ItemStacks that represent the items in the recipe.entry()Returns the value of theentryrecord component.final booleanIndicates whether some other object is "equal to" this one.List<net.minecraft.world.item.ItemStack> Get the ItemStacks that represent the blocks in the recipe.net.minecraft.network.chat.ComponentGet the professionHolder name for display.net.minecraft.resources.IdentifierGet the professionHolder name for the recipe.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.Methods inherited from interface mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension
createRecipeExtras, getTooltip, isHandled
-
Constructor Details
-
ProfessionWrapper
Creates an instance of aProfessionWrapperrecord class.- Parameters:
entry- the value for theentryrecord component
-
-
Method Details
-
getProfessionName
public net.minecraft.resources.Identifier getProfessionName()Get the professionHolder name for the recipe.- Returns:
- the professionHolder name for the recipe.
-
getDisplayName
public net.minecraft.network.chat.Component getDisplayName()Get the professionHolder name for display.- Returns:
- the professionHolder name for display.
-
getBlockStacks
Get the ItemStacks that represent the blocks in the recipe.- Returns:
- a list of ItemStacks for the blocks in the recipe.
-
drawInfo
public void drawInfo(ProfessionWrapper recipe, int recipeWidth, int recipeHeight, net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, double mouseX, double mouseY) Get the ItemStacks that represent the items in the recipe.- Specified by:
drawInfoin interfacemezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension<ProfessionWrapper>- Parameters:
recipe- The recipe to get the items from.recipeWidth- The width of the recipe.recipeHeight- The height of the recipe.guiGraphics- The GuiGraphics instance.mouseX- the X position of the mouse, relative to the recipe.mouseY- the Y position of the mouse, relative to the recipe.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
entry
-