MCLivingEntity

Импорт класса

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 at the very top of the file.

ZenScript
Copy
import crafttweaker.api.entity.MCLivingEntity;

Extending MCEntity

MCLivingEntity extends MCEntity. That means all methods available in MCEntity are also available in MCLivingEntity

Methods

addPotionEffect

Return Type: boolean

ZenScript
Copy
MCLivingEntity.addPotionEffect(effectInstanceIn as MCPotionEffectInstance) as boolean
ПараметрТипDescription
effectInstanceInMCPotionEffectInstanceNo Description Provided
attackEntityAsMob

Return Type: boolean

ZenScript
Copy
MCLivingEntity.attackEntityAsMob(entityIn as MCEntity) as boolean
ПараметрТипDescription
entityInMCEntityNo Description Provided
attackEntityFrom

Return Type: void

ZenScript
Copy
MCLivingEntity.attackEntityFrom(damageSource as DamageSource, amount as float) as void
ПараметрТипDescription
damageSourceDamageSourceNo Description Provided
amountfloatNo Description Provided
canAttack

Return Type: boolean

ZenScript
Copy
MCLivingEntity.canAttack(target as MCLivingEntity) as boolean
ПараметрТипDescription
targetMCLivingEntityNo Description Provided
canAttack

Return Type: boolean

ZenScript
Copy
MCLivingEntity.canAttack(typeIn as MCEntityType) as boolean
ПараметрТипDescription
typeInMCEntityTypeNo Description Provided
canBeRiddenInWater

Return Type: boolean

ZenScript
Copy
MCLivingEntity.canBeRiddenInWater() as boolean
myMCLivingEntity.canBeRiddenInWater();
canBreatheUnderwater

Return Type: boolean

ZenScript
Copy
MCLivingEntity.canBreatheUnderwater() as boolean
myMCLivingEntity.canBreatheUnderwater();
canEquip

Return Type: boolean

ZenScript
Copy
MCLivingEntity.canEquip(item as MCItemDefinition) as boolean
ПараметрТипDescription
itemMCItemDefinitionNo Description Provided
clearActivePotions

Return Type: boolean

ZenScript
Copy
MCLivingEntity.clearActivePotions() as boolean
myMCLivingEntity.clearActivePotions();
getAIMoveSpeed

Return Type: float

ZenScript
Copy
MCLivingEntity.getAIMoveSpeed() as float
myMCLivingEntity.getAIMoveSpeed();
getActivePotionEffect

Return Type: MCPotionEffectInstance

ZenScript
Copy
MCLivingEntity.getActivePotionEffect(potionIn as MCPotionEffect) as MCPotionEffectInstance
ПараметрТипDescription
potionInMCPotionEffectNo Description Provided
getActivePotionEffects

Return Type: Collection<MCPotionEffectInstance>

ZenScript
Copy
MCLivingEntity.getActivePotionEffects() as Collection<MCPotionEffectInstance>
myMCLivingEntity.getActivePotionEffects();
getActivePotionMap

Return Type: MCPotionEffectInstance[MCPotionEffect]

ZenScript
Copy
MCLivingEntity.getActivePotionMap() as MCPotionEffectInstance[MCPotionEffect]
myMCLivingEntity.getActivePotionMap();
getArmorCoverPercentage

Return Type: float

ZenScript
Copy
MCLivingEntity.getArmorCoverPercentage() as float
myMCLivingEntity.getArmorCoverPercentage();
getArmorInventoryList

Return Type: stdlib.Iterable<ItemStack>

ZenScript
Copy
MCLivingEntity.getArmorInventoryList() as stdlib.Iterable<ItemStack>
myMCLivingEntity.getArmorInventoryList();
getArrowCountInEntity

Return Type: int

ZenScript
Copy
MCLivingEntity.getArrowCountInEntity() as int
myMCLivingEntity.getArrowCountInEntity();
getAttackingEntity

Return Type: MCLivingEntity

ZenScript
Copy
MCLivingEntity.getAttackingEntity() as MCLivingEntity
myMCLivingEntity.getAttackingEntity();
getBeeStingCount

Return Type: int

ZenScript
Copy
MCLivingEntity.getBeeStingCount() as int
myMCLivingEntity.getBeeStingCount();
getHealth

Return Type: float

ZenScript
Copy
MCLivingEntity.getHealth() as float
myMCLivingEntity.getHealth();
getHeldItemMainhand

Return Type: ItemStack

ZenScript
Copy
MCLivingEntity.getHeldItemMainhand() as ItemStack
myMCLivingEntity.getHeldItemMainhand();
getHeldItemOffhand

Return Type: ItemStack

ZenScript
Copy
MCLivingEntity.getHeldItemOffhand() as ItemStack
myMCLivingEntity.getHeldItemOffhand();
getIdleTime

Return Type: int

ZenScript
Copy
MCLivingEntity.getIdleTime() as int
myMCLivingEntity.getIdleTime();
getItemStackFromSlot

Gets the ItemStack in the specific slot.

Return Type: IItemStack

ZenScript
Copy
MCLivingEntity.getItemStackFromSlot(slot as MCEquipmentSlotType) as IItemStack
ПараметрТипDescription
slotMCEquipmentSlotTypeNo Description Provided
getLastAttackedEntity

Return Type: MCLivingEntity

ZenScript
Copy
MCLivingEntity.getLastAttackedEntity() as MCLivingEntity
myMCLivingEntity.getLastAttackedEntity();
getLastAttackedEntityTime

Return Type: int

ZenScript
Copy
MCLivingEntity.getLastAttackedEntityTime() as int
myMCLivingEntity.getLastAttackedEntityTime();
getMaxHealth

Return Type: float

ZenScript
Copy
MCLivingEntity.getMaxHealth() as float
myMCLivingEntity.getMaxHealth();
getRevengeTarget

Return Type: MCLivingEntity

ZenScript
Copy
MCLivingEntity.getRevengeTarget() as MCLivingEntity
myMCLivingEntity.getRevengeTarget();
getRevengeTimer

Return Type: int

ZenScript
Copy
MCLivingEntity.getRevengeTimer() as int
myMCLivingEntity.getRevengeTimer();
getShouldBeDead

Return Type: boolean

ZenScript
Copy
MCLivingEntity.getShouldBeDead() as boolean
myMCLivingEntity.getShouldBeDead();
getTotalArmorValue

Return Type: int

ZenScript
Copy
MCLivingEntity.getTotalArmorValue() as int
myMCLivingEntity.getTotalArmorValue();
heal

Return Type: void

ZenScript
Copy
MCLivingEntity.heal(healAmount as float) as void
ПараметрТипDescription
healAmountfloatNo Description Provided
isAlive

Return Type: boolean

ZenScript
Copy
MCLivingEntity.isAlive() as boolean
myMCLivingEntity.isAlive();
isChild

Return Type: boolean

ZenScript
Copy
MCLivingEntity.isChild() as boolean
myMCLivingEntity.isChild();
isEntityUndead

Return Type: boolean

ZenScript
Copy
MCLivingEntity.isEntityUndead() as boolean
myMCLivingEntity.isEntityUndead();
isOnLadder

Return Type: boolean

ZenScript
Copy
MCLivingEntity.isOnLadder() as boolean
myMCLivingEntity.isOnLadder();
isPotionActive

Return Type: boolean

ZenScript
Copy
MCLivingEntity.isPotionActive(potionIn as MCPotionEffect) as boolean
ПараметрТипDescription
potionInMCPotionEffectNo Description Provided
isPotionApplicable

Return Type: boolean

ZenScript
Copy
MCLivingEntity.isPotionApplicable(potioneffectIn as MCPotionEffectInstance) as boolean
ПараметрТипDescription
potioneffectInMCPotionEffectInstanceNo Description Provided
isWaterSensitive

Return Type: boolean

ZenScript
Copy
MCLivingEntity.isWaterSensitive() as boolean
myMCLivingEntity.isWaterSensitive();
removeActivePotionEffect

Return Type: MCPotionEffectInstance

ZenScript
Copy
MCLivingEntity.removeActivePotionEffect(potioneffectin as MCPotionEffect) as MCPotionEffectInstance
ПараметрТипDescription
potioneffectinMCPotionEffectNo Description Provided
removePotionEffect

Return Type: boolean

ZenScript
Copy
MCLivingEntity.removePotionEffect(effectIn as MCPotionEffect) as boolean
ПараметрТипDescription
effectInMCPotionEffectNo Description Provided
setAIMoveSpeed

Return Type: void

ZenScript
Copy
MCLivingEntity.setAIMoveSpeed(speedIn as float) as void
ПараметрТипDescription
speedInfloatNo Description Provided
setArrowCountInEntity

Return Type: void

ZenScript
Copy
MCLivingEntity.setArrowCountInEntity(count as int) as void
ПараметрТипDescription
countintNo Description Provided
setBeeStingCount

Return Type: void

ZenScript
Copy
MCLivingEntity.setBeeStingCount(p_226300_1_ as int) as void
ПараметрТипDescription
p_226300_1_intNo Description Provided
setHealth

Return Type: void

ZenScript
Copy
MCLivingEntity.setHealth(health as float) as void
ПараметрТипDescription
healthfloatNo Description Provided
setIdleTime

Return Type: void

ZenScript
Copy
MCLivingEntity.setIdleTime(idleTimeIn as int) as void
ПараметрТипDescription
idleTimeInintNo Description Provided
setItemStackToSlot

Sets a copied given itemStack to the slot

Return Type: void

ZenScript
Copy
MCLivingEntity.setItemStackToSlot(slot as MCEquipmentSlotType, itemStack as IItemStack) as void
ПараметрТипDescription
slotMCEquipmentSlotTypeNo Description Provided
элемент СтекIItemStackNo Description Provided
setLastAttackedEntity

Return Type: void

ZenScript
Copy
MCLivingEntity.setLastAttackedEntity(entityIn as MCEntity) as void
ПараметрТипDescription
entityInMCEntityNo Description Provided
setRevengeTarget

Return Type: void

ZenScript
Copy
MCLivingEntity.setRevengeTarget(livingBase as MCLivingEntity) as void
ПараметрТипDescription
livingBaseMCLivingEntityNo Description Provided