Package forestry.api.fuels
Record Class EngineCopperFuel
java.lang.Object
java.lang.Record
forestry.api.fuels.EngineCopperFuel
- Record Components:
fuel- Item that is valid fuel for a peat-fired engine.powerPerCycle- Power produced by this fuel per work cycle.burnDuration- Amount of work cycles this item lasts before being consumed.
public record EngineCopperFuel(net.minecraft.world.item.ItemStack fuel, int powerPerCycle, int burnDuration)
extends Record
todo data driven
-
Constructor Summary
ConstructorsConstructorDescriptionEngineCopperFuel(net.minecraft.world.item.ItemStack fuel, int powerPerCycle, int burnDuration) Creates an instance of aEngineCopperFuelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theburnDurationrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.item.ItemStackfuel()Returns the value of thefuelrecord component.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.
-
Constructor Details
-
EngineCopperFuel
public EngineCopperFuel(net.minecraft.world.item.ItemStack fuel, int powerPerCycle, int burnDuration) Creates an instance of aEngineCopperFuelrecord class.- Parameters:
fuel- the value for thefuelrecord componentpowerPerCycle- 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
fuel
public net.minecraft.world.item.ItemStack fuel()Returns the value of thefuelrecord component.- Returns:
- the value of the
fuelrecord component
-
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
-