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 -
Constructor Summary
ConstructorsConstructorDescriptionRecipeStateSnapshot(boolean formed, int progressTime, int maxProgressTime, long eut, int efficiency, String checkRecipeResultId, int parallels) Creates an instance of aRecipeStateSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecheckRecipeResultIdrecord component.intReturns the value of theefficiencyrecord component.final booleanIndicates whether some other object is "equal to" this one.longeut()Returns the value of theeutrecord component.booleanformed()Returns the value of theformedrecord component.final inthashCode()Returns a hash code value for this object.booleanisActive()intReturns the value of themaxProgressTimerecord component.intReturns the value of theparallelsrecord component.intReturns the value of theprogressTimerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
-
-
Constructor Details
-
RecipeStateSnapshot
public RecipeStateSnapshot(boolean formed, int progressTime, int maxProgressTime, long eut, int efficiency, String checkRecipeResultId, int parallels) Creates an instance of aRecipeStateSnapshotrecord class.- Parameters:
formed- the value for theformedrecord componentprogressTime- the value for theprogressTimerecord componentmaxProgressTime- the value for themaxProgressTimerecord componenteut- the value for theeutrecord componentefficiency- the value for theefficiencyrecord componentcheckRecipeResultId- the value for thecheckRecipeResultIdrecord componentparallels- the value for theparallelsrecord component
-
-
Method Details
-
isActive
public boolean isActive() -
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 '=='. -
formed
public boolean formed()Returns the value of theformedrecord component.- Returns:
- the value of the
formedrecord component
-
progressTime
public int progressTime()Returns the value of theprogressTimerecord component.- Returns:
- the value of the
progressTimerecord component
-
maxProgressTime
public int maxProgressTime()Returns the value of themaxProgressTimerecord component.- Returns:
- the value of the
maxProgressTimerecord component
-
eut
public long eut()Returns the value of theeutrecord component.- Returns:
- the value of the
eutrecord component
-
efficiency
public int efficiency()Returns the value of theefficiencyrecord component.- Returns:
- the value of the
efficiencyrecord component
-
checkRecipeResultId
Returns the value of thecheckRecipeResultIdrecord component.- Returns:
- the value of the
checkRecipeResultIdrecord component
-
parallels
public int parallels()Returns the value of theparallelsrecord component.- Returns:
- the value of the
parallelsrecord component
-