AttributeInstance
Link to attributeinstance
Importare la Classe
Link to importare-la-classe
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;
Metodi
Link to metodi
Name: addPermanentModifier
ZenScript CopyAttributeInstance.addPermanentModifier(modifier as AttributeModifier)
Parametro | Tipo |
---|---|
Parametro modifier | Tipo AttributeModifier |
Name: addTransientModifier
ZenScript CopyAttributeInstance.addTransientModifier(modifier as AttributeModifier)
Parametro | Tipo |
---|---|
Parametro modifier | Tipo 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?
Parametro | Tipo |
---|---|
Parametro uuid | Tipo 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
Parametro | Tipo |
---|---|
Parametro modifier | Tipo AttributeModifier |
Name: removeModifier
ZenScript CopyAttributeInstance.removeModifier(modifier as AttributeModifier)
Parametro | Tipo |
---|---|
Parametro modifier | Tipo AttributeModifier |
Name: removeModifier
ZenScript CopyAttributeInstance.removeModifier(uuid as string)
Parametro | Tipo |
---|---|
Parametro uuid | Tipo string |
Name: setBaseValue
ZenScript CopyAttributeInstance.setBaseValue(value as double)
Parametro | Tipo |
---|---|
Parametro valore | Tipo double |
Proprietà
Link to proprietà
Nome | Tipo | Ha Getter | Ha Setter |
---|---|---|---|
Nome baseValue | Tipo double | Ha Getter sì | Ha Setter sì |
Nome modifiers | Tipo stdlib.List<AttributeModifier> | Ha Getter sì | Ha Setter no |
Nome valore | Tipo double | Ha Getter sì | Ha Setter no |