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
FieldsModifier and TypeFieldDescriptionprivate final UnihexProvider.LineDataThe field for thecontentsrecord component.private final intThe field for theleftrecord component.private final intThe field for therightrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionGlyph(UnihexProvider.LineData contents, int left, int right) Creates an instance of aGlyphrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbake(Function<SheetGlyphInfo, BakedGlyph> p_285377_) contents()Returns the value of thecontentsrecord component.final booleanIndicates whether some other object is "equal to" this one.floatfloatfloatfinal inthashCode()Returns a hash code value for this object.intleft()Returns the value of theleftrecord component.intright()Returns the value of therightrecord component.final StringtoString()Returns a string representation of this record class.intwidth()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
-
contents
The field for thecontentsrecord component. -
left
private final int leftThe field for theleftrecord component. -
right
private final int rightThe field for therightrecord component.
-
-
Constructor Details
-
Glyph
Glyph(UnihexProvider.LineData contents, int left, int right) Creates an instance of aGlyphrecord class.- Parameters:
contents- the value for thecontentsrecord componentleft- the value for theleftrecord componentright- the value for therightrecord component
-
-
Method Details
-
width
public int width() -
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 '=='. -
contents
Returns the value of thecontentsrecord component.- Returns:
- the value of the
contentsrecord component
-
left
public int left()Returns the value of theleftrecord component.- Returns:
- the value of the
leftrecord component
-
right
public int right()Returns the value of therightrecord component.- Returns:
- the value of the
rightrecord component
-