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.resources.ResourceLocation font, ColorValue color, WhiteSpaceMode whiteSpace, TextAlignment alignment, boolean dropShadow)
extends Record
Represents the styling of text for rendering.
-
Constructor Summary
ConstructorDescriptionResolvedTextStyle
(float fontScale, boolean bold, boolean italic, boolean underlined, boolean strikethrough, boolean obfuscated, net.minecraft.resources.ResourceLocation font, ColorValue color, WhiteSpaceMode whiteSpace, TextAlignment alignment, boolean dropShadow) Creates an instance of aResolvedTextStyle
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealignment
record component.boolean
bold()
Returns the value of thebold
record component.color()
Returns the value of thecolor
record component.boolean
Returns the value of thedropShadow
record component.final boolean
Indicates whether some other object is "equal to" this one.net.minecraft.resources.ResourceLocation
font()
Returns the value of thefont
record component.float
Returns the value of thefontScale
record component.final int
hashCode()
Returns a hash code value for this object.boolean
italic()
Returns the value of theitalic
record component.boolean
Returns the value of theobfuscated
record component.boolean
Returns the value of thestrikethrough
record component.final String
toString()
Returns a string representation of this record class.boolean
Returns the value of theunderlined
record component.Returns the value of thewhiteSpace
record component.
-
Constructor Details
-
ResolvedTextStyle
public ResolvedTextStyle(float fontScale, boolean bold, boolean italic, boolean underlined, boolean strikethrough, boolean obfuscated, net.minecraft.resources.ResourceLocation font, ColorValue color, WhiteSpaceMode whiteSpace, TextAlignment alignment, boolean dropShadow) Creates an instance of aResolvedTextStyle
record class.- Parameters:
fontScale
- the value for thefontScale
record componentbold
- the value for thebold
record componentitalic
- the value for theitalic
record componentunderlined
- the value for theunderlined
record componentstrikethrough
- the value for thestrikethrough
record componentobfuscated
- the value for theobfuscated
record componentfont
- the value for thefont
record componentcolor
- the value for thecolor
record componentwhiteSpace
- the value for thewhiteSpace
record componentalignment
- the value for thealignment
record componentdropShadow
- the value for thedropShadow
record 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 thefontScale
record component.- Returns:
- the value of the
fontScale
record component
-
bold
public boolean bold()Returns the value of thebold
record component.- Returns:
- the value of the
bold
record component
-
italic
public boolean italic()Returns the value of theitalic
record component.- Returns:
- the value of the
italic
record component
-
underlined
public boolean underlined()Returns the value of theunderlined
record component.- Returns:
- the value of the
underlined
record component
-
strikethrough
public boolean strikethrough()Returns the value of thestrikethrough
record component.- Returns:
- the value of the
strikethrough
record component
-
obfuscated
public boolean obfuscated()Returns the value of theobfuscated
record component.- Returns:
- the value of the
obfuscated
record component
-
font
public net.minecraft.resources.ResourceLocation font()Returns the value of thefont
record component.- Returns:
- the value of the
font
record component
-
color
Returns the value of thecolor
record component.- Returns:
- the value of the
color
record component
-
whiteSpace
Returns the value of thewhiteSpace
record component.- Returns:
- the value of the
whiteSpace
record component
-
alignment
Returns the value of thealignment
record component.- Returns:
- the value of the
alignment
record component
-
dropShadow
public boolean dropShadow()Returns the value of thedropShadow
record component.- Returns:
- the value of the
dropShadow
record component
-