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, net.minecraft.network.chat.Component upgradeDisplayName, net.minecraft.network.chat.Component destinationDisplayName, net.minecraft.world.item.ItemStack displayItemStack)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionUpgradeMapping(UpgradeDestination destination, net.minecraft.world.item.Item upgradeItem, int maxAmount, net.minecraft.network.chat.Component upgradeDisplayName, net.minecraft.network.chat.Component destinationDisplayName, net.minecraft.world.item.ItemStack displayItemStack) Creates an instance of aUpgradeMappingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedestinationrecord component.net.minecraft.network.chat.ComponentReturns the value of thedestinationDisplayNamerecord component.net.minecraft.world.item.ItemStackReturns the value of thedisplayItemStackrecord 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.network.chat.ComponentReturns the value of theupgradeDisplayNamerecord component.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, net.minecraft.network.chat.Component upgradeDisplayName, net.minecraft.network.chat.Component destinationDisplayName, net.minecraft.world.item.ItemStack displayItemStack) Creates an instance of aUpgradeMappingrecord class.- Parameters:
destination- the value for thedestinationrecord componentupgradeItem- the value for theupgradeItemrecord componentmaxAmount- the value for themaxAmountrecord componentupgradeDisplayName- the value for theupgradeDisplayNamerecord componentdestinationDisplayName- the value for thedestinationDisplayNamerecord componentdisplayItemStack- the value for thedisplayItemStackrecord 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 '=='. -
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
-
upgradeDisplayName
public net.minecraft.network.chat.Component upgradeDisplayName()Returns the value of theupgradeDisplayNamerecord component.- Returns:
- the value of the
upgradeDisplayNamerecord component
-
destinationDisplayName
public net.minecraft.network.chat.Component destinationDisplayName()Returns the value of thedestinationDisplayNamerecord component.- Returns:
- the value of the
destinationDisplayNamerecord component
-
displayItemStack
public net.minecraft.world.item.ItemStack displayItemStack()Returns the value of thedisplayItemStackrecord component.- Returns:
- the value of the
displayItemStackrecord component
-