Package net.minheur.potoflux.screen.tabs
Record Class Tab
java.lang.Object
java.lang.Record
net.minheur.potoflux.screen.tabs.Tab
- Record Components:
id- the ID of your tabtabClass- the class of the tab, used to actually get the panel
- All Implemented Interfaces:
IRegistryType
public record Tab(ResourceLocation id, Class<? extends BaseTab<?>> tabClass)
extends Record
implements IRegistryType
A registry item to make tabs
-
Constructor Summary
ConstructorsConstructorDescriptionTab(ResourceLocation id, Class<? extends BaseTab<?>> tabClass) Creates an instance of aTabrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable BaseTab<?>Creates an instance of the tab class (tabClass)final 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.tabClass()Returns the value of thetabClassrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
createInstance
Creates an instance of the tab class (tabClass) -
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.- Specified by:
idin interfaceIRegistryType- Returns:
- the value of the
idrecord component
-
tabClass
Returns the value of thetabClassrecord component.- Returns:
- the value of the
tabClassrecord component
-