Home Migration Guide Getting Started With Scripts Commands Examples
BracketHandlers

AttributeInstance

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.AttributeInstance;

Methods

Return Type: void

script.zs
AttributeInstance.applyNonPersistentModifier(modifier as AttributeModifier) as void
ParameterTypeDescription
Parameter
modifier
Type
AttributeModifier
Description
No Description Provided

Return Type: void

script.zs
AttributeInstance.applyPersistentModifier(modifier as AttributeModifier) as void
ParameterTypeDescription
Parameter
modifier
Type
AttributeModifier
Description
No Description Provided

Return Type: AttributeModifier?

script.zs
AttributeInstance.getModifier(uuid as string) as AttributeModifier?
ParameterTypeDescription
Parameter
uuid
Type
string
Description
No Description Provided

Return Type: boolean

script.zs
AttributeInstance.hasModifier(modifier as AttributeModifier) as boolean
ParameterTypeDescription
Parameter
modifier
Type
AttributeModifier
Description
No Description Provided

Return Type: void

script.zs
AttributeInstance.removeModifier(modifier as AttributeModifier) as void
ParameterTypeDescription
Parameter
modifier
Type
AttributeModifier
Description
No Description Provided

Return Type: void

script.zs
AttributeInstance.removeModifier(uuid as string) as void
ParameterTypeDescription
Parameter
uuid
Type
string
Description
No Description Provided

Properties

NameTypeHas GetterHas SetterDescription
Name
baseValue
Type
double
Has Getter
true
Has Setter
true
Description
No Description Provided
Name
modifiers
Type
stdlib.List<AttributeModifier>
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
value
Type
double
Has Getter
true
Has Setter
false
Description
No Description Provided