Package forestry.api.fuels
Record Class FermenterFuel
java.lang.Object
java.lang.Record
forestry.api.fuels.FermenterFuel
- Record Components:
item- Item that is a valid fuel for the fermenter (i.e. fertilizer).fermentPerCycle- How much is fermented per work cycle, i.e. how much biomass is produced per cycle.burnDuration- Amount of work cycles a single item of this fuel lasts before expiring.
public record FermenterFuel(net.minecraft.world.item.ItemStack item, int fermentPerCycle, int burnDuration)
extends Record
todo data driven
-
Constructor Summary
ConstructorsConstructorDescriptionFermenterFuel(net.minecraft.world.item.ItemStack item, int fermentPerCycle, int burnDuration) Creates an instance of aFermenterFuelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theburnDurationrecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefermentPerCyclerecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.ItemStackitem()Returns the value of theitemrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FermenterFuel
public FermenterFuel(net.minecraft.world.item.ItemStack item, int fermentPerCycle, int burnDuration) Creates an instance of aFermenterFuelrecord class.- Parameters:
item- the value for theitemrecord componentfermentPerCycle- the value for thefermentPerCyclerecord 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 '=='. -
item
public net.minecraft.world.item.ItemStack item()Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-
fermentPerCycle
public int fermentPerCycle()Returns the value of thefermentPerCyclerecord component.- Returns:
- the value of the
fermentPerCyclerecord component
-
burnDuration
public int burnDuration()Returns the value of theburnDurationrecord component.- Returns:
- the value of the
burnDurationrecord component
-