Package forestry.api.core.machines.fuels
Record Class MoistenerFuel
java.lang.Object
java.lang.Record
forestry.api.core.machines.fuels.MoistenerFuel
- Record Components:
product- The item that leaves the moistener's working slot (i.e. mouldy wheat, decayed wheat, mulch)stage- What stage this product represents. Resources with lower stage value are consumed firstmoistenerValue- How much this item contributes to the final product of the moistener (i.e. mycelium)
public record MoistenerFuel(net.minecraft.world.item.ItemStack product, int stage, int moistenerValue)
extends Record
Data map value for items usable as a resource by the Moistener.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMoistenerFuel(net.minecraft.world.item.ItemStack product, int stage, int moistenerValue) Creates an instance of aMoistenerFuelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themoistenerValuerecord component.net.minecraft.world.item.ItemStackproduct()Returns the value of theproductrecord component.intstage()Returns the value of thestagerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
MoistenerFuel
public MoistenerFuel(net.minecraft.world.item.ItemStack product, int stage, int moistenerValue) Creates an instance of aMoistenerFuelrecord class.- Parameters:
product- the value for theproductrecord componentstage- the value for thestagerecord componentmoistenerValue- the value for themoistenerValuerecord 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 '=='. -
product
public net.minecraft.world.item.ItemStack product()Returns the value of theproductrecord component.- Returns:
- the value of the
productrecord component
-
stage
public int stage()Returns the value of thestagerecord component.- Returns:
- the value of the
stagerecord component
-
moistenerValue
public int moistenerValue()Returns the value of themoistenerValuerecord component.- Returns:
- the value of the
moistenerValuerecord component
-