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 otherwiseassetsTime- the time taken to reload assets in millisecondspackResult- 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
-
Nested Class Summary
Nested classes/interfaces inherited from interface BetterModelPlatform.ReloadResult
BetterModelPlatform.ReloadResult.Failure, BetterModelPlatform.ReloadResult.OnReload, BetterModelPlatform.ReloadResult.Success -
Constructor Summary
ConstructorsConstructorDescriptionSuccess(boolean firstLoad, long assetsTime, @NotNull PackResult packResult) Creates an instance of aSuccessrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theassetsTimerecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefirstLoadrecord component.final inthashCode()Returns a hash code value for this object.longlength()Returns the size of the generated resource pack.longReturns the time taken to generate the resource pack.@NotNull PackResultReturns the value of thepackResultrecord component.final StringtoString()Returns a string representation of this record class.longReturns the total time taken for the reload operation.
-
Constructor Details
-
Success
Creates an instance of aSuccessrecord class.- Parameters:
firstLoad- the value for thefirstLoadrecord componentassetsTime- the value for theassetsTimerecord componentpackResult- the value for thepackResultrecord 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
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
firstLoad
-
assetsTime
public long assetsTime()Returns the value of theassetsTimerecord component.- Returns:
- the value of the
assetsTimerecord component
-
packResult
Returns the value of thepackResultrecord component.- Returns:
- the value of the
packResultrecord component
-