Home Migration Guide Getting Started With Scripts Commands Examples
BracketHandlers

AttributeOperation

Importing the class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

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

Enum Constants

AttributeOperation is an enum. It has 3 enum constants. They are accessible using the code below.

script.zs
AttributeOperation.ADDITION
AttributeOperation.MULTIPLY_BASE
AttributeOperation.MULTIPLY_TOTAL

Methods

Gets the ID of this operation.

Returns: The ID of this operation.
Return Type: int

script.zs
// AttributeOperation.getId() as int
myAttributeOperation.getId();

Properties

NameTypeHas GetterHas SetterDescription
Name
id
Type
int
Has Getter
true
Has Setter
false
Description
Gets the ID of this operation.