Package de.Keyle.MyPet.api.gui
Record Class BorderSection
java.lang.Object
java.lang.Record
de.Keyle.MyPet.api.gui.BorderSection
- Record Components:
id- this section's id within its menutype- the registered type handle this section was decoded asthickness- how many rings deep the border is, at least 1item- the appearance painted into every border slot
- All Implemented Interfaces:
Section
public record BorderSection(String id, SectionType<BorderSection> type, int thickness, ItemAppearance item)
extends Record
implements Section
Outer-ring decoration.
thickness 1 = single ring, 2 = two-deep, etc.-
Constructor Summary
ConstructorsConstructorDescriptionBorderSection(String id, SectionType<BorderSection> type, int thickness, ItemAppearance item) Rejects a thickness below 1 or an absent item. -
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.id()Returns the value of theidrecord component.item()Returns the value of theitemrecord component.intReturns the value of thethicknessrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
BorderSection
public BorderSection(String id, SectionType<BorderSection> type, int thickness, ItemAppearance item) Rejects a thickness below 1 or an absent item.
-
-
Method Details
-
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 '=='. -
id
Returns the value of theidrecord component. -
type
Returns the value of thetyperecord component. -
thickness
public int thickness()Returns the value of thethicknessrecord component.- Returns:
- the value of the
thicknessrecord component
-
item
Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-