Record Class BakedSheetGlyph.GlyphInstance
java.lang.Object
java.lang.Record
net.minecraft.client.gui.font.glyphs.BakedSheetGlyph.GlyphInstance
- All Implemented Interfaces:
TextRenderable
- Enclosing class:
BakedSheetGlyph
static record BakedSheetGlyph.GlyphInstance(float x, float y, int color, int shadowColor, BakedSheetGlyph glyph, Style style, float boldOffset, float shadowOffset)
extends Record
implements TextRenderable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatThe field for theboldOffsetrecord component.private final intThe field for thecolorrecord component.private final BakedSheetGlyphThe 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, BakedSheetGlyph glyph, Style style, float boldOffset, float shadowOffset) Creates an instance of aGlyphInstancerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of theboldOffsetrecord component.floatbottom()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) booleanfloatleft()voidrender(Matrix4f p_439203_, VertexConsumer p_440403_, int p_439729_, boolean p_439133_) renderType(Font.DisplayMode p_439720_) Deprecated.renderType(Font.DisplayMode p_181388_, boolean blur) Neo: returns theRenderTypeto use for the givenFont.DisplayModeand blur settingfloatright()intReturns the value of theshadowColorrecord component.floatReturns the value of theshadowOffsetrecord component.style()Returns the value of thestylerecord component.floattop()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
GlyphInstance(float x, float y, int color, int shadowColor, BakedSheetGlyph 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
-
left
public float left()- Specified by:
leftin interfaceTextRenderable
-
top
public float top()- Specified by:
topin interfaceTextRenderable
-
right
public float right()- Specified by:
rightin interfaceTextRenderable
-
bottom
public float bottom()- Specified by:
bottomin interfaceTextRenderable
-
hasShadow
boolean hasShadow() -
render
- Specified by:
renderin interfaceTextRenderable
-
renderType
Neo: returns theRenderTypeto use for the givenFont.DisplayModeand blur setting- Specified by:
renderTypein interfaceTextRenderable
-
renderType
Deprecated.Neo: UserenderType(Font.DisplayMode, boolean)instead- Specified by:
renderTypein interfaceTextRenderable
-
textureView
- Specified by:
textureViewin interfaceTextRenderable
-
guiPipeline
- Specified by:
guiPipelinein interfaceTextRenderable
-
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
-
renderType(Font.DisplayMode, boolean)instead