Record Class UnihexProvider.Glyph
java.lang.Object
java.lang.Record
net.minecraft.client.gui.font.providers.UnihexProvider.Glyph
- All Implemented Interfaces:
GlyphInfo
- Enclosing class:
UnihexProvider
static record UnihexProvider.Glyph(UnihexProvider.LineData contents, int left, int right)
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 UnihexProvider.LineData
The field for thecontents
record component.private final int
The field for theleft
record component.private final int
The field for theright
record component. -
Constructor Summary
ConstructorDescriptionGlyph
(UnihexProvider.LineData contents, int left, int right) Creates an instance of aGlyph
record class. -
Method Summary
Modifier and TypeMethodDescriptionbake
(Function<SheetGlyphInfo, BakedGlyph> p_285377_) contents()
Returns the value of thecontents
record component.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
left()
Returns the value of theleft
record component.int
right()
Returns the value of theright
record component.final String
toString()
Returns a string representation of this record class.int
width()
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
-
contents
The field for thecontents
record component. -
left
private final int leftThe field for theleft
record component. -
right
private final int rightThe field for theright
record component.
-
-
Constructor Details
-
Glyph
Glyph(UnihexProvider.LineData contents, int left, int right) Creates an instance of aGlyph
record class.- Parameters:
contents
- the value for thecontents
record componentleft
- the value for theleft
record componentright
- the value for theright
record component
-
-
Method Details
-
width
public int width() -
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 '=='. -
contents
Returns the value of thecontents
record component.- Returns:
- the value of the
contents
record component
-
left
public int left()Returns the value of theleft
record component.- Returns:
- the value of the
left
record component
-
right
public int right()Returns the value of theright
record component.- Returns:
- the value of the
right
record component
-