Record Class CodecCache.Key<A,T>

java.lang.Object
java.lang.Record
net.minecraft.util.dynamic.CodecCache.Key<A,T>
Record Components:
codec -
value -
ops -
Enclosing class:
CodecCache

private static record CodecCache.Key<A,T>(com.mojang.serialization.Codec<A> codec, A value, com.mojang.serialization.DynamicOps<T> ops) extends Record
Mappings:
Namespace Name
named net/minecraft/util/dynamic/CodecCache$Key
intermediary net/minecraft/class_9684$class_9685
official azl$a
named codec
intermediary comp_2658
official a
named value
intermediary comp_2659
official b
named ops
intermediary comp_2660
official c
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final com.mojang.serialization.Codec<A>
    The field for the codec record component.
    private final com.mojang.serialization.DynamicOps<T>
    The field for the ops record component.
    private final A
    The field for the value record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Key(com.mojang.serialization.Codec<A> codec, A a, com.mojang.serialization.DynamicOps<T> dynamicOps)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.mojang.serialization.Codec<A>
    Returns the value of the codec record component.
    com.mojang.serialization.DataResult<T>
     
    boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns a hash code value for this object.
    com.mojang.serialization.DynamicOps<T>
    ops()
    Returns the value of the ops record component.
    final String
    Returns a string representation of this record class.
    Returns the value of the value record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • codec

      private final com.mojang.serialization.Codec<A> codec
      The field for the codec record component.
    • value

      private final A value
      The field for the value record component.
    • ops

      private final com.mojang.serialization.DynamicOps<T> ops
      The field for the ops record component.
  • Constructor Details

    • Key

      Key(com.mojang.serialization.Codec<A> codec, A a, com.mojang.serialization.DynamicOps<T> dynamicOps)
  • Method Details

    • encode

      public com.mojang.serialization.DataResult<T> encode()
      Mappings:
      Namespace Name Mixin selector
      named encode Lnet/minecraft/util/dynamic/CodecCache$Key;encode()Lcom/mojang/serialization/DataResult;
      intermediary method_59858 Lnet/minecraft/class_9684$class_9685;method_59858()Lcom/mojang/serialization/DataResult;
      official a Lazl$a;a()Lcom/mojang/serialization/DataResult;
    • equals

      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

      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

      public final 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
    • codec

      public com.mojang.serialization.Codec<A> codec()
      Returns the value of the codec record component.
      Returns:
      the value of the codec record component
    • value

      public A value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component
    • ops

      public com.mojang.serialization.DynamicOps<T> ops()
      Returns the value of the ops record component.
      Returns:
      the value of the ops record component