Package net.minecraft.client.gui.font
Record Class EmptyArea
java.lang.Object
java.lang.Record
net.minecraft.client.gui.font.EmptyArea
- All Implemented Interfaces:
ActiveArea
public record EmptyArea(float x, float y, float advance, float ascent, float height, Style style)
extends Record
implements ActiveArea
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatThe field for theadvancerecord component.private final floatThe field for theascentrecord component.static final floatstatic final floatprivate final floatThe field for theheightrecord component.private final StyleThe field for thestylerecord component.private final floatThe field for thexrecord component.private final floatThe field for theyrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatfloatfloatfloatfloatadvance()Returns the value of theadvancerecord component.floatascent()Returns the value of theascentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatheight()Returns the value of theheightrecord component.style()Returns the value of thestylerecord component.final StringtoString()Returns a string representation of this record class.floatx()Returns the value of thexrecord component.floaty()Returns the value of theyrecord component.
-
Field Details
-
x
private final float xThe field for thexrecord component. -
y
private final float yThe field for theyrecord component. -
advance
private final float advanceThe field for theadvancerecord component. -
ascent
private final float ascentThe field for theascentrecord component. -
height
private final float heightThe field for theheightrecord component. -
style
The field for thestylerecord component. -
DEFAULT_HEIGHT
public static final float DEFAULT_HEIGHT- See Also:
-
DEFAULT_ASCENT
public static final float DEFAULT_ASCENT- See Also:
-
-
Constructor Details
-
EmptyArea
Creates an instance of aEmptyArearecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentadvance- the value for theadvancerecord componentascent- the value for theascentrecord componentheight- the value for theheightrecord componentstyle- the value for thestylerecord component
-
-
Method Details
-
activeLeft
public float activeLeft()- Specified by:
activeLeftin interfaceActiveArea
-
activeTop
public float activeTop()- Specified by:
activeTopin interfaceActiveArea
-
activeRight
public float activeRight()- Specified by:
activeRightin interfaceActiveArea
-
activeBottom
public float activeBottom()- Specified by:
activeBottomin interfaceActiveArea
-
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 '=='. -
x
public float x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public float y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
advance
public float advance()Returns the value of theadvancerecord component.- Returns:
- the value of the
advancerecord component
-
ascent
public float ascent()Returns the value of theascentrecord component.- Returns:
- the value of the
ascentrecord component
-
height
public float height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
style
Returns the value of thestylerecord component.- Specified by:
stylein interfaceActiveArea- Returns:
- the value of the
stylerecord component
-