Package guideme.style
Record Class ResolvedTextStyle
java.lang.Object
java.lang.Record
guideme.style.ResolvedTextStyle
public record ResolvedTextStyle(float fontScale, boolean bold, boolean italic, boolean underlined, boolean strikethrough, boolean obfuscated, net.minecraft.network.chat.FontDescription font, ColorValue color, WhiteSpaceMode whiteSpace, TextAlignment alignment, boolean dropShadow)
extends Record
Represents the styling of text for rendering.
-
Constructor Summary
ConstructorsConstructorDescriptionResolvedTextStyle(float fontScale, boolean bold, boolean italic, boolean underlined, boolean strikethrough, boolean obfuscated, net.minecraft.network.chat.FontDescription font, ColorValue color, WhiteSpaceMode whiteSpace, TextAlignment alignment, boolean dropShadow) Creates an instance of aResolvedTextStylerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealignmentrecord component.booleanbold()Returns the value of theboldrecord component.color()Returns the value of thecolorrecord component.booleanReturns the value of thedropShadowrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.network.chat.FontDescriptionfont()Returns the value of thefontrecord component.floatReturns the value of thefontScalerecord component.final inthashCode()Returns a hash code value for this object.booleanitalic()Returns the value of theitalicrecord component.booleanReturns the value of theobfuscatedrecord component.booleanReturns the value of thestrikethroughrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theunderlinedrecord component.Returns the value of thewhiteSpacerecord component.
-
Constructor Details
-
ResolvedTextStyle
public ResolvedTextStyle(float fontScale, boolean bold, boolean italic, boolean underlined, boolean strikethrough, boolean obfuscated, net.minecraft.network.chat.FontDescription font, ColorValue color, WhiteSpaceMode whiteSpace, TextAlignment alignment, boolean dropShadow) Creates an instance of aResolvedTextStylerecord class.- Parameters:
fontScale- the value for thefontScalerecord componentbold- the value for theboldrecord componentitalic- the value for theitalicrecord componentunderlined- the value for theunderlinedrecord componentstrikethrough- the value for thestrikethroughrecord componentobfuscated- the value for theobfuscatedrecord componentfont- the value for thefontrecord componentcolor- the value for thecolorrecord componentwhiteSpace- the value for thewhiteSpacerecord componentalignment- the value for thealignmentrecord componentdropShadow- the value for thedropShadowrecord component
-
-
Method Details
-
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 '=='. -
fontScale
public float fontScale()Returns the value of thefontScalerecord component.- Returns:
- the value of the
fontScalerecord component
-
bold
public boolean bold()Returns the value of theboldrecord component.- Returns:
- the value of the
boldrecord component
-
italic
public boolean italic()Returns the value of theitalicrecord component.- Returns:
- the value of the
italicrecord component
-
underlined
public boolean underlined()Returns the value of theunderlinedrecord component.- Returns:
- the value of the
underlinedrecord component
-
strikethrough
public boolean strikethrough()Returns the value of thestrikethroughrecord component.- Returns:
- the value of the
strikethroughrecord component
-
obfuscated
public boolean obfuscated()Returns the value of theobfuscatedrecord component.- Returns:
- the value of the
obfuscatedrecord component
-
font
public net.minecraft.network.chat.FontDescription font()Returns the value of thefontrecord component.- Returns:
- the value of the
fontrecord component
-
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
whiteSpace
Returns the value of thewhiteSpacerecord component.- Returns:
- the value of the
whiteSpacerecord component
-
alignment
Returns the value of thealignmentrecord component.- Returns:
- the value of the
alignmentrecord component
-
dropShadow
public boolean dropShadow()Returns the value of thedropShadowrecord component.- Returns:
- the value of the
dropShadowrecord component
-