Record Class BetterModelPlatform.ReloadResult.Success

java.lang.Object
java.lang.Record
kr.toxicity.model.api.BetterModelPlatform.ReloadResult.Success
Record Components:
firstLoad - true if this is the first load (startup), false otherwise
assetsTime - the time taken to reload assets in milliseconds
packResult - the result of the resource pack generation
All Implemented Interfaces:
BetterModelPlatform.ReloadResult
Enclosing interface:
BetterModelPlatform.ReloadResult

public static record BetterModelPlatform.ReloadResult.Success(boolean firstLoad, long assetsTime, @NotNull PackResult packResult) extends Record implements BetterModelPlatform.ReloadResult
Indicates a successful reload.
Since:
1.15.2
  • Constructor Details

    • Success

      public Success(boolean firstLoad, long assetsTime, @NotNull @NotNull PackResult packResult)
      Creates an instance of a Success record class.
      Parameters:
      firstLoad - the value for the firstLoad record component
      assetsTime - the value for the assetsTime record component
      packResult - the value for the packResult record component
  • Method Details

    • packingTime

      public long packingTime()
      Returns the time taken to generate the resource pack.
      Returns:
      the packing time in milliseconds
      Since:
      1.15.2
    • totalTime

      public long totalTime()
      Returns the total time taken for the reload operation.
      Returns:
      the total time in milliseconds
      Since:
      1.15.2
    • length

      public long length()
      Returns the size of the generated resource pack.
      Returns:
      the size in bytes
      Since:
      1.15.2
    • 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.
    • firstLoad

      public boolean firstLoad()
      Returns the value of the firstLoad record component.
      Returns:
      the value of the firstLoad record component
    • assetsTime

      public long assetsTime()
      Returns the value of the assetsTime record component.
      Returns:
      the value of the assetsTime record component
    • packResult

      @NotNull public @NotNull PackResult packResult()
      Returns the value of the packResult record component.
      Returns:
      the value of the packResult record component