Package net.minecraft

Record Class WorldVersion.Simple

java.lang.Object
java.lang.Record
net.minecraft.WorldVersion.Simple
All Implemented Interfaces:
WorldVersion
Enclosing interface:
WorldVersion

public static record WorldVersion.Simple(String id, String name, DataVersion dataVersion, int protocolVersion, int resourcePackVersion, int datapackVersion, Date buildTime, boolean stable) extends Record implements WorldVersion
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.WorldVersion

    WorldVersion.Simple
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Date
    The field for the buildTime record component.
    private final int
    The field for the datapackVersion record component.
    private final DataVersion
    The field for the dataVersion record component.
    private final String
    The field for the id record component.
    private final String
    The field for the name record component.
    private final int
    The field for the protocolVersion record component.
    private final int
    The field for the resourcePackVersion record component.
    private final boolean
    The field for the stable record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Simple(String id, String name, DataVersion dataVersion, int protocolVersion, int resourcePackVersion, int datapackVersion, Date buildTime, boolean stable)
    Creates an instance of a Simple record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the buildTime record component.
    int
    Returns the value of the datapackVersion record component.
    Returns the value of the dataVersion record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    id()
    Returns the value of the id record component.
    Returns the value of the name record component.
    int
    packVersion(PackType p_415556_)
     
    int
    Returns the value of the protocolVersion record component.
    int
    Returns the value of the resourcePackVersion record component.
    boolean
    Returns the value of the stable record component.
    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

    • id

      private final String id
      The field for the id record component.
    • name

      private final String name
      The field for the name record component.
    • dataVersion

      private final DataVersion dataVersion
      The field for the dataVersion record component.
    • protocolVersion

      private final int protocolVersion
      The field for the protocolVersion record component.
    • resourcePackVersion

      private final int resourcePackVersion
      The field for the resourcePackVersion record component.
    • datapackVersion

      private final int datapackVersion
      The field for the datapackVersion record component.
    • buildTime

      private final Date buildTime
      The field for the buildTime record component.
    • stable

      private final boolean stable
      The field for the stable record component.
  • Constructor Details

    • Simple

      public Simple(String id, String name, DataVersion dataVersion, int protocolVersion, int resourcePackVersion, int datapackVersion, Date buildTime, boolean stable)
      Creates an instance of a Simple record class.
      Parameters:
      id - the value for the id record component
      name - the value for the name record component
      dataVersion - the value for the dataVersion record component
      protocolVersion - the value for the protocolVersion record component
      resourcePackVersion - the value for the resourcePackVersion record component
      datapackVersion - the value for the datapackVersion record component
      buildTime - the value for the buildTime record component
      stable - the value for the stable record component
  • Method Details

    • packVersion

      public int packVersion(PackType p_415556_)
      Specified by:
      packVersion in interface WorldVersion
    • 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.
    • id

      public String id()
      Returns the value of the id record component.
      Specified by:
      id in interface WorldVersion
      Returns:
      the value of the id record component
    • name

      public String name()
      Returns the value of the name record component.
      Specified by:
      name in interface WorldVersion
      Returns:
      the value of the name record component
    • dataVersion

      public DataVersion dataVersion()
      Returns the value of the dataVersion record component.
      Specified by:
      dataVersion in interface WorldVersion
      Returns:
      the value of the dataVersion record component
    • protocolVersion

      public int protocolVersion()
      Returns the value of the protocolVersion record component.
      Specified by:
      protocolVersion in interface WorldVersion
      Returns:
      the value of the protocolVersion record component
    • resourcePackVersion

      public int resourcePackVersion()
      Returns the value of the resourcePackVersion record component.
      Returns:
      the value of the resourcePackVersion record component
    • datapackVersion

      public int datapackVersion()
      Returns the value of the datapackVersion record component.
      Returns:
      the value of the datapackVersion record component
    • buildTime

      public Date buildTime()
      Returns the value of the buildTime record component.
      Specified by:
      buildTime in interface WorldVersion
      Returns:
      the value of the buildTime record component
    • stable

      public boolean stable()
      Returns the value of the stable record component.
      Specified by:
      stable in interface WorldVersion
      Returns:
      the value of the stable record component