Record Class FrameProgress

java.lang.Object
java.lang.Record
ke.ric.renderer.api.FrameProgress
Record Components:
stage - currently measured stage
passIndex - zero-based recipe pass during RENDER, or -1 for every other stage
passCount - total number of recipe render passes, at least 1
basisPoints - 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.

  • Constructor Details

  • Method Details

    • 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.
    • stage

      public FrameProgress.Stage stage()
      Returns the value of the stage record component.
      Returns:
      the value of the stage record component
    • passIndex

      public int passIndex()
      Returns the value of the passIndex record component.
      Returns:
      the value of the passIndex record component
    • passCount

      public int passCount()
      Returns the value of the passCount record component.
      Returns:
      the value of the passCount record component
    • basisPoints

      public int basisPoints()
      Returns the value of the basisPoints record component.
      Returns:
      the value of the basisPoints record component