Record Class SectionColored
java.lang.Object
java.lang.Record
net.mcexpanded.fancytabsections.Section.SectionColored
- All Implemented Interfaces:
Section
public record SectionColored(net.minecraft.resources.ResourceLocation id, net.minecraft.network.chat.Component title, int bannerColor, int textColor, boolean textShadow, boolean collapsible, ConglomerateOfItems items)
extends Record
implements Section
-
Constructor Summary
ConstructorsConstructorDescriptionSectionColored(net.minecraft.resources.ResourceLocation id, net.minecraft.network.chat.Component title, int bannerColor, int textColor, boolean textShadow, boolean collapsible, ConglomerateOfItems items) Creates an instance of aSectionColoredrecord class.SectionColored(net.minecraft.resources.ResourceLocation id, net.minecraft.network.chat.Component title, int bannerColor, int textColor, ConglomerateOfItems items) -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebannerColorrecord component.booleanReturns the value of thecollapsiblerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationid()Returns the value of theidrecord component.items()Returns the value of theitemsrecord component.voidrender(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font font, int topLeftX, int topLeftY) intReturns the value of thetextColorrecord component.booleanReturns the value of thetextShadowrecord component.net.minecraft.network.chat.Componenttitle()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SectionColored
public SectionColored(net.minecraft.resources.ResourceLocation id, net.minecraft.network.chat.Component title, int bannerColor, int textColor, ConglomerateOfItems items) -
SectionColored
public SectionColored(net.minecraft.resources.ResourceLocation id, net.minecraft.network.chat.Component title, int bannerColor, int textColor, boolean textShadow, boolean collapsible, ConglomerateOfItems items) Creates an instance of aSectionColoredrecord class.- Parameters:
id- the value for theidrecord componenttitle- the value for thetitlerecord componentbannerColor- the value for thebannerColorrecord componenttextColor- the value for thetextColorrecord componenttextShadow- the value for thetextShadowrecord componentcollapsible- the value for thecollapsiblerecord componentitems- the value for theitemsrecord component
-
-
Method Details
-
render
public void render(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font font, int topLeftX, int topLeftY) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
public net.minecraft.resources.ResourceLocation id()Returns the value of theidrecord component. -
title
public net.minecraft.network.chat.Component title()Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
bannerColor
public int bannerColor()Returns the value of thebannerColorrecord component.- Returns:
- the value of the
bannerColorrecord component
-
textColor
public int textColor()Returns the value of thetextColorrecord component.- Returns:
- the value of the
textColorrecord component
-
textShadow
public boolean textShadow()Returns the value of thetextShadowrecord component.- Returns:
- the value of the
textShadowrecord component
-
collapsible
public boolean collapsible()Returns the value of thecollapsiblerecord component.- Specified by:
collapsiblein interfaceSection- Returns:
- the value of the
collapsiblerecord component
-
items
Returns the value of theitemsrecord component.
-