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
Modifier and TypeFieldDescriptionprivate final int
The field for theheight
record component.private final NativeImage
The field for thesource
record component.private final int
The field for thesourceX
record component.private final int
The field for thesourceY
record component.private final int
The field for thewidth
record component. -
Constructor Summary
ConstructorDescriptionGlyph
(int sourceX, int sourceY, int width, int height, NativeImage source) Creates an instance of aGlyph
record class. -
Method Summary
Modifier and TypeMethodDescriptionbake
(Function<SheetGlyphInfo, BakedGlyph> p_232670_) final boolean
Indicates whether some other object is "equal to" this one.float
float
float
final int
hashCode()
Returns a hash code value for this object.int
height()
Returns the value of theheight
record component.source()
Returns the value of thesource
record component.int
sourceX()
Returns the value of thesourceX
record component.int
sourceY()
Returns the value of thesourceY
record component.final String
toString()
Returns a string representation of this record class.int
width()
Returns the value of thewidth
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.mojang.blaze3d.font.GlyphInfo
getAdvance
-
Field Details
-
sourceX
private final int sourceXThe field for thesourceX
record component. -
sourceY
private final int sourceYThe field for thesourceY
record component. -
width
private final int widthThe field for thewidth
record component. -
height
private final int heightThe field for theheight
record component. -
source
The field for thesource
record component.
-
-
Constructor Details
-
Glyph
Glyph(int sourceX, int sourceY, int width, int height, NativeImage source) Creates an instance of aGlyph
record class.- Parameters:
sourceX
- the value for thesourceX
record componentsourceY
- the value for thesourceY
record componentwidth
- the value for thewidth
record componentheight
- the value for theheight
record componentsource
- the value for thesource
record component
-
-
Method Details
-
getAdvance
public float getAdvance()- Specified by:
getAdvance
in interfaceGlyphInfo
-
getShadowOffset
public float getShadowOffset()- Specified by:
getShadowOffset
in interfaceGlyphInfo
-
getBoldOffset
public float getBoldOffset()- Specified by:
getBoldOffset
in 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 thesourceX
record component.- Returns:
- the value of the
sourceX
record component
-
sourceY
public int sourceY()Returns the value of thesourceY
record component.- Returns:
- the value of the
sourceY
record component
-
width
public int width()Returns the value of thewidth
record component.- Returns:
- the value of the
width
record component
-
height
public int height()Returns the value of theheight
record component.- Returns:
- the value of the
height
record component
-
source
Returns the value of thesource
record component.- Returns:
- the value of the
source
record component
-