Record Class DatapackRegistrySets<T>

java.lang.Object
java.lang.Record
net.neoforged.neoforge.data.event.DatapackRegistrySets<T>
Type Parameters:
T - The type of the object used for each layer.
Record Components:
worldAndDimension - The object for the world and dimension datapack registries.
reloadable - The object for the reloadable datapack registries.

@Internal public record DatapackRegistrySets<T>(T worldAndDimension, T reloadable) extends Record
A record holding some object for each datapack registry layer.
  • Field Details

    • worldAndDimension

      private final T worldAndDimension
      The field for the worldAndDimension record component.
    • reloadable

      private final T reloadable
      The field for the reloadable record component.
  • Constructor Details

    • DatapackRegistrySets

      public DatapackRegistrySets(T worldAndDimension, T reloadable)
      Creates an instance of a DatapackRegistrySets record class.
      Parameters:
      worldAndDimension - the value for the worldAndDimension record component
      reloadable - the value for the reloadable record component
  • Method Details

    • 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. 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.
    • worldAndDimension

      public T worldAndDimension()
      Returns the value of the worldAndDimension record component.
      Returns:
      the value of the worldAndDimension record component
    • reloadable

      public T reloadable()
      Returns the value of the reloadable record component.
      Returns:
      the value of the reloadable record component