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, Function<PersistentState.Context,T extends PersistentState> constructor, Function<PersistentState.Context,com.mojang.serialization.Codec<T extends PersistentState>> codec, DataFixTypes dataFixType)
extends Record
- Mappings:
Namespace Name named net/minecraft/world/PersistentStateTypeintermediary net/minecraft/class_10741official eznnamed idintermediary comp_3641official anamed constructorintermediary comp_3642official bnamed codecintermediary comp_3643official cnamed dataFixTypeintermediary comp_3644official d
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Function<PersistentState.Context, com.mojang.serialization.Codec<T>> The field for thecodecrecord component.private final Function<PersistentState.Context, T> The field for theconstructorrecord component.private final DataFixTypesThe field for thedataFixTyperecord component.private final StringThe field for theidrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPersistentStateType(String string, Function<PersistentState.Context, T> function, Function<PersistentState.Context, com.mojang.serialization.Codec<T>> function2, DataFixTypes dataFixTypes) PersistentStateType(String id, Supplier<T> constructor, com.mojang.serialization.Codec<T> codec, DataFixTypes dataFixType) -
Method Summary
Modifier and TypeMethodDescriptionFunction<PersistentState.Context, com.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
private final Function<PersistentState.Context,com.mojang.serialization.Codec<T extends PersistentState>> codecThe field for thecodecrecord component. -
dataFixType
The field for thedataFixTyperecord component.
-
-
Constructor Details
-
PersistentStateType
public PersistentStateType(String id, Supplier<T> constructor, com.mojang.serialization.Codec<T> codec, DataFixTypes dataFixType) - 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>Lezn;<init>(Ljava/lang/String;Ljava/util/function/Supplier;Lcom/mojang/serialization/Codec;Lbbo;)V
-
PersistentStateType
public PersistentStateType(String string, Function<PersistentState.Context, T> function, Function<PersistentState.Context, com.mojang.serialization.Codec<T>> function2, DataFixTypes dataFixTypes)
-
-
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
-