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 aUpgradeMapping
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedestination
record component.net.minecraft.network.chat.Component
Returns the value of thedestinationDisplayName
record component.net.minecraft.world.item.ItemStack
Returns the value of thedisplayItemStack
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of themaxAmount
record component.final String
toString()
Returns a string representation of this record class.net.minecraft.network.chat.Component
Returns the value of theupgradeDisplayName
record component.net.minecraft.world.item.Item
Returns the value of theupgradeItem
record 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 aUpgradeMapping
record class.- Parameters:
destination
- the value for thedestination
record componentupgradeItem
- the value for theupgradeItem
record componentmaxAmount
- the value for themaxAmount
record componentupgradeDisplayName
- the value for theupgradeDisplayName
record componentdestinationDisplayName
- the value for thedestinationDisplayName
record componentdisplayItemStack
- the value for thedisplayItemStack
record 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 thedestination
record component.- Returns:
- the value of the
destination
record component
-
upgradeItem
public net.minecraft.world.item.Item upgradeItem()Returns the value of theupgradeItem
record component.- Returns:
- the value of the
upgradeItem
record component
-
maxAmount
public int maxAmount()Returns the value of themaxAmount
record component.- Returns:
- the value of the
maxAmount
record component
-
upgradeDisplayName
public net.minecraft.network.chat.Component upgradeDisplayName()Returns the value of theupgradeDisplayName
record component.- Returns:
- the value of the
upgradeDisplayName
record component
-
destinationDisplayName
public net.minecraft.network.chat.Component destinationDisplayName()Returns the value of thedestinationDisplayName
record component.- Returns:
- the value of the
destinationDisplayName
record component
-
displayItemStack
public net.minecraft.world.item.ItemStack displayItemStack()Returns the value of thedisplayItemStack
record component.- Returns:
- the value of the
displayItemStack
record component
-