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

    Constructors
    Constructor
    Description
    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 a UpgradeMapping record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the destination record component.
    net.minecraft.network.chat.Component
    Returns the value of the destinationDisplayName record component.
    net.minecraft.world.item.ItemStack
    Returns the value of the displayItemStack record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the maxAmount record component.
    final String
    Returns a string representation of this record class.
    net.minecraft.network.chat.Component
    Returns the value of the upgradeDisplayName record component.
    net.minecraft.world.item.Item
    Returns the value of the upgradeItem record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a UpgradeMapping record class.
      Parameters:
      destination - the value for the destination record component
      upgradeItem - the value for the upgradeItem record component
      maxAmount - the value for the maxAmount record component
      upgradeDisplayName - the value for the upgradeDisplayName record component
      destinationDisplayName - the value for the destinationDisplayName record component
      displayItemStack - the value for the displayItemStack record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • destination

      public UpgradeDestination destination()
      Returns the value of the destination record component.
      Returns:
      the value of the destination record component
    • upgradeItem

      public net.minecraft.world.item.Item upgradeItem()
      Returns the value of the upgradeItem record component.
      Returns:
      the value of the upgradeItem record component
    • maxAmount

      public int maxAmount()
      Returns the value of the maxAmount record component.
      Returns:
      the value of the maxAmount record component
    • upgradeDisplayName

      public net.minecraft.network.chat.Component upgradeDisplayName()
      Returns the value of the upgradeDisplayName record component.
      Returns:
      the value of the upgradeDisplayName record component
    • destinationDisplayName

      public net.minecraft.network.chat.Component destinationDisplayName()
      Returns the value of the destinationDisplayName record component.
      Returns:
      the value of the destinationDisplayName record component
    • displayItemStack

      public net.minecraft.world.item.ItemStack displayItemStack()
      Returns the value of the displayItemStack record component.
      Returns:
      the value of the displayItemStack record component