IEntityCreature
Link to ientitycreature
A Creature.
导入相关包
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.IEntityCreature;
Extending
Link to extending-ientityliving
IEntityCreature extends IEntityLiving. That means all functions available to IEntityLiving objects also are available to IEntityCreature.
使用方式
Link to 使用方式
ZenGetters/Setters
Link to zengetterssetters
ZenGetter | 类型 |
---|---|
ZenGetter hasPath | 类型 bool |
ZenGetter isWithinHomeDistance | 类型 bool |
ZenGetter homePosition | 类型 IBlockPos |
ZenGetter maximumHomeDistance | 类型 float |
ZenGetter hasHome | 类型 bool |
ZenMethods
Link to zenmethods
play living sound
Link to play-living-sound
Method expects nothing.
Returns nothing.
ZenScript CopyentCreObj.playLivingSound();
Set or detach home
Link to set-or-detach-home
First method expects an IBlockPos object and an int.
Second method expects nothing.
Both methods return nothing.
ZenScript CopyentAnObj.setHomePositionAndDistance(IBlockPos pos, int distance);
entAnObj.detachHome();
Check if a position is within the home distance
Link to check-if-a-position-is-within-the-home-distance
Method expects an IBlockPos object.
Returns a bool.
ZenScript CopyentAnObj.isPositionWithinHomeDistance