Record Class BakedGlyph.GlyphInstance
java.lang.Object
java.lang.Record
net.minecraft.client.gui.font.glyphs.BakedGlyph.GlyphInstance
- Enclosing class:
BakedGlyph
public static record BakedGlyph.GlyphInstance(float x, float y, int color, int shadowColor, BakedGlyph glyph, Style style, float boldOffset, float shadowOffset)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatThe field for theboldOffsetrecord component.private final intThe field for thecolorrecord component.private final BakedGlyphThe field for theglyphrecord component.private final intThe field for theshadowColorrecord component.private final floatThe field for theshadowOffsetrecord component.private final StyleThe field for thestylerecord component.private final floatThe field for thexrecord component.private final floatThe field for theyrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionGlyphInstance(float x, float y, int color, int shadowColor, BakedGlyph glyph, Style style, float boldOffset, float shadowOffset) Creates an instance of aGlyphInstancerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of theboldOffsetrecord component.intcolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.glyph()Returns the value of theglyphrecord component.final inthashCode()Returns a hash code value for this object.(package private) booleanintReturns the value of theshadowColorrecord component.floatReturns the value of theshadowOffsetrecord component.style()Returns the value of thestylerecord component.final StringtoString()Returns a string representation of this record class.floatx()Returns the value of thexrecord component.floaty()Returns the value of theyrecord component.
-
Field Details
-
x
private final float xThe field for thexrecord component. -
y
private final float yThe field for theyrecord component. -
color
private final int colorThe field for thecolorrecord component. -
shadowColor
private final int shadowColorThe field for theshadowColorrecord component. -
glyph
The field for theglyphrecord component. -
style
The field for thestylerecord component. -
boldOffset
private final float boldOffsetThe field for theboldOffsetrecord component. -
shadowOffset
private final float shadowOffsetThe field for theshadowOffsetrecord component.
-
-
Constructor Details
-
GlyphInstance
public GlyphInstance(float x, float y, int color, int shadowColor, BakedGlyph glyph, Style style, float boldOffset, float shadowOffset) Creates an instance of aGlyphInstancerecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentcolor- the value for thecolorrecord componentshadowColor- the value for theshadowColorrecord componentglyph- the value for theglyphrecord componentstyle- the value for thestylerecord componentboldOffset- the value for theboldOffsetrecord componentshadowOffset- the value for theshadowOffsetrecord component
-
-
Method Details
-
hasShadow
boolean hasShadow() -
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 '=='. -
x
public float x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public float y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
color
public int color()Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
shadowColor
public int shadowColor()Returns the value of theshadowColorrecord component.- Returns:
- the value of the
shadowColorrecord component
-
glyph
Returns the value of theglyphrecord component.- Returns:
- the value of the
glyphrecord component
-
style
Returns the value of thestylerecord component.- Returns:
- the value of the
stylerecord component
-
boldOffset
public float boldOffset()Returns the value of theboldOffsetrecord component.- Returns:
- the value of the
boldOffsetrecord component
-
shadowOffset
public float shadowOffset()Returns the value of theshadowOffsetrecord component.- Returns:
- the value of the
shadowOffsetrecord component
-