Record Class BitmapProvider.Glyph
java.lang.Object
java.lang.Record
net.minecraft.client.gui.font.providers.BitmapProvider.Glyph
- All Implemented Interfaces:
GlyphInfo
- Enclosing class:
BitmapProvider
static record BitmapProvider.Glyph(float scale, NativeImage image, int offsetX, int offsetY, int width, int height, int advance, int ascent)
extends Record
implements GlyphInfo
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mojang.blaze3d.font.GlyphInfo
GlyphInfo.SpaceGlyphInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theadvancerecord component.private final intThe field for theascentrecord component.private final intThe field for theheightrecord component.private final NativeImageThe field for theimagerecord component.private final intThe field for theoffsetXrecord component.private final intThe field for theoffsetYrecord component.private final floatThe field for thescalerecord component.private final intThe field for thewidthrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionGlyph(float scale, NativeImage image, int offsetX, int offsetY, int width, int height, int advance, int ascent) Creates an instance of aGlyphrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintadvance()Returns the value of theadvancerecord component.intascent()Returns the value of theascentrecord component.bake(Function<SheetGlyphInfo, BakedGlyph> p_232640_) final booleanIndicates whether some other object is "equal to" this one.floatfinal inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.image()Returns the value of theimagerecord component.intoffsetX()Returns the value of theoffsetXrecord component.intoffsetY()Returns the value of theoffsetYrecord component.floatscale()Returns the value of thescalerecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.mojang.blaze3d.font.GlyphInfo
getAdvance, getBoldOffset, getShadowOffset
-
Field Details
-
scale
private final float scaleThe field for thescalerecord component. -
image
The field for theimagerecord component. -
offsetX
private final int offsetXThe field for theoffsetXrecord component. -
offsetY
private final int offsetYThe field for theoffsetYrecord component. -
width
private final int widthThe field for thewidthrecord component. -
height
private final int heightThe field for theheightrecord component. -
advance
private final int advanceThe field for theadvancerecord component. -
ascent
private final int ascentThe field for theascentrecord component.
-
-
Constructor Details
-
Glyph
Glyph(float scale, NativeImage image, int offsetX, int offsetY, int width, int height, int advance, int ascent) Creates an instance of aGlyphrecord class.- Parameters:
scale- the value for thescalerecord componentimage- the value for theimagerecord componentoffsetX- the value for theoffsetXrecord componentoffsetY- the value for theoffsetYrecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentadvance- the value for theadvancerecord componentascent- the value for theascentrecord component
-
-
Method Details
-
getAdvance
public float getAdvance()- Specified by:
getAdvancein interfaceGlyphInfo
-
bake
-
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 '=='. -
scale
public float scale()Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-
image
Returns the value of theimagerecord component.- Returns:
- the value of the
imagerecord component
-
offsetX
public int offsetX()Returns the value of theoffsetXrecord component.- Returns:
- the value of the
offsetXrecord component
-
offsetY
public int offsetY()Returns the value of theoffsetYrecord component.- Returns:
- the value of the
offsetYrecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
advance
public int advance()Returns the value of theadvancerecord component.- Returns:
- the value of the
advancerecord component
-
ascent
public int ascent()Returns the value of theascentrecord component.- Returns:
- the value of the
ascentrecord component
-