Package forestry.api.core.machines.fuels
Record Class PeatEngineFuel
java.lang.Object
java.lang.Record
forestry.api.core.machines.fuels.PeatEngineFuel
- Record Components:
powerPerCycle- Power produced by this fuel per work cycleburnDuration- Amount of work cycles this item lasts before being consumed
Data map value for items usable as fuel by the Peat-fired Engine.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPeatEngineFuel(int powerPerCycle, int burnDuration) Creates an instance of aPeatEngineFuelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theburnDurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thepowerPerCyclerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
PeatEngineFuel
public PeatEngineFuel(int powerPerCycle, int burnDuration) Creates an instance of aPeatEngineFuelrecord class.- Parameters:
powerPerCycle- the value for thepowerPerCyclerecord componentburnDuration- the value for theburnDurationrecord 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. All components in this record class are compared with '=='. -
powerPerCycle
public int powerPerCycle()Returns the value of thepowerPerCyclerecord component.- Returns:
- the value of the
powerPerCyclerecord component
-
burnDuration
public int burnDuration()Returns the value of theburnDurationrecord component.- Returns:
- the value of the
burnDurationrecord component
-