IEntityLivingBase

Link to ientitylivingbase

A living Entity is one that has health and that can die.
That means Monsters, Animals but also IPlayers.

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.IEntityLivingBase;

IEntityLivingBase extends IEntity. That means all functions available to IEntities also are available to IEntityLivingBase.

ZenGetterReturn Type (can be null)
ZenGetter
activeHand
Return Type (can be null)
IEntityEquipmentSlot
ZenGetter
activeItemStack
Return Type (can be null)
IItemstack
ZenGetter
activePotionEffects
Return Type (can be null)
List<IPotionEffect>
ZenGetter
AIMovementSpeed
Return Type (can be null)
float
ZenGetter
arrowsInEntity
Return Type (can be null)
int
ZenGetter
attackingEntity
Return Type (can be null)
IEntityLivingBase
ZenGetter
canBreatheUnderwater #可以水下呼吸
Return Type (can be null)
布尔值
ZenGetter
health
Return Type (can be null)
float
ZenGetter
isActiveItemStackBlocking
Return Type (can be null)
布尔值
ZenGetter
isChild
Return Type (can be null)
布尔值
ZenGetter
isElytraFlying
Return Type (can be null)
布尔值
ZenGetter
isOnLadder
Return Type (can be null)
布尔值
ZenGetter
isUndead
Return Type (can be null)
布尔值
ZenGetter
lastAttackedEntity
Return Type (can be null)
IEntityLivingBase
ZenGetter
lastAttackedEntityTime
Return Type (can be null)
int
ZenGetter
lastDamageSource
Return Type (can be null)
IDamageSource
ZenGetter
mainHandHeldItem
Return Type (can be null)
IItemstack
ZenGetter
maxHealth
Return Type (can be null)
float
ZenGetter
offHandHeldItem
Return Type (can be null)
IItemstack
ZenGetter
revengeTarget
Return Type (can be null)
IEntityLivingBase
ZenGetter
swingInProgress
Return Type (can be null)
布尔值
ZenGetter
totalArmorValue
Return Type (can be null)
int
ZenGetter
moveForward
Return Type (can be null)
float
ZenGetter
moveStrafing
Return Type (can be null)
float
ZenGetter
moveVertical
Return Type (can be null)
float
ZenSetterParameter Type (can be null)
ZenSetter
AIMovementSpeed
Parameter Type (can be null)
float
ZenSetter
arrowsInEntity
Parameter Type (can be null)
int
ZenSetter
health
Parameter Type (can be null)
float
ZenSetter
lastAttackedEntity
Parameter Type (can be null)
IEntityLivingBase
ZenSetter
revengeTarget
Parameter Type (can be null)
IEntityLivingBase
ZenSetter
swingProgress
Parameter Type (can be null)
int
ZenSetter
moveForward
Parameter Type (can be null)
float
ZenSetter
moveStrafing
Parameter Type (can be null)
float
ZenSetter
moveVertical
Parameter Type (can be null)
float
  • boolean attackEntityFrom(IDamageSource source, float amount) → Does something...
  • boolean canEntityBeSeen(IEntity other);
  • boolean hasItemInSlot(IEntityEquipmentSlot slot);
  • boolean isPotionActive(IPotion potion) → Returns true if the goven potion is active
  • boolean isPotionEffectApplicable(IPotionEffect potionEffect);
  • heal(float amount) → Heals the entity by the amount given
  • IEntityAttributeInstance getAttribute(String name) → Returns the given Attribute
  • IItemStack getItemInSlot(IEntityEquipmentSlot slot);
  • IPotionEffect getActivePotionEffect(IPotion potion);
  • void addPotionEffect(IPotionEffect potionEffect);
  • 无效移除药水效果(IPotion 药水);
  • 无效 clearActivePotions() -> 从实体中移除所有活动的 药剂
  • void knockBack(IEntity source, float strength, double xRatio, double zRatio);
  • a. 在死亡时无效;
  • void onLivingUpdate();
  • void setItemToSlot(IEntityEquipmentSlot slot, IItemStack itemStack);
  • void resetActiveHand();
  • void stopActiveHand();