Record Class ProfessionWrapper
java.lang.Object
java.lang.Record
com.mrbysco.justenoughprofessions.jei.ProfessionWrapper
- Record Components:
entry- The profession 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 profession 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.GuiGraphics 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 profession name for display.net.minecraft.resources.ResourceLocationGet the profession 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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension
createRecipeExtras, createRecipeExtras, drawInfo, getTooltip, getTooltipStrings, getTooltipStrings, handleInput, handleInput, isHandled
-
Constructor Details
-
ProfessionWrapper
Creates an instance of aProfessionWrapperrecord class.- Parameters:
entry- the value for theentryrecord component
-
-
Method Details
-
getProfessionName
public net.minecraft.resources.ResourceLocation getProfessionName()Get the profession name for the recipe.- Returns:
- the profession name for the recipe.
-
getDisplayName
public net.minecraft.network.chat.Component getDisplayName()Get the profession name for display.- Returns:
- the profession 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.GuiGraphics 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
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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
Returns the value of theentryrecord component.- Returns:
- the value of the
entryrecord component
-