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/PersistentStateType
intermediary net/minecraft/class_10741
official ezn
named id
intermediary comp_3641
official a
named constructor
intermediary comp_3642
official b
named codec
intermediary comp_3643
official c
named dataFixType
intermediary comp_3644
official d
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Function
<PersistentState.Context, com.mojang.serialization.Codec<T>> The field for thecodec
record component.private final Function
<PersistentState.Context, T> The field for theconstructor
record component.private final DataFixTypes
The field for thedataFixType
record component.private final String
The field for theid
record 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 thecodec
record component.Returns the value of theconstructor
record component.Returns the value of thedataFixType
record component.boolean
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.toString()
Returns a string representation of this record class.
-
Field Details
-
id
The field for theid
record component. -
constructor
The field for theconstructor
record component. -
codec
private final Function<PersistentState.Context,com.mojang.serialization.Codec<T extends PersistentState>> codecThe field for thecodec
record component. -
dataFixType
The field for thedataFixType
record 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;)V
intermediary <init>
Lnet/minecraft/class_10741;<init>(Ljava/lang/String;Ljava/util/function/Supplier;Lcom/mojang/serialization/Codec;Lnet/minecraft/class_4284;)V
official <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 theid
record component.- Returns:
- the value of the
id
record component
-
constructor
Returns the value of theconstructor
record component.- Returns:
- the value of the
constructor
record component
-
codec
Returns the value of thecodec
record component.- Returns:
- the value of the
codec
record component
-
dataFixType
Returns the value of thedataFixType
record component.- Returns:
- the value of the
dataFixType
record component
-