Record Class VersionInfo

java.lang.Object
java.lang.Record
net.neoforged.fml.loading.VersionInfo

public record VersionInfo(String neoForgeVersion, String fmlVersion, String mcVersion, String neoFormVersion) extends Record
  • Field Details

    • neoForgeVersion

      private final String neoForgeVersion
      The field for the neoForgeVersion record component.
    • fmlVersion

      private final String fmlVersion
      The field for the fmlVersion record component.
    • mcVersion

      private final String mcVersion
      The field for the mcVersion record component.
    • neoFormVersion

      private final String neoFormVersion
      The field for the neoFormVersion record component.
  • Constructor Details

    • VersionInfo

      public VersionInfo(String neoForgeVersion, String fmlVersion, String mcVersion, String neoFormVersion)
      Creates an instance of a VersionInfo record class.
      Parameters:
      neoForgeVersion - the value for the neoForgeVersion record component
      fmlVersion - the value for the fmlVersion record component
      mcVersion - the value for the mcVersion record component
      neoFormVersion - the value for the neoFormVersion record component
  • Method Details

    • mcAndFmlVersion

      public String mcAndFmlVersion()
    • mcAndNeoFormVersion

      public String mcAndNeoFormVersion()
    • 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.
    • neoForgeVersion

      public String neoForgeVersion()
      Returns the value of the neoForgeVersion record component.
      Returns:
      the value of the neoForgeVersion record component
    • fmlVersion

      public String fmlVersion()
      Returns the value of the fmlVersion record component.
      Returns:
      the value of the fmlVersion record component
    • mcVersion

      public String mcVersion()
      Returns the value of the mcVersion record component.
      Returns:
      the value of the mcVersion record component
    • neoFormVersion

      public String neoFormVersion()
      Returns the value of the neoFormVersion record component.
      Returns:
      the value of the neoFormVersion record component