Record Class WorldLabel.Placed
java.lang.Object
java.lang.Record
dev.myriadclient.api.render.WorldLabel.Placed
- Enclosing class:
WorldLabel
public static record WorldLabel.Placed(float x, float y, float width, float height, float scale)
extends Record
Where a label ended up on screen, so callers can stack things above it: its top-left corner and size in scaled
GUI pixels, and the scale it was drawn at.
-
Constructor Summary
ConstructorsConstructorDescriptionPlaced(float x, float y, float width, float height, float scale) Creates an instance of aPlacedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.floatscale()Returns the value of thescalerecord component.final StringtoString()Returns a string representation of this record class.floatwidth()Returns the value of thewidthrecord component.floatx()Returns the value of thexrecord component.floaty()Returns the value of theyrecord component.
-
Constructor Details
-
Placed
public Placed(float x, float y, float width, float height, float scale) Creates an instance of aPlacedrecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentscale- the value for thescalerecord component
-
-
Method Details
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
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
-
width
public float width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public float height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
scale
public float scale()Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-