Package net.minecraft.client.gui.font
Record Class PlayerGlyphProvider.Instance
java.lang.Object
java.lang.Record
net.minecraft.client.gui.font.PlayerGlyphProvider.Instance
- All Implemented Interfaces:
PlainTextRenderable,TextRenderable
- Enclosing class:
PlayerGlyphProvider
static record PlayerGlyphProvider.Instance(Supplier<PlayerSkinRenderCache.RenderInfo> skin, boolean hat, float x, float y, int color, int shadowColor, float shadowOffset)
extends Record
implements PlainTextRenderable
-
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 floatThe field for thexrecord component.private final floatThe field for theyrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionInstance(Supplier<PlayerSkinRenderCache.RenderInfo> skin, boolean hat, float x, float y, int color, int shadowColor, float shadowOffset) Creates an instance of aInstancerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatbottom()intcolor()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.floatleft()private static voidrenderQuad(Matrix4f pPose, VertexConsumer pConsumer, int pPackedLight, float pX1, float pX2, float pY1, float pY2, float pZ, int pColor, float pU, float pV, int pWidth, int pHeight, int pTextureWidth, int pTextureHeight) voidrenderSprite(Matrix4f p_443313_, VertexConsumer p_443220_, int p_443287_, float p_443341_, float p_443360_, float p_443552_, int p_443507_) renderType(Font.DisplayMode p_442599_) floatright()intReturns the value of theshadowColorrecord component.floatReturns the value of theshadowOffsetrecord component.skin()Returns the value of theskinrecord 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.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.font.PlainTextRenderable
renderMethods inherited from interface net.minecraft.client.gui.font.TextRenderable
renderType
-
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.
-
-
Constructor Details
-
Instance
Instance(Supplier<PlayerSkinRenderCache.RenderInfo> skin, boolean hat, float x, float y, int color, int shadowColor, float shadowOffset) 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 component
-
-
Method Details
-
renderSprite
public void renderSprite(Matrix4f p_443313_, VertexConsumer p_443220_, int p_443287_, float p_443341_, float p_443360_, float p_443552_, int p_443507_) - Specified by:
renderSpritein interfacePlainTextRenderable
-
renderQuad
private static void renderQuad(Matrix4f pPose, VertexConsumer pConsumer, int pPackedLight, float pX1, float pX2, float pY1, float pY2, float pZ, int pColor, float pU, float pV, int pWidth, int pHeight, int pTextureWidth, int pTextureHeight) -
renderType
- Specified by:
renderTypein interfaceTextRenderable
-
guiPipeline
- Specified by:
guiPipelinein interfaceTextRenderable
-
textureView
- Specified by:
textureViewin interfaceTextRenderable
-
left
public float left()- Specified by:
leftin interfaceTextRenderable
-
right
public float right()- Specified by:
rightin interfaceTextRenderable
-
top
public float top()- Specified by:
topin interfaceTextRenderable
-
bottom
public float bottom()- Specified by:
bottomin 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 '=='. -
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
-