Record Class ModLoadingIssue

java.lang.Object
java.lang.Record
net.neoforged.fml.ModLoadingIssue

public record ModLoadingIssue(ModLoadingIssue.Severity severity, String translationKey, List<Object> translationArgs, @Nullable Throwable cause, @Nullable Path affectedPath, @Nullable IModFile affectedModFile, @Nullable IModInfo affectedMod) extends Record
  • Field Details

    • severity

      private final ModLoadingIssue.Severity severity
      The field for the severity record component.
    • translationKey

      private final String translationKey
      The field for the translationKey record component.
    • translationArgs

      private final List<Object> translationArgs
      The field for the translationArgs record component.
    • cause

      @Nullable private final @Nullable Throwable cause
      The field for the cause record component.
    • affectedPath

      @Nullable private final @Nullable Path affectedPath
      The field for the affectedPath record component.
    • affectedModFile

      @Nullable private final @Nullable IModFile affectedModFile
      The field for the affectedModFile record component.
    • affectedMod

      @Nullable private final @Nullable IModInfo affectedMod
      The field for the affectedMod record component.
  • Constructor Details

    • ModLoadingIssue

      public ModLoadingIssue(ModLoadingIssue.Severity severity, String translationKey, List<Object> translationArgs)
    • ModLoadingIssue

      public ModLoadingIssue(ModLoadingIssue.Severity severity, String translationKey, List<Object> translationArgs, @Nullable @Nullable Throwable cause, @Nullable @Nullable Path affectedPath, @Nullable @Nullable IModFile affectedModFile, @Nullable @Nullable IModInfo affectedMod)
      Creates an instance of a ModLoadingIssue record class.
      Parameters:
      severity - the value for the severity record component
      translationKey - the value for the translationKey record component
      translationArgs - the value for the translationArgs record component
      cause - the value for the cause record component
      affectedPath - the value for the affectedPath record component
      affectedModFile - the value for the affectedModFile record component
      affectedMod - the value for the affectedMod record component
  • Method Details

    • error

      public static ModLoadingIssue error(String translationKey, Object... args)
    • warning

      public static ModLoadingIssue warning(String translationKey, Object... args)
    • withAffectedPath

      public ModLoadingIssue withAffectedPath(Path affectedPath)
    • withAffectedModFile

      public ModLoadingIssue withAffectedModFile(IModFile affectedModFile)
    • withAffectedMod

      public ModLoadingIssue withAffectedMod(IModInfo affectedMod)
    • withCause

      public ModLoadingIssue withCause(Throwable cause)
    • withSeverity

      public ModLoadingIssue withSeverity(ModLoadingIssue.Severity severity)
    • toString

      public 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.
    • severity

      public ModLoadingIssue.Severity severity()
      Returns the value of the severity record component.
      Returns:
      the value of the severity record component
    • translationKey

      public String translationKey()
      Returns the value of the translationKey record component.
      Returns:
      the value of the translationKey record component
    • translationArgs

      public List<Object> translationArgs()
      Returns the value of the translationArgs record component.
      Returns:
      the value of the translationArgs record component
    • cause

      @Nullable public @Nullable Throwable cause()
      Returns the value of the cause record component.
      Returns:
      the value of the cause record component
    • affectedPath

      @Nullable public @Nullable Path affectedPath()
      Returns the value of the affectedPath record component.
      Returns:
      the value of the affectedPath record component
    • affectedModFile

      @Nullable public @Nullable IModFile affectedModFile()
      Returns the value of the affectedModFile record component.
      Returns:
      the value of the affectedModFile record component
    • affectedMod

      @Nullable public @Nullable IModInfo affectedMod()
      Returns the value of the affectedMod record component.
      Returns:
      the value of the affectedMod record component