Record Class UnifiedDisplayItemCodecs.ListEntry
java.lang.Object
java.lang.Record
net.rebel459.unified.api.registry.UnifiedDisplayItemCodecs.ListEntry
- Enclosing class:
UnifiedDisplayItemCodecs
public static record UnifiedDisplayItemCodecs.ListEntry(net.minecraft.world.item.ItemStack item, net.minecraft.world.item.CreativeModeTab.TabVisibility visibility)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<UnifiedDisplayItemCodecs.ListEntry> -
Constructor Summary
ConstructorsConstructorDescriptionListEntry(net.minecraft.world.item.ItemStack item, net.minecraft.world.item.CreativeModeTab.TabVisibility visibility) Creates an instance of aListEntryrecord class. -
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.net.minecraft.world.item.ItemStackitem()Returns the value of theitemrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.world.item.CreativeModeTab.TabVisibilityReturns the value of thevisibilityrecord component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
ListEntry
public ListEntry(net.minecraft.world.item.ItemStack item, net.minecraft.world.item.CreativeModeTab.TabVisibility visibility) Creates an instance of aListEntryrecord class.- Parameters:
item- the value for theitemrecord componentvisibility- the value for thevisibilityrecord 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). -
item
public net.minecraft.world.item.ItemStack item()Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-
visibility
public net.minecraft.world.item.CreativeModeTab.TabVisibility visibility()Returns the value of thevisibilityrecord component.- Returns:
- the value of the
visibilityrecord component
-