Record Class ProcessView
java.lang.Object
java.lang.Record
fr.robie.machineengine.api.process.ProcessView
- Record Components:
recipe- key of the recipe being processedstatus- current statusprogress- ticks doneduration- ticks needed (modifiers applied at start)inFlight- inputs consumed at start and held until completion (D15)outputs- what completion produces (captured at start)costPerTick- per-tick costs (modifiers applied at start)
public record ProcessView(@NotNull net.kyori.adventure.key.Key recipe, @NotNull ProcessStatus status, long progress, long duration, @NotNull List<ResourceStack> inFlight, @NotNull List<ResourceStack> outputs, @NotNull List<ResourceStack> costPerTick)
extends Record
Read-only view of a running process (ARCHITECTURE.md ยง13).
-
Constructor Summary
ConstructorsConstructorDescriptionProcessView(@NotNull net.kyori.adventure.key.Key recipe, @NotNull ProcessStatus status, long progress, long duration, @NotNull List<ResourceStack> inFlight, @NotNull List<ResourceStack> outputs, @NotNull List<ResourceStack> costPerTick) Creates an instance of aProcessViewrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull List<ResourceStack> Returns the value of thecostPerTickrecord component.longduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull List<ResourceStack> inFlight()Returns the value of theinFlightrecord component.@NotNull List<ResourceStack> outputs()Returns the value of theoutputsrecord component.longprogress()Returns the value of theprogressrecord component.@NotNull net.kyori.adventure.key.Keyrecipe()Returns the value of thereciperecord component.long@NotNull ProcessStatusstatus()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ProcessView
public ProcessView(@NotNull @NotNull net.kyori.adventure.key.Key recipe, @NotNull @NotNull ProcessStatus status, long progress, long duration, @NotNull @NotNull List<ResourceStack> inFlight, @NotNull @NotNull List<ResourceStack> outputs, @NotNull @NotNull List<ResourceStack> costPerTick) Creates an instance of aProcessViewrecord class.- Parameters:
recipe- the value for thereciperecord componentstatus- the value for thestatusrecord componentprogress- the value for theprogressrecord componentduration- the value for thedurationrecord componentinFlight- the value for theinFlightrecord componentoutputs- the value for theoutputsrecord componentcostPerTick- the value for thecostPerTickrecord component
-
-
Method Details
-
remaining
public long remaining() -
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. -
recipe
-
status
-
progress
-
duration
-
inFlight
-
outputs
-
costPerTick
Returns the value of thecostPerTickrecord component.- Returns:
- the value of the
costPerTickrecord component
-