Package forgottentowns.mod.api
Record Class EquipmentTransform.Input
java.lang.Object
java.lang.Record
forgottentowns.mod.api.EquipmentTransform.Input
- Record Components:
equipmentResourceId- exact imbued input resourcebaseResourceId- unimbued equipment identityessenceKey- applied essence identityoutputResourceId- configured single output identitysuccessPercent- 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebaseResourceIdrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theequipmentResourceIdrecord component.Returns the value of theessenceKeyrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theoutputResourceIdrecord component.intReturns the value of thesuccessPercentrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Input
public Input(String equipmentResourceId, String baseResourceId, String essenceKey, String outputResourceId, int successPercent) Creates an instance of aInputrecord class.- Parameters:
equipmentResourceId- the value for theequipmentResourceIdrecord componentbaseResourceId- the value for thebaseResourceIdrecord componentessenceKey- the value for theessenceKeyrecord componentoutputResourceId- the value for theoutputResourceIdrecord componentsuccessPercent- the value for thesuccessPercentrecord 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 '=='. -
equipmentResourceId
Returns the value of theequipmentResourceIdrecord component.- Returns:
- the value of the
equipmentResourceIdrecord component
-
baseResourceId
Returns the value of thebaseResourceIdrecord component.- Returns:
- the value of the
baseResourceIdrecord component
-
essenceKey
Returns the value of theessenceKeyrecord component.- Returns:
- the value of the
essenceKeyrecord component
-
outputResourceId
Returns the value of theoutputResourceIdrecord component.- Returns:
- the value of the
outputResourceIdrecord component
-
successPercent
public int successPercent()Returns the value of thesuccessPercentrecord component.- Returns:
- the value of the
successPercentrecord component
-