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

Extending Entity

Link to extending-entity

LivingEntity extends Entity. That means all methods available in Entity are also available in LivingEntity

Name: addEffect

Return Type: boolean

ZenScript
Copy
LivingEntity.addEffect(effectInstance as MobEffectInstance) as boolean
ParameterType
Parameter
effectInstance
Type
MobEffectInstance

Name: addEffect

Return Type: boolean

ZenScript
Copy
LivingEntity.addEffect(effectInstance as MobEffectInstance, entity as Entity?) as boolean
ParameterType
Parameter
effectInstance
Type
MobEffectInstance
Parameter
entity
Type
Entity?

Name: attackable

Return Type: boolean

ZenScript
Copy
// LivingEntity.attackable() as boolean

myLivingEntity.attackable();

Name: canAttack

Return Type: boolean

ZenScript
Copy
LivingEntity.canAttack(target as LivingEntity) as boolean
ParameterType
Parameter
target
Type
LivingEntity

Name: canBeAffected

Return Type: boolean

ZenScript
Copy
LivingEntity.canBeAffected(effectInstance as MobEffectInstance) as boolean
ParameterType
Parameter
effectInstance
Type
MobEffectInstance

Link to canBeSeenAsEnemy

Name: canBeSeenAsEnemy

Return Type: boolean

ZenScript
Copy
// LivingEntity.canBeSeenAsEnemy() as boolean

myLivingEntity.canBeSeenAsEnemy();

Link to canBeSeenByAnyone

Name: canBeSeenByAnyone

Return Type: boolean

ZenScript
Copy
// LivingEntity.canBeSeenByAnyone() as boolean

myLivingEntity.canBeSeenByAnyone();

Link to canBreatheUnderwater

Name: canBreatheUnderwater

Return Type: boolean

ZenScript
Copy
// LivingEntity.canBreatheUnderwater() as boolean

myLivingEntity.canBreatheUnderwater();

Link to canSpawnSoulSpeedParticle

Name: canSpawnSoulSpeedParticle

Return Type: boolean

ZenScript
Copy
// LivingEntity.canSpawnSoulSpeedParticle() as boolean

myLivingEntity.canSpawnSoulSpeedParticle();

Name: canStandOnFluid

Return Type: boolean

ZenScript
Copy
LivingEntity.canStandOnFluid(fluid as Fluid) as boolean
ParameterType
Parameter
fluid
Type
Fluid

Name: canTakeItem

Return Type: boolean

ZenScript
Copy
LivingEntity.canTakeItem(stack as ItemStack) as boolean
ParameterType
Parameter
stack
Type
format@@0 ItemStack

Link to clearSleepingPos

Name: clearSleepingPos

ZenScript
Copy
// LivingEntity.clearSleepingPos()

myLivingEntity.clearSleepingPos();

Name: die

ZenScript
Copy
LivingEntity.die(source as DamageSource)
ParameterType
Parameter
source
Type
DamageSource

Name: doHurtTarget

Return Type: boolean

ZenScript
Copy
LivingEntity.doHurtTarget(entity as Entity) as boolean
ParameterType
Parameter
entity
Type
Entity

Name: eat

Return Type: ItemStack

ZenScript
Copy
LivingEntity.eat(level as Level, stack as ItemStack) as ItemStack
ParameterType
Parameter
level
Type
Level
Parameter
stack
Type
format@@0 ItemStack

Name: forceAddEffect

ZenScript
Copy
LivingEntity.forceAddEffect(effectInstance as MobEffectInstance, entity as Entity?)
ParameterType
Parameter
effectInstance
Type
MobEffectInstance
Parameter
entity
Type
Entity?

Link to getAbsorptionAmount

Name: getAbsorptionAmount

Return Type: float

ZenScript
Copy
// LivingEntity.getAbsorptionAmount() as float

myLivingEntity.getAbsorptionAmount();

Link to getActiveEffects

Name: getActiveEffects

Return Type: Collection<MobEffectInstance>

ZenScript
Copy
// LivingEntity.getActiveEffects() as Collection<MobEffectInstance>

myLivingEntity.getActiveEffects();

Link to getActiveEffectsMap

Name: getActiveEffectsMap

Return Type: MobEffectInstance[MobEffect]

ZenScript
Copy
// LivingEntity.getActiveEffectsMap() as MobEffectInstance[MobEffect]

myLivingEntity.getActiveEffectsMap();

Link to getArmorCoverPercentage

Name: getArmorCoverPercentage

Return Type: float

ZenScript
Copy
// LivingEntity.getArmorCoverPercentage() as float

myLivingEntity.getArmorCoverPercentage();

Name: getArmorValue

Return Type: int

ZenScript
Copy
// LivingEntity.getArmorValue() as int

myLivingEntity.getArmorValue();

Name: getArrowCount

Return Type: int

ZenScript
Copy
// LivingEntity.getArrowCount() as int

myLivingEntity.getArrowCount();

Name: getAttribute

Return Type: AttributeInstance?

ZenScript
Copy
LivingEntity.getAttribute(attribute as Attribute) as AttributeInstance?
ParameterType
Parameter
attribute
Type
Attribute

Link to getAttributeBaseValue

Name: getAttributeBaseValue

Return Type: double

ZenScript
Copy
LivingEntity.getAttributeBaseValue(attribute as Attribute) as double
ParameterType
Parameter
attribute
Type
Attribute

Link to getAttributeValue

Name: getAttributeValue

Return Type: double

ZenScript
Copy
LivingEntity.getAttributeValue(attribute as Attribute) as double
ParameterType
Parameter
attribute
Type
Attribute

Link to getBedOrientation

Name: getBedOrientation

Return Type: Direction?

ZenScript
Copy
// LivingEntity.getBedOrientation() as Direction?

myLivingEntity.getBedOrientation();

Name: getEffect

Return Type: MobEffectInstance?

ZenScript
Copy
LivingEntity.getEffect(effect as MobEffect) as MobEffectInstance?
ParameterType
Parameter
effect
Type
MobEffect

Link to getFallFlyingTicks

Name: getFallFlyingTicks

Return Type: int

ZenScript
Copy
// LivingEntity.getFallFlyingTicks() as int

myLivingEntity.getFallFlyingTicks();

Name: getHealth

Return Type: float

ZenScript
Copy
// LivingEntity.getHealth() as float

myLivingEntity.getHealth();

Name: getItemBySlot

Return Type: ItemStack

ZenScript
Copy
LivingEntity.getItemBySlot(slot as EquipmentSlot) as ItemStack
ParameterType
Parameter
slot
Type
EquipmentSlot

Name: getItemInHand

Return Type: ItemStack

ZenScript
Copy
LivingEntity.getItemInHand(hand as InteractionHand) as ItemStack
ParameterType
Parameter
hand
Type
InteractionHand

Link to getJumpBoostPower

Name: getJumpBoostPower

Return Type: double

ZenScript
Copy
// LivingEntity.getJumpBoostPower() as double

myLivingEntity.getJumpBoostPower();

Name: getKillCredit

Return Type: LivingEntity?

ZenScript
Copy
// LivingEntity.getKillCredit() as LivingEntity?

myLivingEntity.getKillCredit();

Link to getLastClimbablePos

Name: getLastClimbablePos

Return Type: BlockPos?

ZenScript
Copy
// LivingEntity.getLastClimbablePos() as BlockPos?

myLivingEntity.getLastClimbablePos();

Link to getLastDamageSource

Name: getLastDamageSource

Return Type: DamageSource?

ZenScript
Copy
// LivingEntity.getLastDamageSource() as DamageSource?

myLivingEntity.getLastDamageSource();

Link to getLastHurtByMob

Name: getLastHurtByMob

Return Type: LivingEntity?

ZenScript
Copy
// LivingEntity.getLastHurtByMob() as LivingEntity?

myLivingEntity.getLastHurtByMob();

Link to getLastHurtByMobTimestamp

Name: getLastHurtByMobTimestamp

Return Type: int

ZenScript
Copy
// LivingEntity.getLastHurtByMobTimestamp() as int

myLivingEntity.getLastHurtByMobTimestamp();

Name: getLastHurtMob

Return Type: LivingEntity

ZenScript
Copy
// LivingEntity.getLastHurtMob() as LivingEntity

myLivingEntity.getLastHurtMob();

Link to getLastHurtMobTimestamp

Name: getLastHurtMobTimestamp

Return Type: int

ZenScript
Copy
// LivingEntity.getLastHurtMobTimestamp() as int

myLivingEntity.getLastHurtMobTimestamp();

Name: getLootTable

Return Type: ResourceLocation

ZenScript
Copy
// LivingEntity.getLootTable() as ResourceLocation

myLivingEntity.getLootTable();

Name: getMainArm

Return Type: HumanoidArm

ZenScript
Copy
// LivingEntity.getMainArm() as HumanoidArm

myLivingEntity.getMainArm();

Name: getMainHandItem

Return Type: ItemStack

ZenScript
Copy
// LivingEntity.getMainHandItem() as ItemStack

myLivingEntity.getMainHandItem();

Name: getMaxHealth

Return Type: float

ZenScript
Copy
// LivingEntity.getMaxHealth() as float

myLivingEntity.getMaxHealth();

Name: getMobType

Return Type: MobType

ZenScript
Copy
// LivingEntity.getMobType() as MobType

myLivingEntity.getMobType();

Name: getNoActionTime

Return Type: int

ZenScript
Copy
// LivingEntity.getNoActionTime() as int

myLivingEntity.getNoActionTime();

Name: getOffhandItem

Return Type: ItemStack

ZenScript
Copy
// LivingEntity.getOffhandItem() as ItemStack

myLivingEntity.getOffhandItem();

Name: getRandom

Return Type: Random

ZenScript
Copy
// LivingEntity.getRandom() as Random

myLivingEntity.getRandom();

Name: getScale

Return Type: float

ZenScript
Copy
// LivingEntity.getScale() as float

myLivingEntity.getScale();

Name: getSleepingPos

Return Type: BlockPos?

ZenScript
Copy
// LivingEntity.getSleepingPos() as BlockPos?

myLivingEntity.getSleepingPos();

Name: getSpeed

Return Type: float

ZenScript
Copy
// LivingEntity.getSpeed() as float

myLivingEntity.getSpeed();

Name: getStingerCount

Return Type: int

ZenScript
Copy
// LivingEntity.getStingerCount() as int

myLivingEntity.getStingerCount();

Name: getSwimAmount

Return Type: float

ZenScript
Copy
LivingEntity.getSwimAmount(partialTicks as float) as float
ParameterType
Parameter
partialTicks
Type
float

Link to getTicksUsingItem

Name: getTicksUsingItem

Return Type: int

ZenScript
Copy
// LivingEntity.getTicksUsingItem() as int

myLivingEntity.getTicksUsingItem();

Name: getUseItem

Return Type: ItemStack

ZenScript
Copy
// LivingEntity.getUseItem() as ItemStack

myLivingEntity.getUseItem();

Link to getUseItemRemainingTicks

Name: getUseItemRemainingTicks

Return Type: int

ZenScript
Copy
// LivingEntity.getUseItemRemainingTicks() as int

myLivingEntity.getUseItemRemainingTicks();

Name: getUsedItemHand

Return Type: InteractionHand

ZenScript
Copy
// LivingEntity.getUsedItemHand() as InteractionHand

myLivingEntity.getUsedItemHand();

Link to getVisibilityPercent

Name: getVisibilityPercent

Return Type: double

ZenScript
Copy
LivingEntity.getVisibilityPercent(lookingEntity as Entity?) as double
ParameterType
Parameter
lookingEntity
Type
Entity?

Name: getVoicePitch

Return Type: float

ZenScript
Copy
// LivingEntity.getVoicePitch() as float

myLivingEntity.getVoicePitch();

Name: hasEffect

Return Type: boolean

ZenScript
Copy
LivingEntity.hasEffect(effect as MobEffect) as boolean
ParameterType
Parameter
effect
Type
MobEffect

Name: hasItemInSlot

Return Type: boolean

ZenScript
Copy
LivingEntity.hasItemInSlot(slot as EquipmentSlot) as boolean
ParameterType
Parameter
slot
Type
EquipmentSlot

Name: hasLineOfSight

Return Type: boolean

ZenScript
Copy
LivingEntity.hasLineOfSight(entity as Entity) as boolean
ParameterType
Parameter
entity
Type
Entity

Name: heal

ZenScript
Copy
LivingEntity.heal(amount as float)
ParameterType
Parameter
amount
Type
float

Link to isAffectedByPotions

Name: isAffectedByPotions

Return Type: boolean

ZenScript
Copy
// LivingEntity.isAffectedByPotions() as boolean

myLivingEntity.isAffectedByPotions();

Link to isAutoSpinAttack

Name: isAutoSpinAttack

Return Type: boolean

ZenScript
Copy
// LivingEntity.isAutoSpinAttack() as boolean

myLivingEntity.isAutoSpinAttack();

Name: isBaby

Return Type: boolean

ZenScript
Copy
// LivingEntity.isBaby() as boolean

myLivingEntity.isBaby();

Name: isBlocking

Return Type: boolean

ZenScript
Copy
// LivingEntity.isBlocking() as boolean

myLivingEntity.isBlocking();

Link to isCurrentlyGlowing

Name: isCurrentlyGlowing

Return Type: boolean

ZenScript
Copy
// LivingEntity.isCurrentlyGlowing() as boolean

myLivingEntity.isCurrentlyGlowing();

Link to isDamageSourceBlocked

Name: isDamageSourceBlocked

Return Type: boolean

ZenScript
Copy
LivingEntity.isDamageSourceBlocked(source as DamageSource) as boolean
ParameterType
Parameter
source
Type
DamageSource

Name: isDeadOrDying

Return Type: boolean

ZenScript
Copy
// LivingEntity.isDeadOrDying() as boolean

myLivingEntity.isDeadOrDying();

Name: isFallFlying

Return Type: boolean

ZenScript
Copy
// LivingEntity.isFallFlying() as boolean

myLivingEntity.isFallFlying();

Name: isHolding

Return Type: boolean

ZenScript
Copy
LivingEntity.isHolding(item as ItemDefinition) as boolean
ParameterType
Parameter
item
Type
ItemDefinition

Name: isHolding

Return Type: boolean

ZenScript
Copy
LivingEntity.isHolding(predicate as Predicate<ItemStack>) as boolean
ParameterType
Parameter
predicate
Type
Predicate<ItemStack>

Link to isInvertedHealAndHarm

Name: isInvertedHealAndHarm

Return Type: boolean

ZenScript
Copy
// LivingEntity.isInvertedHealAndHarm() as boolean

myLivingEntity.isInvertedHealAndHarm();

Link to isSensitiveToWater

Name: isSensitiveToWater

Return Type: boolean

ZenScript
Copy
// LivingEntity.isSensitiveToWater() as boolean

myLivingEntity.isSensitiveToWater();

Name: isSleeping

Return Type: boolean

ZenScript
Copy
// LivingEntity.isSleeping() as boolean

myLivingEntity.isSleeping();

Link to isSuppressingSlidingDownLadder

Name: isSuppressingSlidingDownLadder

Return Type: boolean

ZenScript
Copy
// LivingEntity.isSuppressingSlidingDownLadder() as boolean

myLivingEntity.isSuppressingSlidingDownLadder();

Name: isUsingItem

Return Type: boolean

ZenScript
Copy
// LivingEntity.isUsingItem() as boolean

myLivingEntity.isUsingItem();

Link to isVisuallySwimming

Name: isVisuallySwimming

Return Type: boolean

ZenScript
Copy
// LivingEntity.isVisuallySwimming() as boolean

myLivingEntity.isVisuallySwimming();

Name: knockback

ZenScript
Copy
LivingEntity.knockback(x as double, y as double, z as double)
ParameterType
Parameter
x
Type
double
Parameter
y
Type
double
Parameter
z
Type
double

Link to releaseUsingItem

Name: releaseUsingItem

ZenScript
Copy
// LivingEntity.releaseUsingItem()

myLivingEntity.releaseUsingItem();

Link to removeAllEffects

Name: removeAllEffects

Return Type: boolean

ZenScript
Copy
// LivingEntity.removeAllEffects() as boolean

myLivingEntity.removeAllEffects();

Name: removeEffect

Return Type: boolean

ZenScript
Copy
LivingEntity.removeEffect(effect as MobEffect) as boolean
ParameterType
Parameter
effect
Type
MobEffect

Link to removeEffectNoUpdate

Name: removeEffectNoUpdate

Return Type: MobEffectInstance?

ZenScript
Copy
LivingEntity.removeEffectNoUpdate(effect as MobEffect?) as MobEffectInstance?
ParameterType
Parameter
effect
Type
MobEffect?

Link to setAbsorptionAmount

Name: setAbsorptionAmount

ZenScript
Copy
LivingEntity.setAbsorptionAmount(absorption as float)
ParameterType
Parameter
absorption
Type
float

Name: setArrowCount

ZenScript
Copy
LivingEntity.setArrowCount(count as int)
ParameterType
Parameter
count
Type
int

Link to setDiscardFriction

Name: setDiscardFriction

ZenScript
Copy
LivingEntity.setDiscardFriction(discardFriction as boolean)
ParameterType
Parameter
discardFriction
Type
boolean

Name: setHealth

ZenScript
Copy
LivingEntity.setHealth(health as float)
ParameterType
Parameter
health
Type
float

Name: setItemInHand

ZenScript
Copy
LivingEntity.setItemInHand(hand as InteractionHand, stack as ItemStack)
ParameterType
Parameter
hand
Type
InteractionHand
Parameter
stack
Type
format@@0 ItemStack

Name: setJumping

ZenScript
Copy
LivingEntity.setJumping(jumping as boolean)
ParameterType
Parameter
jumping
Type
boolean

Link to setLastHurtByMob

Name: setLastHurtByMob

ZenScript
Copy
LivingEntity.setLastHurtByMob(entity as LivingEntity?)
ParameterType
Parameter
entity
Type
LivingEntity?

Link to setLastHurtByPlayer

Name: setLastHurtByPlayer

ZenScript
Copy
LivingEntity.setLastHurtByPlayer(player as Player?)
ParameterType
Parameter
player
Type
Player?

Name: setLastHurtMob

ZenScript
Copy
LivingEntity.setLastHurtMob(entity as Entity)
ParameterType
Parameter
entity
Type
Entity

Name: setNoActionTime

ZenScript
Copy
LivingEntity.setNoActionTime(idleTime as int)
ParameterType
Parameter
idleTime
Type
int

Name: setSleepingPos

ZenScript
Copy
LivingEntity.setSleepingPos(pos as BlockPos)
ParameterType
Parameter
pos
Type
BlockPos

Name: setSpeed

ZenScript
Copy
LivingEntity.setSpeed(speed as float)
ParameterType
Parameter
speed
Type
float

Name: setStingerCount

ZenScript
Copy
LivingEntity.setStingerCount(count as int)
ParameterType
Parameter
count
Type
int

Link to shouldDiscardFriction

Name: shouldDiscardFriction

Return Type: boolean

ZenScript
Copy
// LivingEntity.shouldDiscardFriction() as boolean

myLivingEntity.shouldDiscardFriction();

Name: startSleeping

ZenScript
Copy
LivingEntity.startSleeping(pos as BlockPos)
ParameterType
Parameter
pos
Type
BlockPos

Name: startUsingItem

ZenScript
Copy
LivingEntity.startUsingItem(param0 as InteractionHand)
ParameterType
Parameter
param0
Type
InteractionHand

Name: stopSleeping

ZenScript
Copy
// LivingEntity.stopSleeping()

myLivingEntity.stopSleeping();

Name: stopUsingItem

ZenScript
Copy
// LivingEntity.stopUsingItem()

myLivingEntity.stopUsingItem();

Name: swing

ZenScript
Copy
LivingEntity.swing(hand as InteractionHand)
ParameterType
Parameter
hand
Type
InteractionHand

Name: swing

ZenScript
Copy
LivingEntity.swing(hand as InteractionHand, updateSelf as boolean)
ParameterType
Parameter
hand
Type
InteractionHand
Parameter
updateSelf
Type
boolean

Name: travel

ZenScript
Copy
LivingEntity.travel(vec as Vec3)
ParameterType
Parameter
vec
Type
Vec3
NameTypeHas GetterHas Setter
Name
absorptionAmount
Type
float
Has Getter
true
Has Setter
false
Name
activeEFfectsMap
Type
MobEffectInstance[MobEffect]
Has Getter
true
Has Setter
false
Name
activeEffects
Type
Collection<MobEffectInstance>
Has Getter
true
Has Setter
false
Name
armorCoverPercentage
Type
float
Has Getter
true
Has Setter
false
Name
armorValue
Type
int
Has Getter
true
Has Setter
false
Name
arrowCount
Type
int
Has Getter
true
Has Setter
false
Name
attackable
Type
boolean
Has Getter
true
Has Setter
false
Name
bedOrientation
Type
Direction?
Has Getter
true
Has Setter
false
Name
canBeSeenAsEnemy
Type
boolean
Has Getter
true
Has Setter
false
Name
canBeSeenByAnyone
Type
boolean
Has Getter
true
Has Setter
false
Name
canBreatheUnderwater
Type
boolean
Has Getter
true
Has Setter
false
Name
fallFlyingTicks
Type
int
Has Getter
true
Has Setter
false
Name
health
Type
float
Has Getter
true
Has Setter
false
Name
isAffectedByPotions
Type
boolean
Has Getter
true
Has Setter
false
Name
isAutoSpinAttack
Type
boolean
Has Getter
true
Has Setter
false
Name
isBaby
Type
boolean
Has Getter
true
Has Setter
false
Name
isBlocking
Type
boolean
Has Getter
true
Has Setter
false
Name
isCurrentlyGlowing
Type
boolean
Has Getter
true
Has Setter
false
Name
isDeadOrDying
Type
boolean
Has Getter
true
Has Setter
false
Name
isFallFlying
Type
boolean
Has Getter
true
Has Setter
false
Name
isInvertedHealAndHarm
Type
boolean
Has Getter
true
Has Setter
false
Name
isSensitiveToWater
Type
boolean
Has Getter
true
Has Setter
false
Name
isSleeping
Type
boolean
Has Getter
true
Has Setter
false
Name
isSuppressingSlidingDownLadder
Type
boolean
Has Getter
true
Has Setter
false
Name
isUsingItem
Type
boolean
Has Getter
true
Has Setter
false
Name
isVisuallySwimming
Type
boolean
Has Getter
true
Has Setter
false
Name
jumpBoostPower
Type
double
Has Getter
true
Has Setter
false
Name
killCredit
Type
LivingEntity?
Has Getter
true
Has Setter
false
Name
lastClimbablePos
Type
BlockPos?
Has Getter
true
Has Setter
false
Name
lastDamageSource
Type
DamageSource?
Has Getter
true
Has Setter
false
Name
lastHurtByMob
Type
LivingEntity?
Has Getter
true
Has Setter
false
Name
lastHurtByMobTimestamp
Type
int
Has Getter
true
Has Setter
false
Name
lastHurtMob
Type
LivingEntity
Has Getter
true
Has Setter
false
Name
lastHurtMobTimestamp
Type
int
Has Getter
true
Has Setter
false
Name
lootTable
Type
ResourceLocation
Has Getter
true
Has Setter
false
Name
mainArm
Type
HumanoidArm
Has Getter
true
Has Setter
false
Name
mainHandItem
Type
format@@0 ItemStack
Has Getter
true
Has Setter
false
Name
maxHealth
Type
float
Has Getter
true
Has Setter
false
Name
mobType
Type
MobType
Has Getter
true
Has Setter
false
Name
noActionTime
Type
int
Has Getter
true
Has Setter
false
Name
offHandItem
Type
format@@0 ItemStack
Has Getter
true
Has Setter
false
Name
random
Type
Random
Has Getter
true
Has Setter
false
Name
scale
Type
float
Has Getter
true
Has Setter
false
Name
shouldDiscardFriction
Type
boolean
Has Getter
true
Has Setter
false
Name
sleepingPos
Type
BlockPos?
Has Getter
true
Has Setter
false
Name
speed
Type
float
Has Getter
true
Has Setter
false
Name
stingerCount
Type
int
Has Getter
true
Has Setter
false
Name
ticksUsingItem
Type
int
Has Getter
true
Has Setter
false
Name
useItem
Type
format@@0 ItemStack
Has Getter
true
Has Setter
false
Name
useItemRemainingTicks
Type
int
Has Getter
true
Has Setter
false
Name
usedItemHand
Type
InteractionHand
Has Getter
true
Has Setter
false
Name
voicePitch
Type
float
Has Getter
true
Has Setter
false