Record Class PlayerGlyphProvider.Instance
java.lang.Object
java.lang.Record
net.minecraft.client.gui.font.PlayerGlyphProvider.Instance
- All Implemented Interfaces:
ActiveArea, PlainTextRenderable, TextRenderable, TextRenderable.Styled
- Enclosing class:
PlayerGlyphProvider
private static record PlayerGlyphProvider.Instance(Supplier<PlayerSkinRenderCache.RenderInfo> skin, boolean hat, float x, float y, int color, int shadowColor, float shadowOffset, Style style)
extends Record
implements PlainTextRenderable
-
Nested Class Summary
Nested classes/interfaces inherited from interface TextRenderable
TextRenderable.Styled -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thecolorrecord component.private final booleanThe field for thehatrecord component.private final intThe field for theshadowColorrecord component.private final floatThe field for theshadowOffsetrecord component.private final Supplier<PlayerSkinRenderCache.RenderInfo> The field for theskinrecord component.private final StyleThe field for thestylerecord component.private final floatThe field for thexrecord component.private final floatThe field for theyrecord component.Fields inherited from interface PlainTextRenderable
DEFAULT_HEIGHT, DEFAULT_WIDTH, DEFUAULT_ASCENT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateInstance(Supplier<PlayerSkinRenderCache.RenderInfo> skin, boolean hat, float x, float y, int color, int shadowColor, float shadowOffset, Style style) Creates an instance of aInstancerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanhat()Returns the value of thehatrecord component.private static voidrenderQuad(Matrix4f pose, VertexConsumer buffer, int packedLightCoords, float x0, float x1, float y0, float y1, float z, int color, float u, float v, int srcWidth, int srcHeight, int textureWidth, int textureHeight) voidrenderSprite(Matrix4f pose, VertexConsumer buffer, int packedLightCoords, float offsetX, float offsetY, float z, int color) renderType(Font.DisplayMode displayMode) intReturns the value of theshadowColorrecord component.floatReturns the value of theshadowOffsetrecord component.skin()Returns the value of theskinrecord 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.Methods inherited from interface PlainTextRenderable
ascent, bottom, height, left, render, right, top, widthMethods inherited from interface TextRenderable
renderTypeMethods inherited from interface TextRenderable.Styled
activeBottom, activeLeft, activeRight, activeTop
-
Field Details
-
skin
The field for theskinrecord component. -
hat
private final boolean hatThe field for thehatrecord component. -
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. -
shadowOffset
private final float shadowOffsetThe field for theshadowOffsetrecord component. -
style
The field for thestylerecord component.
-
-
Constructor Details
-
Instance
private Instance(Supplier<PlayerSkinRenderCache.RenderInfo> skin, boolean hat, float x, float y, int color, int shadowColor, float shadowOffset, Style style) Creates an instance of aInstancerecord class.- Parameters:
skin- the value for theskinrecord componenthat- the value for thehatrecord componentx- the value for thexrecord componenty- the value for theyrecord componentcolor- the value for thecolorrecord componentshadowColor- the value for theshadowColorrecord componentshadowOffset- the value for theshadowOffsetrecord componentstyle- the value for thestylerecord component
-
-
Method Details
-
renderSprite
public void renderSprite(Matrix4f pose, VertexConsumer buffer, int packedLightCoords, float offsetX, float offsetY, float z, int color) - Specified by:
renderSpritein interfacePlainTextRenderable
-
renderQuad
private static void renderQuad(Matrix4f pose, VertexConsumer buffer, int packedLightCoords, float x0, float x1, float y0, float y1, float z, int color, float u, float v, int srcWidth, int srcHeight, int textureWidth, int textureHeight) -
renderType
- Specified by:
renderTypein interfaceTextRenderable
-
guiPipeline
- Specified by:
guiPipelinein interfaceTextRenderable
-
textureView
- Specified by:
textureViewin interfaceTextRenderable
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
skin
Returns the value of theskinrecord component.- Returns:
- the value of the
skinrecord component
-
hat
public boolean hat()Returns the value of thehatrecord component.- Returns:
- the value of the
hatrecord component
-
x
public float x()Returns the value of thexrecord component.- Specified by:
xin interfacePlainTextRenderable- Returns:
- the value of the
xrecord component
-
y
public float y()Returns the value of theyrecord component.- Specified by:
yin interfacePlainTextRenderable- Returns:
- the value of the
yrecord component
-
color
public int color()Returns the value of thecolorrecord component.- Specified by:
colorin interfacePlainTextRenderable- Returns:
- the value of the
colorrecord component
-
shadowColor
public int shadowColor()Returns the value of theshadowColorrecord component.- Specified by:
shadowColorin interfacePlainTextRenderable- Returns:
- the value of the
shadowColorrecord component
-
shadowOffset
public float shadowOffset()Returns the value of theshadowOffsetrecord component.- Specified by:
shadowOffsetin interfacePlainTextRenderable- Returns:
- the value of the
shadowOffsetrecord component
-
style
Returns the value of thestylerecord component.- Specified by:
stylein interfaceActiveArea- Returns:
- the value of the
stylerecord component
-