Record Class EquipmentTransform.Input

java.lang.Object
java.lang.Record
forgottentowns.mod.api.EquipmentTransform.Input
Record Components:
equipmentResourceId - exact imbued input resource
baseResourceId - unimbued equipment identity
essenceKey - applied essence identity
outputResourceId - configured single output identity
successPercent - configured chance in the inclusive range 0 to 100
Enclosing interface:
EquipmentTransform

public static record EquipmentTransform.Input(String equipmentResourceId, String baseResourceId, String essenceKey, String outputResourceId, int successPercent) extends Record
Selected equipment and its conversion rule, validated by the host before invoking a handler. Direct record construction does not validate resource identities or the chance range.
  • Constructor Details

    • Input

      public Input(String equipmentResourceId, String baseResourceId, String essenceKey, String outputResourceId, int successPercent)
      Creates an instance of a Input record class.
      Parameters:
      equipmentResourceId - the value for the equipmentResourceId record component
      baseResourceId - the value for the baseResourceId record component
      essenceKey - the value for the essenceKey record component
      outputResourceId - the value for the outputResourceId record component
      successPercent - the value for the successPercent 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.
    • equipmentResourceId

      public String equipmentResourceId()
      Returns the value of the equipmentResourceId record component.
      Returns:
      the value of the equipmentResourceId record component
    • baseResourceId

      public String baseResourceId()
      Returns the value of the baseResourceId record component.
      Returns:
      the value of the baseResourceId record component
    • essenceKey

      public String essenceKey()
      Returns the value of the essenceKey record component.
      Returns:
      the value of the essenceKey record component
    • outputResourceId

      public String outputResourceId()
      Returns the value of the outputResourceId record component.
      Returns:
      the value of the outputResourceId record component
    • successPercent

      public int successPercent()
      Returns the value of the successPercent record component.
      Returns:
      the value of the successPercent record component