Record Class RecipeStateSnapshot

java.lang.Object
java.lang.Record
com.gtnewhorizons.horizonqa.api.event.state.RecipeStateSnapshot

@Desugar public record RecipeStateSnapshot(boolean formed, int progressTime, int maxProgressTime, long eut, int efficiency, String checkRecipeResultId, int parallels) extends Record
Immutable snapshot of a multiblock controller's recipe state at a single tick. Produced by GTAdapter.snapshotRecipeState so that the warp differ in TimeWarpHandler can compare across ticks without referencing GT types.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final RecipeStateSnapshot
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    RecipeStateSnapshot(boolean formed, int progressTime, int maxProgressTime, long eut, int efficiency, String checkRecipeResultId, int parallels)
    Creates an instance of a RecipeStateSnapshot record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the checkRecipeResultId record component.
    int
    Returns the value of the efficiency record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    long
    eut()
    Returns the value of the eut record component.
    boolean
    Returns the value of the formed record component.
    final int
    Returns a hash code value for this object.
    boolean
     
    int
    Returns the value of the maxProgressTime record component.
    int
    Returns the value of the parallels record component.
    int
    Returns the value of the progressTime record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • RecipeStateSnapshot

      public RecipeStateSnapshot(boolean formed, int progressTime, int maxProgressTime, long eut, int efficiency, String checkRecipeResultId, int parallels)
      Creates an instance of a RecipeStateSnapshot record class.
      Parameters:
      formed - the value for the formed record component
      progressTime - the value for the progressTime record component
      maxProgressTime - the value for the maxProgressTime record component
      eut - the value for the eut record component
      efficiency - the value for the efficiency record component
      checkRecipeResultId - the value for the checkRecipeResultId record component
      parallels - the value for the parallels record component
  • Method Details

    • isActive

      public boolean isActive()
    • 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.
    • formed

      public boolean formed()
      Returns the value of the formed record component.
      Returns:
      the value of the formed record component
    • progressTime

      public int progressTime()
      Returns the value of the progressTime record component.
      Returns:
      the value of the progressTime record component
    • maxProgressTime

      public int maxProgressTime()
      Returns the value of the maxProgressTime record component.
      Returns:
      the value of the maxProgressTime record component
    • eut

      public long eut()
      Returns the value of the eut record component.
      Returns:
      the value of the eut record component
    • efficiency

      public int efficiency()
      Returns the value of the efficiency record component.
      Returns:
      the value of the efficiency record component
    • checkRecipeResultId

      public String checkRecipeResultId()
      Returns the value of the checkRecipeResultId record component.
      Returns:
      the value of the checkRecipeResultId record component
    • parallels

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