Record Class CreativeEntries.Definition
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.data.helper.CreativeEntries.Definition
- Enclosing class:
CreativeEntries
public static record CreativeEntries.Definition(net.minecraft.resources.ResourceKey<net.minecraft.world.item.CreativeModeTab> tab, CreativeEntries.Insertion insertion, List<com.mojang.datafixers.util.Either<net.minecraft.world.item.Item, net.minecraft.world.item.ItemStack>> items)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<CreativeEntries.Definition> static com.mojang.serialization.Codec<List<CreativeEntries.Definition>> -
Constructor Summary
ConstructorsConstructorDescriptionDefinition(net.minecraft.resources.ResourceKey<net.minecraft.world.item.CreativeModeTab> tab, CreativeEntries.Insertion insertion, List<com.mojang.datafixers.util.Either<net.minecraft.world.item.Item, net.minecraft.world.item.ItemStack>> items) Creates an instance of aDefinitionrecord 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.Returns the value of theinsertionrecord component.List<com.mojang.datafixers.util.Either<net.minecraft.world.item.Item, net.minecraft.world.item.ItemStack>> items()Returns the value of theitemsrecord component.net.minecraft.resources.ResourceKey<net.minecraft.world.item.CreativeModeTab> tab()Returns the value of thetabrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
LIST_CODEC
-
-
Constructor Details
-
Definition
public Definition(net.minecraft.resources.ResourceKey<net.minecraft.world.item.CreativeModeTab> tab, CreativeEntries.Insertion insertion, List<com.mojang.datafixers.util.Either<net.minecraft.world.item.Item, net.minecraft.world.item.ItemStack>> items) Creates an instance of aDefinitionrecord class.- Parameters:
tab- the value for thetabrecord componentinsertion- the value for theinsertionrecord componentitems- the value for theitemsrecord 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). -
tab
public net.minecraft.resources.ResourceKey<net.minecraft.world.item.CreativeModeTab> tab()Returns the value of thetabrecord component.- Returns:
- the value of the
tabrecord component
-
insertion
Returns the value of theinsertionrecord component.- Returns:
- the value of the
insertionrecord component
-
items
public List<com.mojang.datafixers.util.Either<net.minecraft.world.item.Item, net.minecraft.world.item.ItemStack>> items()Returns the value of theitemsrecord component.- Returns:
- the value of the
itemsrecord component
-