AttributeOperation

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.entity.attribute.AttributeOperation;

Implements

AttributeOperation implements the following interfaces:

StringRepresentable

Undocumented Interfaces

Comparable<Enum>

Enum Constants

AttributeOperation is an enum with 3 constants. They are accessible like so:

script.zs
// AttributeOperation.ADDITION
<constant:minecraft:attribute/operation:addition>
// AttributeOperation.MULTIPLY_BASE
<constant:minecraft:attribute/operation:multiply_base>
// AttributeOperation.MULTIPLY_TOTAL
<constant:minecraft:attribute/operation:multiply_total>

Members

Getter
Gets the serialized name.
script.zs
// Operation.serializedName as string
<constant:minecraft:attribute/operation:addition>.serializedName

Return Type: string

serializedName() as string
Gets the serialized name.

Returns: the serialized name.

script.zs
// Operation.serializedName() as string;
<constant:minecraft:attribute/operation:addition>.serializedName();

Return Type: string

Getter
Gets the value of this operation.
script.zs
// Operation.value as int
<constant:minecraft:attribute/operation:addition>.value

Return Type: int

value() as int
Gets the value of this operation.

Returns: The value of this operation.

script.zs
// Operation.value() as int;
<constant:minecraft:attribute/operation:addition>.value();

Return Type: int