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 Details Link icon

  • Constructor Details Link icon

    • PersistentStateType Link icon

      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 Link icon

      public PersistentStateType(String string, Function<PersistentState.Context,T> function, Function<PersistentState.Context,com.mojang.serialization.Codec<T>> function2, DataFixTypes dataFixTypes)
  • Method Details Link icon

    • equals Link icon

      public boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • hashCode Link icon

      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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • toString Link icon

      public 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • id Link icon

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • constructor Link icon

      public Function<PersistentState.Context,T> constructor()
      Returns the value of the constructor record component.
      Returns:
      the value of the constructor record component
    • codec Link icon

      public Function<PersistentState.Context,com.mojang.serialization.Codec<T>> codec()
      Returns the value of the codec record component.
      Returns:
      the value of the codec record component
    • dataFixType Link icon

      public DataFixTypes dataFixType()
      Returns the value of the dataFixType record component.
      Returns:
      the value of the dataFixType record component