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 official wh$a
intermediary net/minecraft/class_7419$class_8827
named net/minecraft/text/NbtDataSource$Type
official a
intermediary comp_1987
named codec
official b
intermediary comp_1988
named id
-
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
Modifier and TypeFieldDescriptionprivate final com.mojang.serialization.MapCodec<T>
The field for thecodec
record component.private final String
The field for theid
record component.Fields inherited from interface net.minecraft.util.StringIdentifiable
CACHED_MAP_THRESHOLD
-
Constructor Summary
-
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 thecodec
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.final String
toString()
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:
asString
in interfaceStringIdentifiable
- Returns:
- the unique string representation of the enum, used for serialization
- Mappings:
Namespace Name Mixin selector official c
Lavk;c()Ljava/lang/String;
intermediary method_15434
Lnet/minecraft/class_3542;method_15434()Ljava/lang/String;
named asString
Lnet/minecraft/util/StringIdentifiable;asString()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 thecodec
record component.- Returns:
- the value of the
codec
record component
-
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-