Package net.minecraft.world
Record Class PersistentStateType<T extends PersistentState>
java.lang.Object
java.lang.Record
net.minecraft.world.PersistentStateType<T>
- Record Components:
id-constructor-codec-dataFixType-
public record PersistentStateType<T extends PersistentState>(String id, Supplier<T extends PersistentState> constructor, com.mojang.serialization.Codec<T extends PersistentState> codec, DataFixTypes dataFixType)
extends Record
- Mappings:
Namespace Name named net/minecraft/world/PersistentStateTypeintermediary net/minecraft/class_10741official fkinamed idintermediary comp_3641official anamed constructorintermediary comp_3642official bnamed codecintermediary comp_3643official cnamed dataFixTypeintermediary comp_3644official d
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.mojang.serialization.Codec<T> The field for thecodecrecord component.The field for theconstructorrecord component.private final DataFixTypesThe field for thedataFixTyperecord component.private final StringThe field for theidrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPersistentStateType(String string, Supplier<T> supplier, com.mojang.serialization.Codec<T> codec, DataFixTypes dataFixTypes) -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec<T> codec()Returns the value of thecodecrecord component.Returns the value of theconstructorrecord component.Returns the value of thedataFixTyperecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.toString()Returns a string representation of this record class.
-
Field Details
-
id
The field for theidrecord component. -
constructor
The field for theconstructorrecord component. -
codec
The field for thecodecrecord component. -
dataFixType
The field for thedataFixTyperecord component.
-
-
Constructor Details
-
PersistentStateType
public PersistentStateType(String string, Supplier<T> supplier, com.mojang.serialization.Codec<T> codec, DataFixTypes dataFixTypes) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/world/PersistentStateType;<init>(Ljava/lang/String;Ljava/util/function/Supplier;Lcom/mojang/serialization/Codec;Lnet/minecraft/datafixer/DataFixTypes;)Vintermediary <init>Lnet/minecraft/class_10741;<init>(Ljava/lang/String;Ljava/util/function/Supplier;Lcom/mojang/serialization/Codec;Lnet/minecraft/class_4284;)Vofficial <init>Lfki;<init>(Ljava/lang/String;Ljava/util/function/Supplier;Lcom/mojang/serialization/Codec;Lbhx;)V
-
-
Method Details
-
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). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
constructor
Returns the value of theconstructorrecord component.- Returns:
- the value of the
constructorrecord component
-
codec
Returns the value of thecodecrecord component.- Returns:
- the value of the
codecrecord component
-
dataFixType
Returns the value of thedataFixTyperecord component.- Returns:
- the value of the
dataFixTyperecord component
-