Package net.minecraft.client.font
Record Class BitmapFont.BitmapFontGlyph
java.lang.Object
java.lang.Record
net.minecraft.client.font.BitmapFont.BitmapFontGlyph
- Record Components:
scaleFactor-image-x-y-width-height-advance-ascent-
- All Implemented Interfaces:
Glyph
- Enclosing class:
BitmapFont
@Environment(CLIENT)
private static record BitmapFont.BitmapFontGlyph(float scaleFactor, NativeImage image, int x, int y, int width, int height, int advance, int ascent)
extends Record
implements Glyph
- Mappings:
Namespace Name official ern$bintermediary net/minecraft/class_386$class_388named net/minecraft/client/font/BitmapFont$BitmapFontGlyphofficial aintermediary comp_603named scaleFactorofficial bintermediary comp_604named imageofficial cintermediary comp_605named xofficial dintermediary comp_606named yofficial eintermediary comp_607named widthofficial fintermediary comp_608named heightofficial gintermediary comp_609named advanceofficial hintermediary comp_610named ascent
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.font.Glyph
Glyph.EmptyGlyph -
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 floatThe field for thescaleFactorrecord component.private final intThe field for thewidthrecord component.private final intThe field for thexrecord component.private final intThe field for theyrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionBitmapFontGlyph(float scaleFactor, NativeImage image, int x, int y, int width, int height, int advance, int ascent) Creates an instance of aBitmapFontGlyphrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintadvance()Returns the value of theadvancerecord component.intascent()Returns the value of theascentrecord component.bake(Function<RenderableGlyph, GlyphRenderer> glyphRendererGetter) 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.floatReturns the value of thescaleFactorrecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.intx()Returns the value of thexrecord component.inty()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.font.Glyph
getAdvance, getBoldOffset, getShadowOffset
-
Field Details
-
scaleFactor
private final float scaleFactorThe field for thescaleFactorrecord component. -
image
The field for theimagerecord component. -
x
private final int xThe field for thexrecord component. -
y
private final int yThe field for theyrecord 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
-
BitmapFontGlyph
BitmapFontGlyph(float scaleFactor, NativeImage image, int x, int y, int width, int height, int advance, int ascent) Creates an instance of aBitmapFontGlyphrecord class.- Parameters:
scaleFactor- the value for thescaleFactorrecord componentimage- the value for theimagerecord componentx- the value for thexrecord componenty- the value for theyrecord 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 interfaceGlyph
-
bake
- Specified by:
bakein interfaceGlyph- Mappings:
Namespace Name Mixin selector official bakeLegd;bake(Ljava/util/function/Function;)Leri;intermediary bakeLnet/minecraft/class_379;bake(Ljava/util/function/Function;)Lnet/minecraft/class_382;named bakeLnet/minecraft/client/font/Glyph;bake(Ljava/util/function/Function;)Lnet/minecraft/client/font/GlyphRenderer;
-
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 '=='. -
scaleFactor
public float scaleFactor()Returns the value of thescaleFactorrecord component.- Returns:
- the value of the
scaleFactorrecord component
-
image
Returns the value of theimagerecord component.- Returns:
- the value of the
imagerecord component
-
x
public int x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public int y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord 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
-