AttributeInstance
Link to attributeinstance
Diese Klasse importieren
Link to diese-klasse-importieren
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 Copyimport crafttweaker.api.entity.attribute.AttributeInstance;
Methoden
Link to methoden
Name: addPermanentModifier
ZenScript CopyAttributeInstance.addPermanentModifier(modifier as AttributeModifier)
Parameter | Type |
---|---|
Parameter modifier | Type AttributeModifier |
Name: addTransientModifier
ZenScript CopyAttributeInstance.addTransientModifier(modifier as AttributeModifier)
Parameter | Type |
---|---|
Parameter modifier | Type AttributeModifier |
Name: getBaseValue
Return Type: double
ZenScript Copy// AttributeInstance.getBaseValue() as double
myAttributeInstance.getBaseValue();
Name: getModifier
Return Type: AttributeModifier?
ZenScript CopyAttributeInstance.getModifier(uuid as string) as AttributeModifier?
Parameter | Type |
---|---|
Parameter uuid | Type string |
Name: getModifiers
Return Type: stdlib.List<AttributeModifier>
ZenScript Copy// AttributeInstance.getModifiers() as stdlib.List<AttributeModifier>
myAttributeInstance.getModifiers();
Name: getValue
Return Type: double
ZenScript Copy// AttributeInstance.getValue() as double
myAttributeInstance.getValue();
Name: hasModifier
Return Type: boolean
ZenScript CopyAttributeInstance.hasModifier(modifier as AttributeModifier) as boolean
Parameter | Type |
---|---|
Parameter modifier | Type AttributeModifier |
Name: removeModifier
ZenScript CopyAttributeInstance.removeModifier(modifier as AttributeModifier)
Parameter | Type |
---|---|
Parameter modifier | Type AttributeModifier |
Name: removeModifier
ZenScript CopyAttributeInstance.removeModifier(uuid as string)
Parameter | Type |
---|---|
Parameter uuid | Type string |
Name: setBaseValue
ZenScript CopyAttributeInstance.setBaseValue(value as double)
Parameter | Type |
---|---|
Parameter value | Type double |
Properties
Link to properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name baseValue | Type double | Has Getter true | Has Setter true |
Name modifiers | Type stdlib.List<AttributeModifier> | Has Getter true | Has Setter false |
Name value | Type double | Has Getter true | Has Setter false |