Package net.minecraft.world
Record Class PersistentState.Type<T extends PersistentState>
java.lang.Object
java.lang.Record
net.minecraft.world.PersistentState.Type<T>
- Record Components:
constructor-deserializer-type-
- Enclosing class:
PersistentState
public static record PersistentState.Type<T extends PersistentState>(Supplier<T extends PersistentState> constructor, BiFunction<NbtCompound,RegistryWrapper.WrapperLookup,T extends PersistentState> deserializer, DataFixTypes type)
extends Record
- Mappings:
Namespace Name named net/minecraft/world/PersistentState$Typeintermediary net/minecraft/class_18$class_8645official eql$anamed constructorintermediary comp_1590official anamed deserializerintermediary comp_1591official bnamed typeintermediary comp_1592official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for theconstructorrecord component.private final BiFunction<NbtCompound, RegistryWrapper.WrapperLookup, T> The field for thedeserializerrecord component.private final DataFixTypesThe field for thetyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionType(Supplier<T> supplier, BiFunction<NbtCompound, RegistryWrapper.WrapperLookup, T> biFunction, DataFixTypes dataFixTypes) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconstructorrecord component.Returns the value of thedeserializerrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
constructor
The field for theconstructorrecord component. -
deserializer
private final BiFunction<NbtCompound,RegistryWrapper.WrapperLookup, deserializerT extends PersistentState> The field for thedeserializerrecord component. -
type
The field for thetyperecord component.
-
-
Constructor Details
-
Type
public Type(Supplier<T> supplier, BiFunction<NbtCompound, RegistryWrapper.WrapperLookup, T> biFunction, DataFixTypes dataFixTypes)
-
-
Method Details
-
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). -
constructor
Returns the value of theconstructorrecord component.- Returns:
- the value of the
constructorrecord component
-
deserializer
Returns the value of thedeserializerrecord component.- Returns:
- the value of the
deserializerrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-