IEntityAgeable
Link to ientityageable
An Ageable Entity is one that grows over time, like a cow.
导入相关包
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.IEntityAgeable;
Extending
Link to extending-ientitycreature
IEntityAgeable extends IEntityCreature. That means all functions available to IEntities also are available to IEntityAgeable.
使用方式
Link to 使用方式
ZenGetters/Setters
Link to zengetterssetters
ZenGetter | ZenSetter | 类型 |
---|---|---|
ZenGetter growingAge | ZenSetter growingAge | 类型 int |
ZenGetter | ZenSetter scaleForAge | 类型 bool |
ZenMethods
Link to zenmethods
add age
Link to add-age
Methods expect an int and the second method an optional bool.
Both methods return nothing.
Normally, the second method does the same as the first with false as forced argument, that may differ for mod implementations, though.
ZenScript CopyentAgObj.ageUp(int seconds, @Optional boolean forced);
entAgObj.addGrowth(int seconds);