Record Class UpgradeMapping
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.common.api.upgrade.UpgradeMapping
@API(status=STABLE,
since="2.0.0-milestone.2.2")
public record UpgradeMapping(UpgradeDestination destination, net.minecraft.world.item.Item upgradeItem, int maxAmount)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionUpgradeMapping(UpgradeDestination destination, net.minecraft.world.item.Item upgradeItem, int maxAmount) Creates an instance of aUpgradeMappingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedestinationrecord 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 themaxAmountrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.world.item.ItemReturns the value of theupgradeItemrecord component.
-
Constructor Details
-
UpgradeMapping
public UpgradeMapping(UpgradeDestination destination, net.minecraft.world.item.Item upgradeItem, int maxAmount) Creates an instance of aUpgradeMappingrecord class.- Parameters:
destination- the value for thedestinationrecord componentupgradeItem- the value for theupgradeItemrecord componentmaxAmount- the value for themaxAmountrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
destination
Returns the value of thedestinationrecord component.- Returns:
- the value of the
destinationrecord component
-
upgradeItem
public net.minecraft.world.item.Item upgradeItem()Returns the value of theupgradeItemrecord component.- Returns:
- the value of the
upgradeItemrecord component
-
maxAmount
public int maxAmount()Returns the value of themaxAmountrecord component.- Returns:
- the value of the
maxAmountrecord component
-