Package forestry.api.fuels
Record Class MoistenerFuel
java.lang.Object
java.lang.Record
forestry.api.fuels.MoistenerFuel
- Record Components:
resource- The item to use.product- The item that leaves the moistener's working slot (i.e. mouldy wheat, decayed wheat, mulch)stage- How much this item contributes to the final product of the moistener (i.e. mycelium)moistenerValue- What stage this product represents. Resources with lower stage value will be consumed first.
public record MoistenerFuel(net.minecraft.world.item.ItemStack resource, net.minecraft.world.item.ItemStack product, int stage, int moistenerValue)
extends Record
todo data driven
-
Constructor Summary
ConstructorsConstructorDescriptionMoistenerFuel(net.minecraft.world.item.ItemStack resource, 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.net.minecraft.world.item.ItemStackresource()Returns the value of theresourcerecord component.intstage()Returns the value of thestagerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MoistenerFuel
public MoistenerFuel(net.minecraft.world.item.ItemStack resource, net.minecraft.world.item.ItemStack product, int stage, int moistenerValue) Creates an instance of aMoistenerFuelrecord class.- Parameters:
resource- the value for theresourcerecord componentproduct- 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 '=='. -
resource
public net.minecraft.world.item.ItemStack resource()Returns the value of theresourcerecord component.- Returns:
- the value of the
resourcerecord component
-
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
-