Record Class TransformDamage
java.lang.Object
java.lang.Record
com.blamejared.crafttweaker.api.ingredient.transformer.type.TransformDamage
- All Implemented Interfaces:
IIngredientTransformer
@ZenRegister
public record TransformDamage(int amount)
extends Record
implements IIngredientTransformer
-
Field Summary
Fields inherited from interface com.blamejared.crafttweaker.api.ingredient.transformer.IIngredientTransformer
CODEC, STREAM_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionTransformDamage(int amount) Creates an instance of aTransformDamagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintamount()Returns the value of theamountrecord component.final booleanIndicates whether some other object is "equal to" this one.getCommandString(String base) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.transform(IItemStack stack)
-
Constructor Details
-
TransformDamage
public TransformDamage(int amount) Creates an instance of aTransformDamagerecord class.- Parameters:
amount- the value for theamountrecord component
-
-
Method Details
-
transform
- Specified by:
transformin interfaceIIngredientTransformer
-
getCommandString
- Specified by:
getCommandStringin interfaceIIngredientTransformer
-
getSerializer
- Specified by:
getSerializerin interfaceIIngredientTransformer
-
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. All components in this record class are compared with '=='. -
amount
public int amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-