Record Class StatPanelLayout
java.lang.Object
java.lang.Record
me.desht.pneumaticcraft.api.client.pneumatic_helmet.StatPanelLayout
- Record Components:
x- X position, in range 0..1y- Y position, in range 0..1expandsLeft- true if panel expands to the left (thus anchored right), false otherwise- true if the panel should be hidden, false otherwise
Represents a resolution-independent position for an armor HUD stat panel
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<StatPanelLayout>static final StatPanelLayout -
Constructor Summary
ConstructorsConstructorDescriptionStatPanelLayout(float x, float y, boolean expandsLeft, boolean hidden) Creates an instance of aStatPanelLayoutrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theexpandsLeftrecord component.static StatPanelLayoutexpandsLeft(float x, float y) static StatPanelLayoutexpandsRight(float x, float y) final inthashCode()Returns a hash code value for this object.booleanhidden()Returns the value of thehiddenrecord 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
-
DEFAULT
-
CODEC
-
-
Constructor Details
-
StatPanelLayout
public StatPanelLayout(float x, float y, boolean expandsLeft, boolean hidden) Creates an instance of aStatPanelLayoutrecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentexpandsLeft- the value for theexpandsLeftrecord componenthidden- the value for thehiddenrecord component
-
-
Method Details
-
expandsLeft
-
expandsRight
-
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. All components in this record class 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
-
expandsLeft
public boolean expandsLeft()Returns the value of theexpandsLeftrecord component.- Returns:
- the value of the
expandsLeftrecord component
-