Package de.Keyle.MyPet.api.gui
Record Class FillSection
java.lang.Object
java.lang.Record
de.Keyle.MyPet.api.gui.FillSection
- Record Components:
id- this section's id within its menutype- the registered type handle this section was decoded asregion- the area to fill, ornullfor the whole menuitem- the appearance painted into every slot of the region
- All Implemented Interfaces:
Section
public record FillSection(String id, SectionType<FillSection> type, @Nullable FillSection.Region region, ItemAppearance item)
extends Record
implements Section
Backdrop fill.
region null = whole menu. Renders before all other sections.
Other sections overwrite its slots.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA rectangular part of the menu to fill, instead of the whole thing. -
Constructor Summary
ConstructorsConstructorDescriptionFillSection(String id, SectionType<FillSection> type, @Nullable FillSection.Region region, ItemAppearance item) Rejects 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.@Nullable FillSection.Regionregion()Returns the value of theregionrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
FillSection
public FillSection(String id, SectionType<FillSection> type, @Nullable @Nullable FillSection.Region region, ItemAppearance item) Rejects 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. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component. -
type
Returns the value of thetyperecord component. -
region
Returns the value of theregionrecord component.- Returns:
- the value of the
regionrecord component
-
item
Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-