LivingEntity
Link to livingentity
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 Copyimport 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
Methods
Link to methods
Name: addEffect
Return Type: boolean
ZenScript CopyLivingEntity.addEffect(effectInstance as MobEffectInstance) as boolean
Parameter | Type |
---|---|
Parameter effectInstance | Type MobEffectInstance |
Name: addEffect
Return Type: boolean
ZenScript CopyLivingEntity.addEffect(effectInstance as MobEffectInstance, entity as Entity?) as boolean
Parameter | Type |
---|---|
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 CopyLivingEntity.canAttack(target as LivingEntity) as boolean
Parameter | Type |
---|---|
Parameter target | Type LivingEntity |
Name: canBeAffected
Return Type: boolean
ZenScript CopyLivingEntity.canBeAffected(effectInstance as MobEffectInstance) as boolean
Parameter | Type |
---|---|
Parameter effectInstance | Type MobEffectInstance |
Name: canBeSeenAsEnemy
Return Type: boolean
ZenScript Copy// LivingEntity.canBeSeenAsEnemy() as boolean
myLivingEntity.canBeSeenAsEnemy();
Name: canBeSeenByAnyone
Return Type: boolean
ZenScript Copy// LivingEntity.canBeSeenByAnyone() as boolean
myLivingEntity.canBeSeenByAnyone();
Name: canBreatheUnderwater
Return Type: boolean
ZenScript Copy// LivingEntity.canBreatheUnderwater() as boolean
myLivingEntity.canBreatheUnderwater();
Name: canSpawnSoulSpeedParticle
Return Type: boolean
ZenScript Copy// LivingEntity.canSpawnSoulSpeedParticle() as boolean
myLivingEntity.canSpawnSoulSpeedParticle();
Name: canStandOnFluid
Return Type: boolean
ZenScript CopyLivingEntity.canStandOnFluid(fluid as Fluid) as boolean
Parameter | Type |
---|---|
Parameter fluid | Type Fluid |
Name: canTakeItem
Return Type: boolean
ZenScript CopyLivingEntity.canTakeItem(stack as ItemStack) as boolean
Parameter | Type |
---|---|
Parameter stack | Type ItemStack |
Name: clearSleepingPos
ZenScript Copy// LivingEntity.clearSleepingPos()
myLivingEntity.clearSleepingPos();
Name: die
ZenScript CopyLivingEntity.die(source as DamageSource)
Parameter | Type |
---|---|
Parameter source | Type DamageSource |
Name: doHurtTarget
Return Type: boolean
ZenScript CopyLivingEntity.doHurtTarget(entity as Entity) as boolean
Parameter | Type |
---|---|
Parameter entity | Type Entity |
Name: forceAddEffect
ZenScript CopyLivingEntity.forceAddEffect(effectInstance as MobEffectInstance, entity as Entity?)
Parameter | Type |
---|---|
Parameter effectInstance | Type MobEffectInstance |
Parameter entity | Type Entity? |
Name: getAbsorptionAmount
Return Type: float
ZenScript Copy// LivingEntity.getAbsorptionAmount() as float
myLivingEntity.getAbsorptionAmount();
Name: getActiveEffects
Return Type: Collection<MobEffectInstance>
ZenScript Copy// LivingEntity.getActiveEffects() as Collection<MobEffectInstance>
myLivingEntity.getActiveEffects();
Name: getActiveEffectsMap
Return Type: MobEffectInstance[MobEffect]
ZenScript Copy// LivingEntity.getActiveEffectsMap() as MobEffectInstance[MobEffect]
myLivingEntity.getActiveEffectsMap();
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 CopyLivingEntity.getAttribute(attribute as Attribute) as AttributeInstance?
Parameter | Type |
---|---|
Parameter attribute | Type Attribute |
Name: getAttributeBaseValue
Return Type: double
ZenScript CopyLivingEntity.getAttributeBaseValue(attribute as Attribute) as double
Parameter | Type |
---|---|
Parameter attribute | Type Attribute |
Name: getAttributeValue
Return Type: double
ZenScript CopyLivingEntity.getAttributeValue(attribute as Attribute) as double
Parameter | Type |
---|---|
Parameter attribute | Type Attribute |
Name: getBedOrientation
Return Type: Direction?
ZenScript Copy// LivingEntity.getBedOrientation() as Direction?
myLivingEntity.getBedOrientation();
Name: getEffect
Return Type: MobEffectInstance?
ZenScript CopyLivingEntity.getEffect(effect as MobEffect) as MobEffectInstance?
Parameter | Type |
---|---|
Parameter effect | Type MobEffect |
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 CopyLivingEntity.getItemBySlot(slot as EquipmentSlot) as ItemStack
Parameter | Type |
---|---|
Parameter slot | Type EquipmentSlot |
Name: getItemInHand
Return Type: ItemStack
ZenScript CopyLivingEntity.getItemInHand(hand as InteractionHand) as ItemStack
Parameter | Type |
---|---|
Parameter hand | Type InteractionHand |
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();
Name: getLastClimbablePos
Return Type: BlockPos?
ZenScript Copy// LivingEntity.getLastClimbablePos() as BlockPos?
myLivingEntity.getLastClimbablePos();
Name: getLastDamageSource
Return Type: DamageSource?
ZenScript Copy// LivingEntity.getLastDamageSource() as DamageSource?
myLivingEntity.getLastDamageSource();
Name: getLastHurtByMob
Return Type: LivingEntity?
ZenScript Copy// LivingEntity.getLastHurtByMob() as LivingEntity?
myLivingEntity.getLastHurtByMob();
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();
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: RandomSource
ZenScript Copy// LivingEntity.getRandom() as RandomSource
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 CopyLivingEntity.getSwimAmount(partialTicks as float) as float
Parameter | Type |
---|---|
Parameter partialTicks | Type float |
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();
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();
Name: getVisibilityPercent
Return Type: double
ZenScript CopyLivingEntity.getVisibilityPercent(lookingEntity as Entity?) as double
Parameter | Type |
---|---|
Parameter lookingEntity | Type Entity? |
Name: getVoicePitch
Return Type: float
ZenScript Copy// LivingEntity.getVoicePitch() as float
myLivingEntity.getVoicePitch();
Name: hasEffect
Return Type: boolean
ZenScript CopyLivingEntity.hasEffect(effect as MobEffect) as boolean
Parameter | Type |
---|---|
Parameter effect | Type MobEffect |
Name: hasItemInSlot
Return Type: boolean
ZenScript CopyLivingEntity.hasItemInSlot(slot as EquipmentSlot) as boolean
Parameter | Type |
---|---|
Parameter slot | Type EquipmentSlot |
Name: hasLineOfSight
Return Type: boolean
ZenScript CopyLivingEntity.hasLineOfSight(entity as Entity) as boolean
Parameter | Type |
---|---|
Parameter entity | Type Entity |
Name: heal
ZenScript CopyLivingEntity.heal(amount as float)
Parameter | Type |
---|---|
Parameter amount | Type float |
Name: isAffectedByPotions
Return Type: boolean
ZenScript Copy// LivingEntity.isAffectedByPotions() as boolean
myLivingEntity.isAffectedByPotions();
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();
Name: isCurrentlyGlowing
Return Type: boolean
ZenScript Copy// LivingEntity.isCurrentlyGlowing() as boolean
myLivingEntity.isCurrentlyGlowing();
Name: isDamageSourceBlocked
Return Type: boolean
ZenScript CopyLivingEntity.isDamageSourceBlocked(source as DamageSource) as boolean
Parameter | Type |
---|---|
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 CopyLivingEntity.isHolding(item as ItemDefinition) as boolean
Parameter | Type |
---|---|
Parameter item | Type ItemDefinition |
Name: isHolding
Return Type: boolean
ZenScript CopyLivingEntity.isHolding(predicate as Predicate<ItemStack>) as boolean
Parameter | Type |
---|---|
Parameter predicate | Type Predicate<ItemStack> |
Name: isInvertedHealAndHarm
Return Type: boolean
ZenScript Copy// LivingEntity.isInvertedHealAndHarm() as boolean
myLivingEntity.isInvertedHealAndHarm();
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();
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();
Name: isVisuallySwimming
Return Type: boolean
ZenScript Copy// LivingEntity.isVisuallySwimming() as boolean
myLivingEntity.isVisuallySwimming();
Name: knockback
ZenScript CopyLivingEntity.knockback(x as double, y as double, z as double)
Parameter | Type |
---|---|
Parameter x | Type double |
Parameter y | Type double |
Parameter z | Type double |
Name: releaseUsingItem
ZenScript Copy// LivingEntity.releaseUsingItem()
myLivingEntity.releaseUsingItem();
Name: removeAllEffects
Return Type: boolean
ZenScript Copy// LivingEntity.removeAllEffects() as boolean
myLivingEntity.removeAllEffects();
Name: removeEffect
Return Type: boolean
ZenScript CopyLivingEntity.removeEffect(effect as MobEffect) as boolean
Parameter | Type |
---|---|
Parameter effect | Type MobEffect |
Name: removeEffectNoUpdate
Return Type: MobEffectInstance?
ZenScript CopyLivingEntity.removeEffectNoUpdate(effect as MobEffect?) as MobEffectInstance?
Parameter | Type |
---|---|
Parameter effect | Type MobEffect? |
Name: setAbsorptionAmount
ZenScript CopyLivingEntity.setAbsorptionAmount(absorption as float)
Parameter | Type |
---|---|
Parameter absorption | Type float |
Name: setArrowCount
ZenScript CopyLivingEntity.setArrowCount(count as int)
Parameter | Type |
---|---|
Parameter count | Type int |
Name: setDiscardFriction
ZenScript CopyLivingEntity.setDiscardFriction(discardFriction as boolean)
Parameter | Type |
---|---|
Parameter discardFriction | Type boolean |
Name: setHealth
ZenScript CopyLivingEntity.setHealth(health as float)
Parameter | Type |
---|---|
Parameter health | Type float |
Name: setItemInHand
ZenScript CopyLivingEntity.setItemInHand(hand as InteractionHand, stack as ItemStack)
Parameter | Type |
---|---|
Parameter hand | Type InteractionHand |
Parameter stack | Type ItemStack |
Name: setJumping
ZenScript CopyLivingEntity.setJumping(jumping as boolean)
Parameter | Type |
---|---|
Parameter jumping | Type boolean |
Name: setLastHurtByMob
ZenScript CopyLivingEntity.setLastHurtByMob(entity as LivingEntity?)
Parameter | Type |
---|---|
Parameter entity | Type LivingEntity? |
Name: setLastHurtByPlayer
ZenScript CopyLivingEntity.setLastHurtByPlayer(player as Player?)
Parameter | Type |
---|---|
Parameter player | Type Player? |
Name: setLastHurtMob
ZenScript CopyLivingEntity.setLastHurtMob(entity as Entity)
Parameter | Type |
---|---|
Parameter entity | Type Entity |
Name: setNoActionTime
ZenScript CopyLivingEntity.setNoActionTime(idleTime as int)
Parameter | Type |
---|---|
Parameter idleTime | Type int |
Name: setSleepingPos
ZenScript CopyLivingEntity.setSleepingPos(pos as BlockPos)
Parameter | Type |
---|---|
Parameter pos | Type BlockPos |
Name: setSpeed
ZenScript CopyLivingEntity.setSpeed(speed as float)
Parameter | Type |
---|---|
Parameter speed | Type float |
Name: setStingerCount
ZenScript CopyLivingEntity.setStingerCount(count as int)
Parameter | Type |
---|---|
Parameter count | Type int |
Name: shouldDiscardFriction
Return Type: boolean
ZenScript Copy// LivingEntity.shouldDiscardFriction() as boolean
myLivingEntity.shouldDiscardFriction();
Name: startSleeping
ZenScript CopyLivingEntity.startSleeping(pos as BlockPos)
Parameter | Type |
---|---|
Parameter pos | Type BlockPos |
Name: startUsingItem
ZenScript CopyLivingEntity.startUsingItem(param0 as InteractionHand)
Parameter | Type |
---|---|
Parameter param0 | Type InteractionHand |
Name: stopSleeping
ZenScript Copy// LivingEntity.stopSleeping()
myLivingEntity.stopSleeping();
Name: stopUsingItem
ZenScript Copy// LivingEntity.stopUsingItem()
myLivingEntity.stopUsingItem();
Name: swing
ZenScript CopyLivingEntity.swing(hand as InteractionHand)
Parameter | Type |
---|---|
Parameter hand | Type InteractionHand |
Name: swing
ZenScript CopyLivingEntity.swing(hand as InteractionHand, updateSelf as boolean)
Parameter | Type |
---|---|
Parameter hand | Type InteractionHand |
Parameter updateSelf | Type boolean |
Properties
Link to properties
Name | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
Name absorptionAmount | Type float | Has Getter true | Has Setter false | Description ​ |
Name activeEFfectsMap | Type MobEffectInstance[MobEffect] | Has Getter true | Has Setter false | Description ​ |
Name activeEffects | Type Collection<MobEffectInstance> | Has Getter true | Has Setter false | Description ​ |
Name armorCoverPercentage | Type float | Has Getter true | Has Setter false | Description ​ |
Name armorValue | Type int | Has Getter true | Has Setter false | Description ​ |
Name arrowCount | Type int | Has Getter true | Has Setter false | Description ​ |
Name attackable | Type boolean | Has Getter true | Has Setter false | Description ​ |
Name bedOrientation | Type Direction? | Has Getter true | Has Setter false | Description ​ |
Name canBeSeenAsEnemy | Type boolean | Has Getter true | Has Setter false | Description ​ |
Name canBeSeenByAnyone | Type boolean | Has Getter true | Has Setter false | Description ​ |
Name canBreatheUnderwater | Type boolean | Has Getter true | Has Setter false | Description ​ |
Name fallFlyingTicks | Type int | Has Getter true | Has Setter false | Description ​ |
Name health | Type float | Has Getter true | Has Setter false | Description ​ |
Name isAffectedByPotions | Type boolean | Has Getter true | Has Setter false | Description ​ |
Name isAutoSpinAttack | Type boolean | Has Getter true | Has Setter false | Description ​ |
Name isBaby | Type boolean | Has Getter true | Has Setter false | Description ​ |
Name isBlocking | Type boolean | Has Getter true | Has Setter false | Description ​ |
Name isCurrentlyGlowing | Type boolean | Has Getter true | Has Setter false | Description ​ |
Name isDeadOrDying | Type boolean | Has Getter true | Has Setter false | Description ​ |
Name isFallFlying | Type boolean | Has Getter true | Has Setter false | Description ​ |
Name isInvertedHealAndHarm | Type boolean | Has Getter true | Has Setter false | Description ​ |
Name isSensitiveToWater | Type boolean | Has Getter true | Has Setter false | Description ​ |
Name isSleeping | Type boolean | Has Getter true | Has Setter false | Description ​ |
Name isSuppressingSlidingDownLadder | Type boolean | Has Getter true | Has Setter false | Description ​ |
Name isUsingItem | Type boolean | Has Getter true | Has Setter false | Description ​ |
Name isVisuallySwimming | Type boolean | Has Getter true | Has Setter false | Description ​ |
Name jumpBoostPower | Type double | Has Getter true | Has Setter false | Description ​ |
Name killCredit | Type LivingEntity? | Has Getter true | Has Setter false | Description ​ |
Name lastClimbablePos | Type BlockPos? | Has Getter true | Has Setter false | Description ​ |
Name lastDamageSource | Type DamageSource? | Has Getter true | Has Setter false | Description ​ |
Name lastHurtByMob | Type LivingEntity? | Has Getter true | Has Setter false | Description ​ |
Name lastHurtByMobTimestamp | Type int | Has Getter true | Has Setter false | Description ​ |
Name lastHurtMob | Type LivingEntity | Has Getter true | Has Setter false | Description ​ |
Name lastHurtMobTimestamp | Type int | Has Getter true | Has Setter false | Description ​ |
Name lootTable | Type ResourceLocation | Has Getter true | Has Setter false | Description ​ |
Name lootTableSeed | Type long | Has Getter true | Has Setter false | Description Gets the seed used when generating loot from this entity. |
Name mainArm | Type HumanoidArm | Has Getter true | Has Setter false | Description ​ |
Name mainHandItem | Type ItemStack | Has Getter true | Has Setter false | Description ​ |
Name maxHealth | Type float | Has Getter true | Has Setter false | Description ​ |
Name mobType | Type MobType | Has Getter true | Has Setter false | Description ​ |
Name noActionTime | Type int | Has Getter true | Has Setter false | Description ​ |
Name offHandItem | Type ItemStack | Has Getter true | Has Setter false | Description ​ |
Name random | Type RandomSource | Has Getter true | Has Setter false | Description ​ |
Name scale | Type float | Has Getter true | Has Setter false | Description ​ |
Name shouldDiscardFriction | Type boolean | Has Getter true | Has Setter false | Description ​ |
Name sleepingPos | Type BlockPos? | Has Getter true | Has Setter false | Description ​ |
Name speed | Type float | Has Getter true | Has Setter false | Description ​ |
Name stingerCount | Type int | Has Getter true | Has Setter false | Description ​ |
Name ticksUsingItem | Type int | Has Getter true | Has Setter false | Description ​ |
Name useItem | Type ItemStack | Has Getter true | Has Setter false | Description ​ |
Name useItemRemainingTicks | Type int | Has Getter true | Has Setter false | Description ​ |
Name usedItemHand | Type InteractionHand | Has Getter true | Has Setter false | Description ​ |
Name voicePitch | Type float | Has Getter true | Has Setter false | Description ​ |