Record Class SlotGroups.Entry
java.lang.Object
java.lang.Record
com.trevlar.slotkit.api.group.SlotGroups.Entry
- Record Components:
key- the row's key, which every member's row shares; for the listing, not for savingname- what to showset- the set, ornullfor a lone groupgroups- the groups the row stands for; one for a lone groupcategories- the distinct categories of those groups, to filter bysource- the mod the row comes from, ornullfor vanilla; seesource
- Enclosing class:
SlotGroups
public static record SlotGroups.Entry(String key, net.minecraft.network.chat.Component name, @Nullable SlotGroupSet set, List<SlotGroupId> groups, List<SlotGroupCategory> categories, @Nullable net.minecraft.network.chat.Component source)
extends Record
One row of the player-facing list.
-
Constructor Summary
ConstructorsConstructorDescriptionEntry(String key, net.minecraft.network.chat.Component name, @Nullable SlotGroupSet set, List<SlotGroupId> groups, List<SlotGroupCategory> categories) The 5.1.0 shape, with no source; kept so code built against it still links.Entry(String key, net.minecraft.network.chat.Component name, @Nullable SlotGroupSet set, List<SlotGroupId> groups, List<SlotGroupCategory> categories, @Nullable net.minecraft.network.chat.Component source) Creates an instance of aEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecategoriesrecord component.final booleanIndicates whether some other object is "equal to" this one.groups()Returns the value of thegroupsrecord component.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.net.minecraft.network.chat.Componentname()Returns the value of thenamerecord component.@Nullable SlotGroupSetset()Returns the value of thesetrecord component.@Nullable net.minecraft.network.chat.Componentsource()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Entry
public Entry(String key, net.minecraft.network.chat.Component name, @Nullable SlotGroupSet set, List<SlotGroupId> groups, List<SlotGroupCategory> categories) The 5.1.0 shape, with no source; kept so code built against it still links. -
Entry
public Entry(String key, net.minecraft.network.chat.Component name, @Nullable SlotGroupSet set, List<SlotGroupId> groups, List<SlotGroupCategory> categories, @Nullable net.minecraft.network.chat.Component source) Creates an instance of aEntryrecord class.- Parameters:
key- the value for thekeyrecord componentname- the value for thenamerecord componentset- the value for thesetrecord componentgroups- the value for thegroupsrecord componentcategories- the value for thecategoriesrecord componentsource- the value for thesourcerecord 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 withObjects::equals(Object,Object). -
key
-
name
-
set
-
groups
-
categories
Returns the value of thecategoriesrecord component.- Returns:
- the value of the
categoriesrecord component
-
source
-