Importare la Classe

Link to importare-la-classe

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

Link to extending-mcentity

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

Name: addPotionEffect

Return Type: boolean

ZenScript
Copy
MCLivingEntity.addPotionEffect(effectInstanceIn as MCPotionEffectInstance) as boolean
ParametroTipoDescrizione
Parametro
effectInstanceIn
Tipo
MCPotionEffectInstance
Descrizione
No Description Provided

Link to attackEntityAsMob

Name: attackEntityAsMob

Return Type: boolean

ZenScript
Copy
MCLivingEntity.attackEntityAsMob(entityIn as MCEntity) as boolean
ParametroTipoDescrizione
Parametro
entityIn
Tipo
MCEntity
Descrizione
No Description Provided

Link to attackEntityFrom

Name: attackEntityFrom

Return Type: void

ZenScript
Copy
MCLivingEntity.attackEntityFrom(damageSource as DamageSource, amount as float) as void
ParametroTipoDescrizione
Parametro
damageSource
Tipo
DamageSource
Descrizione
No Description Provided
Parametro
amount
Tipo
float
Descrizione
No Description Provided

Name: canAttack

Return Type: boolean

ZenScript
Copy
MCLivingEntity.canAttack(target as MCLivingEntity) as boolean
ParametroTipoDescrizione
Parametro
target
Tipo
MCLivingEntity
Descrizione
No Description Provided

Name: canAttack

Return Type: boolean

ZenScript
Copy
MCLivingEntity.canAttack(typeIn as MCEntityType) as boolean
ParametroTipoDescrizione
Parametro
typeIn
Tipo
MCEntityType
Descrizione
No Description Provided

Link to canBeRiddenInWater

Name: canBeRiddenInWater

Return Type: boolean

ZenScript
Copy
// MCLivingEntity.canBeRiddenInWater() as boolean

myMCLivingEntity.canBeRiddenInWater();

Link to canBreatheUnderwater

Name: canBreatheUnderwater

Return Type: boolean

ZenScript
Copy
// MCLivingEntity.canBreatheUnderwater() as boolean

myMCLivingEntity.canBreatheUnderwater();

Name: canEquip

Return Type: boolean

ZenScript
Copy
MCLivingEntity.canEquip(item as MCItemDefinition) as boolean
ParametroTipoDescrizione
Parametro
item
Tipo
MCItemDefinition
Descrizione
No Description Provided

Link to clearActivePotions

Name: clearActivePotions

Return Type: boolean

ZenScript
Copy
// MCLivingEntity.clearActivePotions() as boolean

myMCLivingEntity.clearActivePotions();

Name: getAIMoveSpeed

Return Type: float

ZenScript
Copy
// MCLivingEntity.getAIMoveSpeed() as float

myMCLivingEntity.getAIMoveSpeed();

Link to getActivePotionEffect

Name: getActivePotionEffect

Return Type: MCPotionEffectInstance

ZenScript
Copy
MCLivingEntity.getActivePotionEffect(potionIn as MCPotionEffect) as MCPotionEffectInstance
ParametroTipoDescrizione
Parametro
potionIn
Tipo
MCPotionEffect
Descrizione
No Description Provided

Link to getActivePotionEffects

Name: getActivePotionEffects

Return Type: Collection<MCPotionEffectInstance>

ZenScript
Copy
// MCLivingEntity.getActivePotionEffects() as Collection<MCPotionEffectInstance>

myMCLivingEntity.getActivePotionEffects();

Link to getActivePotionMap

Name: getActivePotionMap

Return Type: MCPotionEffectInstance[MCPotionEffect]

ZenScript
Copy
// MCLivingEntity.getActivePotionMap() as MCPotionEffectInstance[MCPotionEffect]

myMCLivingEntity.getActivePotionMap();

Link to getArmorCoverPercentage

Name: getArmorCoverPercentage

Return Type: float

ZenScript
Copy
// MCLivingEntity.getArmorCoverPercentage() as float

myMCLivingEntity.getArmorCoverPercentage();

Link to getArmorInventoryList

Name: getArmorInventoryList

Return Type: stdlib.Iterable<ItemStack>

ZenScript
Copy
// MCLivingEntity.getArmorInventoryList() as stdlib.Iterable<ItemStack>

myMCLivingEntity.getArmorInventoryList();

Link to getArrowCountInEntity

Name: getArrowCountInEntity

Return Type: int

ZenScript
Copy
// MCLivingEntity.getArrowCountInEntity() as int

myMCLivingEntity.getArrowCountInEntity();

Link to getAttackingEntity

Name: getAttackingEntity

Return Type: MCLivingEntity

ZenScript
Copy
// MCLivingEntity.getAttackingEntity() as MCLivingEntity

myMCLivingEntity.getAttackingEntity();

Name: getAttribute

Return Type: AttributeInstance?

ZenScript
Copy
// MCLivingEntity.getAttribute(attribute as Attribute) as AttributeInstance?

myMCLivingEntity.getAttribute(<attribute:minecraft:generic.attack_damage>);
ParametroTipoDescrizione
Parametro
attribute
Tipo
Attribute
Descrizione
No Description Provided

Link to getBeeStingCount

Name: getBeeStingCount

Return Type: int

ZenScript
Copy
// MCLivingEntity.getBeeStingCount() as int

myMCLivingEntity.getBeeStingCount();

Name: getHealth

Return Type: float

ZenScript
Copy
// MCLivingEntity.getHealth() as float

myMCLivingEntity.getHealth();

Name: getHeldItem

Gets the ItemStack in the specific hand.

Returns: The ItemStack in the specific hand.
Return Type: IItemStack

ZenScript
Copy
// MCLivingEntity.getHeldItem(hand as MCHand) as IItemStack

myMCLivingEntity.getHeldItem(MCHand.MAIN_HAND);
ParametroTipoDescrizione
Parametro
hand
Tipo
MCHand
Descrizione
No Description Provided

Link to getHeldItemMainhand

Name: getHeldItemMainhand

Return Type: ItemStack

ZenScript
Copy
// MCLivingEntity.getHeldItemMainhand() as ItemStack

myMCLivingEntity.getHeldItemMainhand();

Link to getHeldItemOffhand

Name: getHeldItemOffhand

Return Type: ItemStack

ZenScript
Copy
// MCLivingEntity.getHeldItemOffhand() as ItemStack

myMCLivingEntity.getHeldItemOffhand();

Name: getIdleTime

Return Type: int

ZenScript
Copy
// MCLivingEntity.getIdleTime() as int

myMCLivingEntity.getIdleTime();

Link to getItemStackFromSlot

Name: getItemStackFromSlot

Gets the ItemStack in the specific slot.

Returns: The ItemStack in the specific slot.
Return Type: IItemStack

ZenScript
Copy
MCLivingEntity.getItemStackFromSlot(slot as MCEquipmentSlotType) as IItemStack
ParametroTipoDescrizione
Parametro
slot
Tipo
MCEquipmentSlotType
Descrizione
No Description Provided

Link to getLastAttackedEntity

Name: getLastAttackedEntity

Return Type: MCLivingEntity

ZenScript
Copy
// MCLivingEntity.getLastAttackedEntity() as MCLivingEntity

myMCLivingEntity.getLastAttackedEntity();

Link to getLastAttackedEntityTime

Name: getLastAttackedEntityTime

Return Type: int

ZenScript
Copy
// MCLivingEntity.getLastAttackedEntityTime() as int

myMCLivingEntity.getLastAttackedEntityTime();

Name: getMaxHealth

Return Type: float

ZenScript
Copy
// MCLivingEntity.getMaxHealth() as float

myMCLivingEntity.getMaxHealth();

Link to getRevengeTarget

Name: getRevengeTarget

Return Type: MCLivingEntity

ZenScript
Copy
// MCLivingEntity.getRevengeTarget() as MCLivingEntity

myMCLivingEntity.getRevengeTarget();

Name: getRevengeTimer

Return Type: int

ZenScript
Copy
// MCLivingEntity.getRevengeTimer() as int

myMCLivingEntity.getRevengeTimer();

Name: getShouldBeDead

Return Type: boolean

ZenScript
Copy
// MCLivingEntity.getShouldBeDead() as boolean

myMCLivingEntity.getShouldBeDead();

Link to getTotalArmorValue

Name: getTotalArmorValue

Return Type: int

ZenScript
Copy
// MCLivingEntity.getTotalArmorValue() as int

myMCLivingEntity.getTotalArmorValue();

Name: heal

Return Type: void

ZenScript
Copy
MCLivingEntity.heal(healAmount as float) as void
ParametroTipoDescrizione
Parametro
healAmount
Tipo
float
Descrizione
No Description Provided

Name: isAlive

Return Type: boolean

ZenScript
Copy
// MCLivingEntity.isAlive() as boolean

myMCLivingEntity.isAlive();

Name: isChild

Return Type: boolean

ZenScript
Copy
// MCLivingEntity.isChild() as boolean

myMCLivingEntity.isChild();

Name: isEntityUndead

Return Type: boolean

ZenScript
Copy
// MCLivingEntity.isEntityUndead() as boolean

myMCLivingEntity.isEntityUndead();

Name: isOnLadder

Return Type: boolean

ZenScript
Copy
// MCLivingEntity.isOnLadder() as boolean

myMCLivingEntity.isOnLadder();

Name: isPotionActive

Return Type: boolean

ZenScript
Copy
MCLivingEntity.isPotionActive(potionIn as MCPotionEffect) as boolean
ParametroTipoDescrizione
Parametro
potionIn
Tipo
MCPotionEffect
Descrizione
No Description Provided

Link to isPotionApplicable

Name: isPotionApplicable

Return Type: boolean

ZenScript
Copy
MCLivingEntity.isPotionApplicable(potioneffectIn as MCPotionEffectInstance) as boolean
ParametroTipoDescrizione
Parametro
potioneffectIn
Tipo
MCPotionEffectInstance
Descrizione
No Description Provided

Link to isWaterSensitive

Name: isWaterSensitive

Return Type: boolean

ZenScript
Copy
// MCLivingEntity.isWaterSensitive() as boolean

myMCLivingEntity.isWaterSensitive();

Link to removeActivePotionEffect

Name: removeActivePotionEffect

Return Type: MCPotionEffectInstance

ZenScript
Copy
MCLivingEntity.removeActivePotionEffect(potioneffectin as MCPotionEffect) as MCPotionEffectInstance
ParametroTipoDescrizione
Parametro
potioneffectin
Tipo
MCPotionEffect
Descrizione
No Description Provided

Link to removePotionEffect

Name: removePotionEffect

Return Type: boolean

ZenScript
Copy
MCLivingEntity.removePotionEffect(effectIn as MCPotionEffect) as boolean
ParametroTipoDescrizione
Parametro
effectIn
Tipo
MCPotionEffect
Descrizione
No Description Provided

Name: setAIMoveSpeed

Return Type: void

ZenScript
Copy
MCLivingEntity.setAIMoveSpeed(speedIn as float) as void
ParametroTipoDescrizione
Parametro
speedIn
Tipo
float
Descrizione
No Description Provided

Link to setArrowCountInEntity

Name: setArrowCountInEntity

Return Type: void

ZenScript
Copy
MCLivingEntity.setArrowCountInEntity(count as int) as void
ParametroTipoDescrizione
Parametro
count
Tipo
int
Descrizione
No Description Provided

Link to setBeeStingCount

Name: setBeeStingCount

Return Type: void

ZenScript
Copy
MCLivingEntity.setBeeStingCount(p_226300_1_ as int) as void
ParametroTipoDescrizione
Parametro
p_226300_1_
Tipo
int
Descrizione
No Description Provided

Name: setHealth

Return Type: void

ZenScript
Copy
MCLivingEntity.setHealth(health as float) as void
ParametroTipoDescrizione
Parametro
health
Tipo
float
Descrizione
No Description Provided

Name: setHeldItem

Sets a copied given itemStack to the hand

Return Type: void

ZenScript
Copy
// MCLivingEntity.setHeldItem(hand as MCHand, itemStack as IItemStack) as void

myMCLivingEntity.setHeldItem(MCHand.MAIN_HAND, <item:minecraft:diamond>);
ParametroTipoDescrizione
Parametro
hand
Tipo
MCHand
Descrizione
No Description Provided
Parametro
itemStack
Tipo
IItemStack
Descrizione
No Description Provided

Name: setIdleTime

Return Type: void

ZenScript
Copy
MCLivingEntity.setIdleTime(idleTimeIn as int) as void
ParametroTipoDescrizione
Parametro
idleTimeIn
Tipo
int
Descrizione
No Description Provided

Link to setItemStackToSlot

Name: setItemStackToSlot

Sets a copied given itemStack to the slot

Return Type: void

ZenScript
Copy
MCLivingEntity.setItemStackToSlot(slot as MCEquipmentSlotType, itemStack as IItemStack) as void
ParametroTipoDescrizione
Parametro
slot
Tipo
MCEquipmentSlotType
Descrizione
No Description Provided
Parametro
itemStack
Tipo
IItemStack
Descrizione
No Description Provided

Link to setLastAttackedEntity

Name: setLastAttackedEntity

Return Type: void

ZenScript
Copy
MCLivingEntity.setLastAttackedEntity(entityIn as MCEntity) as void
ParametroTipoDescrizione
Parametro
entityIn
Tipo
MCEntity
Descrizione
No Description Provided

Link to setRevengeTarget

Name: setRevengeTarget

Return Type: void

ZenScript
Copy
MCLivingEntity.setRevengeTarget(livingBase as MCLivingEntity) as void
ParametroTipoDescrizione
Parametro
livingBase
Tipo
MCLivingEntity
Descrizione
No Description Provided