IEntityAttributeModifier
Link to ientityattributemodifier
导入相关包
Link to 导入相关包
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.
import crafttweaker.entity.AttributeModifier;
ZenGetters
Link to zengetters
ZenGetter | GetterMethod | 返回值类型 |
---|---|---|
ZenGetter uuid | GetterMethod getUUID() | 返回值类型 string |
ZenGetter name(名称) | GetterMethod getName() | 返回值类型 string |
ZenGetter operation | GetterMethod getOperation() | 返回值类型 int |
ZenGetter amount | GetterMethod getAmount() | 返回值类型 double |
ZenGetter saved | GetterMethod isSaved() | 返回值类型 布尔值 |
ZenSetters
Link to zensetters
SetterName | SetterMethod | 参数类型 |
---|---|---|
SetterName saved | SetterMethod setSaved(boolean) | 参数类型 布尔值 |
Create Modifier
Link to create-modifier
Copyfor operation:
0 = add: Increment X by Amount
1 = multiply_base: Increment Y by X * Amount
2 = multiply: Y = Y * (1 + Amount) (equivalent to Increment Y by Y * Amount).
ZenScript CopyAttributeModifier.createModifier(String name, double amount, int operation, @Optional String uuid);