Record Class TransformReplace
java.lang.Object
java.lang.Record
com.blamejared.crafttweaker.api.ingredient.transformer.type.TransformReplace
- All Implemented Interfaces:
IIngredientTransformer
@ZenRegister
public record TransformReplace(IItemStack replaceWith)
extends Record
implements IIngredientTransformer
-
Field Summary
Fields inherited from interface com.blamejared.crafttweaker.api.ingredient.transformer.IIngredientTransformer
CODEC, STREAM_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionTransformReplace(IItemStack replaceWith) Creates an instance of aTransformReplacerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getCommandString(String base) final inthashCode()Returns a hash code value for this object.Returns the value of thereplaceWithrecord component.final StringtoString()Returns a string representation of this record class.transform(IItemStack stack)
-
Constructor Details
-
TransformReplace
Creates an instance of aTransformReplacerecord class.- Parameters:
replaceWith- the value for thereplaceWithrecord 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 withObjects::equals(Object,Object). -
replaceWith
Returns the value of thereplaceWithrecord component.- Returns:
- the value of the
replaceWithrecord component
-