Record Class LegacyUnicodeBitmapsProvider.Glyph
java.lang.Object
java.lang.Record
net.minecraft.client.gui.font.providers.LegacyUnicodeBitmapsProvider.Glyph
- All Implemented Interfaces:
GlyphInfo
- Enclosing class:
- LegacyUnicodeBitmapsProvider
static record LegacyUnicodeBitmapsProvider.Glyph(int sourceX, int sourceY, int width, int height, NativeImage source)
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 theheightrecord component.private final NativeImageThe field for thesourcerecord component.private final intThe field for thesourceXrecord component.private final intThe field for thesourceYrecord component.private final intThe field for thewidthrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionGlyph(int sourceX, int sourceY, int width, int height, NativeImage source) Creates an instance of aGlyphrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbake(Function<SheetGlyphInfo, BakedGlyph> p_232670_) final booleanIndicates whether some other object is "equal to" this one.floatfloatfloatfinal inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.source()Returns the value of thesourcerecord component.intsourceX()Returns the value of thesourceXrecord component.intsourceY()Returns the value of thesourceYrecord 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
-
Field Details
-
sourceX
private final int sourceXThe field for thesourceXrecord component. -
sourceY
private final int sourceYThe field for thesourceYrecord component. -
width
private final int widthThe field for thewidthrecord component. -
height
private final int heightThe field for theheightrecord component. -
source
The field for thesourcerecord component.
-
-
Constructor Details
-
Glyph
Glyph(int sourceX, int sourceY, int width, int height, NativeImage source) Creates an instance of aGlyphrecord class.- Parameters:
sourceX- the value for thesourceXrecord componentsourceY- the value for thesourceYrecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentsource- the value for thesourcerecord component
-
-
Method Details
-
getAdvance
public float getAdvance()- Specified by:
getAdvancein interfaceGlyphInfo
-
getShadowOffset
public float getShadowOffset()- Specified by:
getShadowOffsetin interfaceGlyphInfo
-
getBoldOffset
public float getBoldOffset()- Specified by:
getBoldOffsetin 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 '=='. -
sourceX
public int sourceX()Returns the value of thesourceXrecord component.- Returns:
- the value of the
sourceXrecord component
-
sourceY
public int sourceY()Returns the value of thesourceYrecord component.- Returns:
- the value of the
sourceYrecord 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
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-