Record Class ResearchSelectorListWidget.Element.SimpleElement
java.lang.Object
java.lang.Record
com.portingdeadmods.researchd.client.screens.editor.widgets.ResearchSelectorListWidget.Element.SimpleElement
- All Implemented Interfaces:
ResearchSelectorListWidget.Element
- Enclosing interface:
ResearchSelectorListWidget.Element
public static record ResearchSelectorListWidget.Element.SimpleElement(net.minecraft.resources.ResourceKey<Research> researchKey, Research research)
extends Record
implements ResearchSelectorListWidget.Element
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.portingdeadmods.researchd.client.screens.editor.widgets.ResearchSelectorListWidget.Element
ResearchSelectorListWidget.Element.SelectorElement, ResearchSelectorListWidget.Element.SimpleElement -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocationFields inherited from interface com.portingdeadmods.researchd.client.screens.editor.widgets.ResearchSelectorListWidget.Element
SPRITES -
Constructor Summary
ConstructorsConstructorDescriptionSimpleElement(net.minecraft.resources.ResourceKey<Research> researchKey, Research research) Creates an instance of aSimpleElementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.voidrender(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int width, int height, boolean hovered, int mouseX, int mouseY, float partialTick) research()Returns the value of theresearchrecord component.net.minecraft.resources.ResourceKey<Research> Returns the value of theresearchKeyrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
REMOVE_ELEMENT_HOVER_SPRITE
public static final net.minecraft.resources.ResourceLocation REMOVE_ELEMENT_HOVER_SPRITE
-
-
Constructor Details
-
SimpleElement
Creates an instance of aSimpleElementrecord class.- Parameters:
researchKey- the value for theresearchKeyrecord componentresearch- the value for theresearchrecord component
-
-
Method Details
-
render
public void render(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int width, int height, boolean hovered, int mouseX, int mouseY, float partialTick) - Specified by:
renderin interfaceResearchSelectorListWidget.Element
-
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). -
researchKey
Returns the value of theresearchKeyrecord component.- Returns:
- the value of the
researchKeyrecord component
-
research
Returns the value of theresearchrecord component.- Returns:
- the value of the
researchrecord component
-