Package ke.ric.renderer.api
Record Class FrameProgress
java.lang.Object
java.lang.Record
ke.ric.renderer.api.FrameProgress
- Record Components:
stage- currently measured stagepassIndex- zero-based recipe pass during RENDER, or -1 for every other stagepassCount- total number of recipe render passes, at least 1basisPoints- measured completion in 0..10000 for this stage/pass
public record FrameProgress(FrameProgress.Stage stage, int passIndex, int passCount, int basisPoints)
extends Record
Measured progress within one stage of a snapshot or stream frame. This is not an estimate of
remaining time or a synthetic overall percentage. A new stage or render pass can restart at zero.
Divide
basisPoints by 100.0 for a percentage within the reported stage.
SnapshotBuilder.onProgress(java.util.function.Consumer) and
StreamBuilder.onProgress(java.util.function.Consumer) dispatch on the server thread at
most once per tick. Updates are coalesced, so brief intermediate states need not be delivered.
Conversion and saving stages occur only when the requested output requires them. Low-level
RendererClient.capture(CaptureRequest, double, double, java.util.function.Consumer)
progress does not itself guarantee the server thread.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionFrameProgress(FrameProgress.Stage stage, int passIndex, int passCount, int basisPoints) Constructs a validated immutable value. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebasisPointsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thepassCountrecord component.intReturns the value of thepassIndexrecord component.stage()Returns the value of thestagerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FrameProgress
Constructs a validated immutable value.- Throws:
IllegalArgumentException- for invalid progress, counts or stage/index combinationsNullPointerException- if stage is null
-
-
Method Details
-
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. -
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. -
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 '=='. -
stage
Returns the value of thestagerecord component.- Returns:
- the value of the
stagerecord component
-
passIndex
public int passIndex()Returns the value of thepassIndexrecord component.- Returns:
- the value of the
passIndexrecord component
-
passCount
public int passCount()Returns the value of thepassCountrecord component.- Returns:
- the value of the
passCountrecord component
-
basisPoints
public int basisPoints()Returns the value of thebasisPointsrecord component.- Returns:
- the value of the
basisPointsrecord component
-