Record Class RegistryResourceAccess.InMemoryStorage.Entry

java.lang.Object
java.lang.Record
net.minecraft.resources.RegistryResourceAccess.InMemoryStorage.Entry
Enclosing class:
RegistryResourceAccess.InMemoryStorage

static record RegistryResourceAccess.InMemoryStorage.Entry(com.google.gson.JsonElement data, int id, com.mojang.serialization.Lifecycle lifecycle) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final com.google.gson.JsonElement
    The field for the data record component.
    private final int
    The field for the id record component.
    private final com.mojang.serialization.Lifecycle
    The field for the lifecycle record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Entry(com.google.gson.JsonElement data, int id, com.mojang.serialization.Lifecycle lifecycle)
    Creates an instance of a Entry record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.gson.JsonElement
    Returns the value of the data record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    id()
    Returns the value of the id record component.
    com.mojang.serialization.Lifecycle
    Returns the value of the lifecycle record component.
    <E> com.mojang.serialization.DataResult<RegistryResourceAccess.ParsedEntry<E>>
    parse(com.mojang.serialization.DynamicOps<com.google.gson.JsonElement> p_214289_, com.mojang.serialization.Decoder<E> p_214290_)
     
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    • data

      private final com.google.gson.JsonElement data
      The field for the data record component.
    • id

      private final int id
      The field for the id record component.
    • lifecycle

      private final com.mojang.serialization.Lifecycle lifecycle
      The field for the lifecycle record component.
  • Constructor Details

    • Entry

      Entry(com.google.gson.JsonElement data, int id, com.mojang.serialization.Lifecycle lifecycle)
      Creates an instance of a Entry record class.
      Parameters:
      data - the value for the data record component
      id - the value for the id record component
      lifecycle - the value for the lifecycle record component
  • Method Details

    • parse

      public <E> com.mojang.serialization.DataResult<RegistryResourceAccess.ParsedEntry<E>> parse(com.mojang.serialization.DynamicOps<com.google.gson.JsonElement> p_214289_, com.mojang.serialization.Decoder<E> p_214290_)
    • 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
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • data

      public com.google.gson.JsonElement data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component
    • id

      public int id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • lifecycle

      public com.mojang.serialization.Lifecycle lifecycle()
      Returns the value of the lifecycle record component.
      Returns:
      the value of the lifecycle record component