Package forgottentowns.mod.api
Record Class ColonyWork.Crafting
java.lang.Object
java.lang.Record
forgottentowns.mod.api.ColonyWork.Crafting
- Record Components:
recipeId- registered recipe identitybatches- outstanding direct batchesminimumStock- minimum finished output unitsinfinite- whether continuous production is enabled
- Enclosing interface:
ColonyWork
public static record ColonyWork.Crafting(String recipeId, int batches, int minimumStock, boolean infinite)
extends Record
Detached native production bill; counts represent outstanding batches and desired output units.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbatches()Returns the value of thebatchesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleaninfinite()Returns the value of theinfiniterecord component.intReturns the value of theminimumStockrecord component.recipeId()Returns the value of therecipeIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Crafting
Creates an instance of aCraftingrecord class.- Parameters:
recipeId- the value for therecipeIdrecord componentbatches- the value for thebatchesrecord componentminimumStock- the value for theminimumStockrecord componentinfinite- the value for theinfiniterecord component
-
-
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 '=='. -
recipeId
Returns the value of therecipeIdrecord component.- Returns:
- the value of the
recipeIdrecord component
-
batches
public int batches()Returns the value of thebatchesrecord component.- Returns:
- the value of the
batchesrecord component
-
minimumStock
public int minimumStock()Returns the value of theminimumStockrecord component.- Returns:
- the value of the
minimumStockrecord component
-
infinite
public boolean infinite()Returns the value of theinfiniterecord component.- Returns:
- the value of the
infiniterecord component
-