Package net.minecraft.text
Record Class NbtDataSource.Type<T extends NbtDataSource>
java.lang.Object
java.lang.Record
net.minecraft.text.NbtDataSource.Type<T>
- Record Components:
codec-id-
- All Implemented Interfaces:
StringIdentifiable
- Enclosing interface:
NbtDataSource
public static record NbtDataSource.Type<T extends NbtDataSource>(com.mojang.serialization.MapCodec<T extends NbtDataSource> codec, String id)
extends Record
implements StringIdentifiable
- Mappings:
Namespace Name named net/minecraft/text/NbtDataSource$Typeintermediary net/minecraft/class_7419$class_8827official yb$anamed codecintermediary comp_1987official anamed idintermediary comp_1988official b
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.util.StringIdentifiable
StringIdentifiable.BasicCodec<S extends StringIdentifiable>, StringIdentifiable.EnumCodec<E extends Enum<E> & StringIdentifiable> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.mojang.serialization.MapCodec<T> The field for thecodecrecord component.private final StringThe field for theidrecord component.Fields inherited from interface net.minecraft.util.StringIdentifiable
CACHED_MAP_THRESHOLD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasString()Returns the unique string representation of the enum, used for serialization.com.mojang.serialization.MapCodec<T> codec()Returns the value of thecodecrecord component.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.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
Constructor Details
-
Type
-
-
Method Details
-
asString
Returns the unique string representation of the enum, used for serialization.- Specified by:
asStringin interfaceStringIdentifiable- Returns:
- the unique string representation of the enum, used for serialization
- Mappings:
Namespace Name Mixin selector named asStringLnet/minecraft/util/StringIdentifiable;asString()Ljava/lang/String;intermediary method_15434Lnet/minecraft/class_3542;method_15434()Ljava/lang/String;official cLazk;c()Ljava/lang/String;
-
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). -
codec
Returns the value of thecodecrecord component.- Returns:
- the value of the
codecrecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-