Importing the class

Link to importing-the-class

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

Link to g-

Name: addPotionEffect

Return Type: boolean

ZenScript
Copy
MCLivingEntity.addPotionEffect(effectInstanceIn as MCPotionEffectInstance) as boolean
ParameterTypeDescription
Parameter
effectInstanceIn
Type
MCPotionEffectInstance
Description
No Description Provided

Link to g--1

Name: attackEntityAsMob

Return Type: boolean

ZenScript
Copy
MCLivingEntity.attackEntityAsMob(entityIn as MCEntity) as boolean
ParameterTypeDescription
Parameter
entityIn
Type
MCEntity
Description
No Description Provided

Link to g--2

Name: attackEntityFrom

Return Type: void

ZenScript
Copy
MCLivingEntity.attackEntityFrom(damageSource as DamageSource, amount as float) as void
ParameterTypeDescription
Parameter
damageSource
Type
DamageSource
Description
No Description Provided
Parameter
amount
Type
float
Description
No Description Provided

Link to g--3

Name: canAttack

Return Type: boolean

ZenScript
Copy
MCLivingEntity.canAttack(target as MCLivingEntity) as boolean
ParameterTypeDescription
Parameter
target
Type
MCLivingEntity
Description
No Description Provided

Link to g--4

Name: canAttack

Return Type: boolean

ZenScript
Copy
MCLivingEntity.canAttack(typeIn as MCEntityType) as boolean
ParameterTypeDescription
Parameter
typeIn
Type
MCEntityType
Description
No Description Provided

Link to g--5

Name: canBeRiddenInWater

Return Type: boolean

ZenScript
Copy
// MCLivingEntity.canBeRiddenInWater() as boolean

myMCLivingEntity.canBeRiddenInWater();

Link to g--6

Name: canBreatheUnderwater

Return Type: boolean

ZenScript
Copy
// MCLivingEntity.canBreatheUnderwater() as boolean

myMCLivingEntity.canBreatheUnderwater();

Link to g--7

Name: canEquip

Return Type: boolean

ZenScript
Copy
MCLivingEntity.canEquip(item as MCItemDefinition) as boolean
ParameterTypeDescription
Parameter
item
Type
MCItemDefinition
Description
No Description Provided

Link to g--8

Name: clearActivePotions

Return Type: boolean

ZenScript
Copy
// MCLivingEntity.clearActivePotions() as boolean

myMCLivingEntity.clearActivePotions();

Link to g--9

Name: getAIMoveSpeed

Return Type: float

ZenScript
Copy
// MCLivingEntity.getAIMoveSpeed() as float

myMCLivingEntity.getAIMoveSpeed();

Link to g--10

Name: getActivePotionEffect

Return Type: MCPotionEffectInstance

ZenScript
Copy
MCLivingEntity.getActivePotionEffect(potionIn as MCPotionEffect) as MCPotionEffectInstance
ParameterTypeDescription
Parameter
potionIn
Type
MCPotionEffect
Description
No Description Provided

Link to g--11

Name: getActivePotionEffects

Return Type: Collection<MCPotionEffectInstance>

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

myMCLivingEntity.getActivePotionEffects();

Link to g--12

Name: getActivePotionMap

Return Type: MCPotionEffectInstance[MCPotionEffect]

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

myMCLivingEntity.getActivePotionMap();

Link to g--13

Name: getArmorCoverPercentage

Return Type: float

ZenScript
Copy
// MCLivingEntity.getArmorCoverPercentage() as float

myMCLivingEntity.getArmorCoverPercentage();

Link to g--14

Name: getArmorInventoryList

Return Type: stdlib.Iterable<ItemStack>

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

myMCLivingEntity.getArmorInventoryList();

Link to g--15

Name: getArrowCountInEntity

Return Type: int

ZenScript
Copy
// MCLivingEntity.getArrowCountInEntity() as int

myMCLivingEntity.getArrowCountInEntity();

Link to g--16

Name: getAttackingEntity

Return Type: MCLivingEntity

ZenScript
Copy
// MCLivingEntity.getAttackingEntity() as MCLivingEntity

myMCLivingEntity.getAttackingEntity();

Link to g--17

Name: getAttribute

Return Type: AttributeInstance?

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

myMCLivingEntity.getAttribute(<attribute:minecraft:generic.attack_damage>);
ParameterTypeDescription
Parameter
attribute
Type
Attribute
Description
No Description Provided

Link to g--18

Name: getBeeStingCount

Return Type: int

ZenScript
Copy
// MCLivingEntity.getBeeStingCount() as int

myMCLivingEntity.getBeeStingCount();

Link to g--19

Name: getHealth

Return Type: float

ZenScript
Copy
// MCLivingEntity.getHealth() as float

myMCLivingEntity.getHealth();

Link to g--20

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);
ParameterTypeDescription
Parameter
hand
Type
MCHand
Description
No Description Provided

Link to g--21

Name: getHeldItemMainhand

Return Type: ItemStack

ZenScript
Copy
// MCLivingEntity.getHeldItemMainhand() as ItemStack

myMCLivingEntity.getHeldItemMainhand();

Link to g--22

Name: getHeldItemOffhand

Return Type: ItemStack

ZenScript
Copy
// MCLivingEntity.getHeldItemOffhand() as ItemStack

myMCLivingEntity.getHeldItemOffhand();

Link to g--23

Name: getIdleTime

Return Type: int

ZenScript
Copy
// MCLivingEntity.getIdleTime() as int

myMCLivingEntity.getIdleTime();

Link to g--24

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
ParameterTypeDescription
Parameter
slot
Type
MCEquipmentSlotType
Description
No Description Provided

Link to g--25

Name: getLastAttackedEntity

Return Type: MCLivingEntity

ZenScript
Copy
// MCLivingEntity.getLastAttackedEntity() as MCLivingEntity

myMCLivingEntity.getLastAttackedEntity();

Link to g--26

Name: getLastAttackedEntityTime

Return Type: int

ZenScript
Copy
// MCLivingEntity.getLastAttackedEntityTime() as int

myMCLivingEntity.getLastAttackedEntityTime();

Link to g--27

Name: getMaxHealth

Return Type: float

ZenScript
Copy
// MCLivingEntity.getMaxHealth() as float

myMCLivingEntity.getMaxHealth();

Link to g--28

Name: getRevengeTarget

Return Type: MCLivingEntity

ZenScript
Copy
// MCLivingEntity.getRevengeTarget() as MCLivingEntity

myMCLivingEntity.getRevengeTarget();

Link to g--29

Name: getRevengeTimer

Return Type: int

ZenScript
Copy
// MCLivingEntity.getRevengeTimer() as int

myMCLivingEntity.getRevengeTimer();

Link to g--30

Name: getShouldBeDead

Return Type: boolean

ZenScript
Copy
// MCLivingEntity.getShouldBeDead() as boolean

myMCLivingEntity.getShouldBeDead();

Link to g--31

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
ParameterTypeDescription
Parameter
healAmount
Type
float
Description
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();

Link to g--35

Name: isEntityUndead

Return Type: boolean

ZenScript
Copy
// MCLivingEntity.isEntityUndead() as boolean

myMCLivingEntity.isEntityUndead();

Link to g--36

Name: isOnLadder

Return Type: boolean

ZenScript
Copy
// MCLivingEntity.isOnLadder() as boolean

myMCLivingEntity.isOnLadder();

Link to g--37

Name: isPotionActive

Return Type: boolean

ZenScript
Copy
MCLivingEntity.isPotionActive(potionIn as MCPotionEffect) as boolean
ParameterTypeDescription
Parameter
potionIn
Type
MCPotionEffect
Description
No Description Provided

Link to g--38

Name: isPotionApplicable

Return Type: boolean

ZenScript
Copy
MCLivingEntity.isPotionApplicable(potioneffectIn as MCPotionEffectInstance) as boolean
ParameterTypeDescription
Parameter
potioneffectIn
Type
MCPotionEffectInstance
Description
No Description Provided

Link to g--39

Name: isWaterSensitive

Return Type: boolean

ZenScript
Copy
// MCLivingEntity.isWaterSensitive() as boolean

myMCLivingEntity.isWaterSensitive();

Link to g--40

Name: removeActivePotionEffect

Return Type: MCPotionEffectInstance

ZenScript
Copy
MCLivingEntity.removeActivePotionEffect(potioneffectin as MCPotionEffect) as MCPotionEffectInstance
ParameterTypeDescription
Parameter
potioneffectin
Type
MCPotionEffect
Description
No Description Provided

Link to g--41

Name: removePotionEffect

Return Type: boolean

ZenScript
Copy
MCLivingEntity.removePotionEffect(effectIn as MCPotionEffect) as boolean
ParameterTypeDescription
Parameter
effectIn
Type
MCPotionEffect
Description
No Description Provided

Link to g--42

Name: setAIMoveSpeed

Return Type: void

ZenScript
Copy
MCLivingEntity.setAIMoveSpeed(speedIn as float) as void
ParameterTypeDescription
Parameter
speedIn
Type
float
Description
No Description Provided

Link to g--43

Name: setArrowCountInEntity

Return Type: void

ZenScript
Copy
MCLivingEntity.setArrowCountInEntity(count as int) as void
ParameterTypeDescription
Parameter
count
Type
int
Description
No Description Provided

Link to g--44

Name: setBeeStingCount

Return Type: void

ZenScript
Copy
MCLivingEntity.setBeeStingCount(p_226300_1_ as int) as void
ParameterTypeDescription
Parameter
p_226300_1_
Type
int
Description
No Description Provided

Link to g--45

Name: setHealth

Return Type: void

ZenScript
Copy
MCLivingEntity.setHealth(health as float) as void
ParameterTypeDescription
Parameter
health
Type
float
Description
No Description Provided

Link to g--46

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>);
ParameterTypeDescription
Parameter
hand
Type
MCHand
Description
No Description Provided
Parameter
pila de objetos
Type
IItemStack
Description
No Description Provided

Link to g--47

Name: setIdleTime

Return Type: void

ZenScript
Copy
MCLivingEntity.setIdleTime(idleTimeIn as int) as void
ParameterTypeDescription
Parameter
idleTimeIn
Type
int
Description
No Description Provided

Link to g--48

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
ParameterTypeDescription
Parameter
slot
Type
MCEquipmentSlotType
Description
No Description Provided
Parameter
pila de objetos
Type
IItemStack
Description
No Description Provided

Link to g--49

Name: setLastAttackedEntity

Return Type: void

ZenScript
Copy
MCLivingEntity.setLastAttackedEntity(entityIn as MCEntity) as void
ParameterTypeDescription
Parameter
entityIn
Type
MCEntity
Description
No Description Provided

Link to g--50

Name: setRevengeTarget

Return Type: void

ZenScript
Copy
MCLivingEntity.setRevengeTarget(livingBase as MCLivingEntity) as void
ParameterTypeDescription
Parameter
livingBase
Type
MCLivingEntity
Description
No Description Provided