AttributeModifier

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.

ZenScript
Copy
import crafttweaker.api.entity.AttributeModifier;

Methods

getAmount

Gets the amount of this AttributeModifier.

Returns: The amount of this AttributeModifier.
Return Type: double

ZenScript
Copy
// AttributeModifier.getAmount() as double

myAttributeModifier.getAmount();
getID

Gets the ID of this AttributeModifier.

Returns: The ID of this AttributeModifier
Return Type: string

ZenScript
Copy
// AttributeModifier.getID() as string

myAttributeModifier.getID();
getName

Gets the name of this AttributeModifier.

Returns: The name of this AttributeModifier.
Return Type: string

ZenScript
Copy
// AttributeModifier.getName() as string

myAttributeModifier.getName();
getOperation

Gets the operation of this AttributeModifier.

Returns: The operation of this AttributeModifier.
Return Type: AttributeOperation

ZenScript
Copy
// AttributeModifier.getOperation() as AttributeOperation

myAttributeModifier.getOperation();

Properties

이름TypeHas GetterHas SetterDescription
amountdoubletruefalseGets the amount of this AttributeModifier.
idstringtruefalseGets the ID of this AttributeModifier.
namestringtruefalseGets the name of this AttributeModifier.
operationAttributeOperationtruefalseGets the operation of this AttributeModifier.