Package net.minecraft.client.gui.font
Record Class AtlasGlyphProvider.Instance
java.lang.Object
java.lang.Record
net.minecraft.client.gui.font.AtlasGlyphProvider.Instance
- All Implemented Interfaces:
PlainTextRenderable,TextRenderable
- Enclosing class:
AtlasGlyphProvider
static record AtlasGlyphProvider.Instance(GlyphRenderTypes renderTypes, GpuTextureView textureView, TextureAtlasSprite sprite, 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 GlyphRenderTypesThe field for therenderTypesrecord component.private final intThe field for theshadowColorrecord component.private final floatThe field for theshadowOffsetrecord component.private final TextureAtlasSpriteThe field for thespriterecord component.private final GpuTextureViewThe field for thetextureViewrecord component.private final floatThe field for thexrecord component.private final floatThe field for theyrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionInstance(GlyphRenderTypes renderTypes, GpuTextureView textureView, TextureAtlasSprite sprite, 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.floatleft()voidrenderSprite(Matrix4f pPose, VertexConsumer pConsumer, int pPackedLight, float pX, float pY, float pZ, int pColor) renderType(Font.DisplayMode p_440474_) Deprecated.renderType(Font.DisplayMode p_181388_, boolean blur) Neo: returns theRenderTypeto use for the givenFont.DisplayModeand blur settingReturns the value of therenderTypesrecord component.floatright()intReturns the value of theshadowColorrecord component.floatReturns the value of theshadowOffsetrecord component.sprite()Returns the value of thespriterecord component.Returns the value of thetextureViewrecord 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
render
-
Field Details
-
renderTypes
The field for therenderTypesrecord component. -
textureView
The field for thetextureViewrecord component. -
sprite
The field for thespriterecord 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(GlyphRenderTypes renderTypes, GpuTextureView textureView, TextureAtlasSprite sprite, float x, float y, int color, int shadowColor, float shadowOffset) Creates an instance of aInstancerecord class.- Parameters:
renderTypes- the value for therenderTypesrecord componenttextureView- the value for thetextureViewrecord componentsprite- the value for thespriterecord 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 pPose, VertexConsumer pConsumer, int pPackedLight, float pX, float pY, float pZ, int pColor) - Specified by:
renderSpritein interfacePlainTextRenderable
-
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
-
guiPipeline
- Specified by:
guiPipelinein 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 '=='. -
renderTypes
Returns the value of therenderTypesrecord component.- Returns:
- the value of the
renderTypesrecord component
-
textureView
Returns the value of thetextureViewrecord component.- Specified by:
textureViewin interfaceTextRenderable- Returns:
- the value of the
textureViewrecord component
-
sprite
Returns the value of thespriterecord component.- Returns:
- the value of the
spriterecord 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
-
renderType(Font.DisplayMode, boolean)instead