Record Class GuiFontManager.ResolvedFont
java.lang.Object
java.lang.Record
com.render.api.gui.GuiFontManager.ResolvedFont
- Enclosing class:
GuiFontManager
public static record GuiFontManager.ResolvedFont(net.minecraft.client.gui.Font font, GuiFontManager.FontMetrics metrics, float pixelSize, boolean custom)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionResolvedFont(net.minecraft.client.gui.Font font, GuiFontManager.FontMetrics metrics, float pixelSize, boolean custom) Creates an instance of aResolvedFontrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatbooleancustom()Returns the value of thecustomrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.client.gui.Fontfont()Returns the value of thefontrecord component.final inthashCode()Returns a hash code value for this object.floatlineHeightFor(float requestedPixelSize) metrics()Returns the value of themetricsrecord component.floatReturns the value of thepixelSizerecord component.floatscaleFor(float requestedPixelSize) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResolvedFont
public ResolvedFont(net.minecraft.client.gui.Font font, GuiFontManager.FontMetrics metrics, float pixelSize, boolean custom) Creates an instance of aResolvedFontrecord class.- Parameters:
font- the value for thefontrecord componentmetrics- the value for themetricsrecord componentpixelSize- the value for thepixelSizerecord componentcustom- the value for thecustomrecord component
-
-
Method Details
-
scaleFor
public float scaleFor(float requestedPixelSize) -
lineHeightFor
public float lineHeightFor(float requestedPixelSize) -
baselineOffset
public float baselineOffset() -
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
font
public net.minecraft.client.gui.Font font()Returns the value of thefontrecord component.- Returns:
- the value of the
fontrecord component
-
metrics
Returns the value of themetricsrecord component.- Returns:
- the value of the
metricsrecord component
-
pixelSize
public float pixelSize()Returns the value of thepixelSizerecord component.- Returns:
- the value of the
pixelSizerecord component
-
custom
public boolean custom()Returns the value of thecustomrecord component.- Returns:
- the value of the
customrecord component
-