Package com.mrbysco.emiprofessions.emi
Record Class ProfessionWrapper
java.lang.Object
java.lang.Record
com.mrbysco.emiprofessions.emi.ProfessionWrapper
- All Implemented Interfaces:
dev.emi.emi.api.widget.DrawableWidget.DrawableWidgetConsumer
public record ProfessionWrapper(ProfessionEntry entry)
extends Record
implements dev.emi.emi.api.widget.DrawableWidget.DrawableWidgetConsumer
-
Constructor Summary
ConstructorsConstructorDescriptionProfessionWrapper(ProfessionEntry entry) Creates an instance of aProfessionWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionentry()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.voidrender(net.minecraft.client.gui.GuiGraphics draw, int mouseX, int mouseY, float delta) final StringtoString()Returns a string representation of this record class.
-
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:
-
getDisplayName
public net.minecraft.network.chat.Component getDisplayName()Get the profession name for display.- Returns:
-
getBlockStacks
Get the ItemStacks that represent the blocks in the recipe.- Returns:
- a list of ItemStacks for the blocks in the recipe.
-
render
public void render(net.minecraft.client.gui.GuiGraphics draw, int mouseX, int mouseY, float delta) - Specified by:
renderin interfacedev.emi.emi.api.widget.DrawableWidget.DrawableWidgetConsumer
-
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
-