IEntityLiving
Link to ientityliving
A living Entity is one that has health and that can die.
Unlike IEntityLivingBase however, players aren't IEnitiyLiving objects!
导入相关包
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.IEntityLiving;
Extending
Link to extending-ientitylivingbase
IEntityLiving extends IEntityLivingBase. That means all functions available to IEntityLivingBase objects also are available to IEntityLiving objects.
使用方式
Link to 使用方式
ZenGetters/ZenSetters
Link to zengetterszensetters
ZenGetter | ZenSetter | 类型 |
---|---|---|
ZenGetter attackInterval | ZenSetter | 类型 int |
ZenGetter attackTarget | ZenSetter attackTarget | 类型 IEntityLivingBase |
ZenGetter canBeSteered | ZenSetter | 类型 bool |
ZenGetter canPickUpLoot | ZenSetter canPickUpLoot | 类型 bool |
ZenGetter canSpawnHere | ZenSetter | 类型 bool |
ZenGetter getLeashedToEntity | ZenSetter | 类型 IEntity |
ZenGetter isAIDisabled | ZenSetter isAIDisabled | 类型 bool |
ZenGetter isAIDisabled | ZenSetter isAIDisabled | 类型 bool |
ZenGetter isColliding | ZenSetter | 类型 bool |
ZenGetter isLeashed | ZenSetter | 类型 bool |
ZenGetter isLeftHanded | ZenSetter isLeftHanded | 类型 bool |
ZenGetter isNoDespawnRequired | ZenSetter | 类型 bool |
ZenGetter maxSpawnedInChunk | ZenSetter | 类型 int |
ZenGetter | ZenSetter moveForward | 类型 float |
ZenGetter | ZenSetter moveStrafing | 类型 float |
ZenGetter | ZenSetter moveVertival | 类型 float |
ZenGetter renderSizeModifier | ZenSetter | 类型 float |
ZenMethods
Link to zenmethods
Play living sound
Link to play-living-sound
Requires no parameters.
Returns nothing.
ZenScript CopyebtLiv.playLivingSound();
Spawn explosion particles
Link to spawn-explosion-particles
Requires no parameters.
Returns nothing.
ZenScript CopyebtLiv.spawnExplosionParticle();
Set the drop chance for an Equipment Slot
Link to set-the-drop-chance-for-an-equipment-slot
Requires an IEntityEquipmentSlot object and a float.
Returns nothing.
ZenScript CopyebtLiv.setDropChance(IEntityEquipmentSlot slot, float chance);
Enable Persistence
Link to enable-persistence
Requires no parameters.
Returns nothing.
ZenScript CopyebtLiv.enablePersistence();
Leashes
Link to leashes
First method requires an IEntity object, a boolean and returns nothing. Second method requires two booleans and returns nothing.
Third method requires an IPlayer object and returns a bool.
ZenScript CopyebtLiv.setLeashedToEntity(IEntity enttiy, boolean sendAttachNotification);
ebtLiv.clearLeashed(boolean sendPacket, boolean dropLead);
ebtLiv.canBeLeashedTo(IPlayer player);